-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtriggerJenkins.js
More file actions
16 lines (14 loc) · 828 Bytes
/
Copy pathtriggerJenkins.js
File metadata and controls
16 lines (14 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var shell = require('shelljs')
module.exports = {
trigger: async (target, zipVersion, pwd) => {
console.log('pwd', pwd)
const cmdMap = {
srm: `curl 'http://10.206.16.3:8090/job/build_fc-frontend_from_github_action/buildWithParameters?token=fc-frontend&zip=${zipVersion}' --user admin:${pwd}`,
saas: `curl 'http://10.206.16.3:8090/job/build_fc-saas-web_from_github_action/buildWithParameters?token=fc-frontend&zip=${zipVersion}' --user admin:${pwd}`,
'saas-mobile': `curl 'http://10.206.16.3:8090/job/build_fc-saas-mobile_from_github_action/buildWithParameters?token=fc-frontend&zip=${zipVersion}' --user admin:${pwd}`,
'saas-cy-pre': 'cd /home/work/fc-foundation-app/ && npm run cy:run:pre',
'saas-cy-prod': 'cd /home/work/fc-foundation-app/ && npm run cy:run:prod',
}
shell.exec(cmdMap[target])
},
}