-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
40 lines (33 loc) · 1.66 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
node('worker') {
stage('Checkout') {
checkout scm
}
stage('Mirror') {
withCredentials([file(credentialsId: 'CDPE_GIT_SSH_KEY', variable: 'CDPE_SSH_KEY')]) {
sh '''#!/bin/bash
echo 'ssh -i '"${CDPE_SSH_KEY}"' $*' > ssh
chmod +x ssh
export GIT_SSH='./ssh'
git checkout production
echo 'pushing to gitlab'
git remote add gitlab [email protected]:cdpe_unit_tests/cdpe-2017-3-pe-master-1-control.git || true
git push gitlab ${BRANCH_NAME} -f
echo 'pushing to ado'
git remote add ado [email protected]:v3/cd4peAzureDevOpsTest/CD4PE%20Azure%20DevOps%20Test%20Project/cdpe-tests-control-repo || true
git push ado ${BRANCH_NAME} -f
echo 'pushing to bitbucket-server'
git remote add bitbucket ssh://[email protected]:7999/tes/cdpe-2018-1-pe-master-2-control.git || true
git push bitbucket ${BRANCH_NAME} -f
echo 'pushing to bitbucket-cloud'
git remote add bitbucket-cloud [email protected]:cd4peteam/control-repo.git || true
git push bitbucket-cloud ${BRANCH_NAME} -f
echo 'pushing to bitbucket-cloud'
git remote add github [email protected]:puppet-pipelines-tester/cdpe-2018-1-pe-master-1-control.git || true
git push github ${BRANCH_NAME} -f
echo 'pushing to bitbucket-cloud'
git remote add githubenterprise [email protected]:RDM-Integration-tests/cdpe-2018-1-pe-master-3-control.git || true
git push githubenterprise ${BRANCH_NAME} -f
'''
}
}
}