-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
34 lines (32 loc) · 1.15 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
pipeline {
agent any
stages {
stage('Downstream') {
agent {
docker {
image 'node:latest'
args '-u root -v /var/run/docker.sock:/var/run/docker.sock'
}
}
steps {
withCredentials([gitUsernamePassword(credentialsId: 'ecnj_github', gitToolName: 'git-tool')]) {
sh '''
git config --global user.email "[email protected]"
git config --global user.name "ECNJ BOT"
rm -rf downstream
mkdir downstream
cd downstream
git clone https://github.com/ddsharpe/projectB.git
cd ..
cd downstream/projectB
git checkout from-projectA-release/v1 || git checkout -b from-projectA-release/v1
node ../../src/mycontent.js
git add folder/bom.json
git commit -m 'update from projectA'
git push origin from-projectA-release/v1
'''
}
}
}
}
}