pipeline updated
This commit is contained in:
parent
d2b965f341
commit
122f86e724
42
pipeline
42
pipeline
@ -2,6 +2,7 @@
|
||||
def buildTag
|
||||
def buildContext
|
||||
def distBranch
|
||||
|
||||
pipeline {
|
||||
|
||||
agent {
|
||||
@ -89,20 +90,33 @@ pipeline {
|
||||
}
|
||||
stage("Checkout ref") {
|
||||
dir(env.projectDir) {
|
||||
sh """
|
||||
git checkout ${env.ref}
|
||||
"""
|
||||
sh """
|
||||
git tag -am "paquet" pkg/${buildContext[-1]}/${buildContext[1]}/${buildContext[2]}/numero
|
||||
"""
|
||||
sh """
|
||||
git tag -d ${env.ref}
|
||||
git push origin :${env.ref}
|
||||
"""
|
||||
sh """
|
||||
git push --tag origin
|
||||
"""
|
||||
return
|
||||
withCredentials([
|
||||
sshUserPrivateKey(credentialsId: 'jenkins-forge-ssh', keyFileVariable: 'FORGE_SSH_KEY')]) {
|
||||
writeFile(
|
||||
file : "./sshForJenkins.sh",
|
||||
text: '''
|
||||
#!/bin/sh
|
||||
ssh -i "${FORGE_SSH_KEY}" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$@"
|
||||
'''
|
||||
)
|
||||
sh(script: "chmod +x ./sshForJenkins.sh")
|
||||
withEnv(["GIT_SSH=./sshForJenkins.sh"]) {
|
||||
sh """
|
||||
git checkout ${env.ref}
|
||||
"""
|
||||
sh """
|
||||
git tag -am "paquet" pkg/${buildContext[-1]}/${buildContext[1]}/${buildContext[2]}/numero
|
||||
"""
|
||||
sh """
|
||||
git tag -d ${env.ref}
|
||||
git push origin :${env.ref}
|
||||
"""
|
||||
sh """
|
||||
git push --tag origin
|
||||
"""
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user