DO-95/omp_from_nextCloud_to_nexus (#3)

add sync both NextCloud and Nexus

Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/3
Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
Co-committed-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
This commit is contained in:
aleksandr.vodyanov
2023-11-03 11:11:33 +03:00
committed by Aleksandr Vodyanov
parent 5dcf1cd539
commit 7eeaa65b16
5 changed files with 148 additions and 13 deletions

View File

@@ -1,7 +1,6 @@
@Library('shared-lib') _
import tech.avroid.scm.Git
import tech.avroid.ssh.Ssh
properties([
disableConcurrentBuilds(),
@@ -11,7 +10,8 @@ properties([
]),
])
podTemplate(yaml: '''
podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"),
yaml: '''
apiVersion: v1
kind: Pod
spec:
@@ -33,17 +33,10 @@ podTemplate(yaml: '''
) {
node(POD_LABEL) {
stage('Get repository') {
println(params.BRANCH_NAME)
withCredentials(bindings: [sshUserPrivateKey(credentialsId: env.JENKINS_GIT_CREDENTIALS_SSH,
keyFileVariable: 'SSH_KEY')]) {
def ssh = new Ssh(this, SSH_KEY, "id_ecdsa")
def git = new Git(this)
def git = new Git(this, "$env.JENKINS_GIT_CREDENTIALS_SSH")
ssh.configureSshClient()
git.clone([urlRepo: "$env.JENKINS_GIT_REPOSITORY_SSH_URL/$params.PROJECT_NAME",
branch: params.BRANCH_NAME])
ssh.cleanupSshConfiguration()
}
git.clone([urlRepo: "$env.JENKINS_GIT_REPOSITORY_SSH_URL/$params.PROJECT_NAME",
branch: "$params.BRANCH_NAME"])
}
stage('Run job dsl') {