ci: run titan-iac promote step in jnlp git-capable container
This commit is contained in:
parent
8cd170736a
commit
131c34012b
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@ -93,14 +93,16 @@ spec:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([usernamePassword(credentialsId: 'gitea-pat', usernameVariable: 'GIT_USER', passwordVariable: 'GIT_TOKEN')]) {
|
container('jnlp') {
|
||||||
sh '''
|
withCredentials([usernamePassword(credentialsId: 'gitea-pat', usernameVariable: 'GIT_USER', passwordVariable: 'GIT_TOKEN')]) {
|
||||||
set +x
|
sh '''
|
||||||
git config user.email "jenkins@bstein.dev"
|
set +x
|
||||||
git config user.name "jenkins"
|
git config user.email "jenkins@bstein.dev"
|
||||||
git remote set-url origin https://${GIT_USER}:${GIT_TOKEN}@scm.bstein.dev/bstein/titan-iac.git
|
git config user.name "jenkins"
|
||||||
git push origin HEAD:${FLUX_BRANCH}
|
git remote set-url origin https://${GIT_USER}:${GIT_TOKEN}@scm.bstein.dev/bstein/titan-iac.git
|
||||||
'''
|
git push origin HEAD:${FLUX_BRANCH}
|
||||||
|
'''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,14 +92,16 @@ spec:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([usernamePassword(credentialsId: 'gitea-pat', usernameVariable: 'GIT_USER', passwordVariable: 'GIT_TOKEN')]) {
|
container('jnlp') {
|
||||||
sh '''
|
withCredentials([usernamePassword(credentialsId: 'gitea-pat', usernameVariable: 'GIT_USER', passwordVariable: 'GIT_TOKEN')]) {
|
||||||
set +x
|
sh '''
|
||||||
git config user.email "jenkins@bstein.dev"
|
set +x
|
||||||
git config user.name "jenkins"
|
git config user.email "jenkins@bstein.dev"
|
||||||
git remote set-url origin https://${GIT_USER}:${GIT_TOKEN}@scm.bstein.dev/bstein/titan-iac.git
|
git config user.name "jenkins"
|
||||||
git push origin HEAD:${FLUX_BRANCH}
|
git remote set-url origin https://${GIT_USER}:${GIT_TOKEN}@scm.bstein.dev/bstein/titan-iac.git
|
||||||
'''
|
git push origin HEAD:${FLUX_BRANCH}
|
||||||
|
'''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user