add step to push to gitea
This commit is contained in:
28
Jenkinsfile
vendored
28
Jenkinsfile
vendored
@@ -103,21 +103,23 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stage('Mirror to Gitea') {
|
stage('Mirror to Gitea') {
|
||||||
steps {
|
steps {
|
||||||
sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) {
|
sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) {
|
||||||
script {
|
script {
|
||||||
// Checkout from GitLab (already done implicitly)
|
// Checkout from GitLab (already done implicitly)
|
||||||
sh '''
|
sh """
|
||||||
git config user.name "Jenkins Server"
|
git config user.name "Jenkins Server"
|
||||||
git config user.email jenkins@confdroid.com
|
git config user.email jenkins@confdroid.com
|
||||||
git checkout master
|
git checkout master
|
||||||
git remote add gitea https://gitea.confdroid.com/confdroid/puppet_cd.git
|
git remote add gitea https://gitea.confdroid.com/confdroid/puppet_cd.git
|
||||||
git push --mirror gitea
|
git push --mirror gitea
|
||||||
'''
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
/*
|
||||||
}
|
when { branch 'master' } // Only on main branch to avoid noise
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user