Merge branch 'jenkins-build-39' into 'master'
Auto-merge for build 39 See merge request puppet/prometheus_cd!38
This commit is contained in:
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"changeme",
|
"changeme",
|
||||||
|
"GITEA",
|
||||||
"GOMAXPROCS",
|
"GOMAXPROCS",
|
||||||
"procs",
|
"procs",
|
||||||
"reqpackage",
|
"reqpackage",
|
||||||
|
|||||||
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
@@ -101,5 +101,27 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Mirror to Gitea') {
|
||||||
|
steps {
|
||||||
|
withCredentials([usernamePassword(
|
||||||
|
credentialsId: 'Jenkins-gitea',
|
||||||
|
usernameVariable: 'GITEA_USER',
|
||||||
|
passwordVariable: 'GITEA_TOKEN')]) {
|
||||||
|
script {
|
||||||
|
// Checkout from GitLab (already done implicitly)
|
||||||
|
sh '''
|
||||||
|
git checkout master
|
||||||
|
git pull origin master
|
||||||
|
git branch -D development
|
||||||
|
git branch -D jenkins-build-$BUILD_NUMBER
|
||||||
|
git remote add master https://gitea.confdroid.com/confdroid/prometheus_cd.git
|
||||||
|
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
|
||||||
|
push master --mirror
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user