-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjenkinsfile
105 lines (91 loc) · 4.23 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
pipeline {
agent any
options {
timestamps()
}
stages {
// stage('Clone') {
// steps {
// checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'shangxianapp-github-xuexb-ssh-key', url: '[email protected]:shangxianapp/docker-auto-ssl.git']]]
// }
// }
stage('Generate CA') {
parallel {
stage('shangxian.app') {
steps {
echo 'ok'
// withCredentials([string(credentialsId: 'shangxianapp-namecom-xuexb-apikey', variable: 'aliapikey'), string(credentialsId: 'shangxianapp-aliyun-xuexb-secret', variable: 'alisecret'), string(credentialsId: 'shangxianapp-namecom-xuexb-apikey', variable: 'nameapikey'), string(credentialsId: 'shangxianapp-namecom-xuexb-secret', variable: 'namesecret')]) {
// sh label: '', script: 'docker run --rm -v "${WORKSPACE}/out/sg02":/acme.sh -e Namecom_Username=${nameapikey} -e Namecom_Token=${namesecret} neilpang/acme.sh --issue --renew-all --debug --dns dns_namecom --log --force -d shangxian.app -d *.shangxian.app'
// }
}
}
stage('other .app domian') {
steps {
echo 'ok'
// withCredentials([string(credentialsId: 'shangxianapp-namecom-xuexb-apikey', variable: 'aliapikey'), string(credentialsId: 'shangxianapp-aliyun-xuexb-secret', variable: 'alisecret'), string(credentialsId: 'shangxianapp-namecom-xuexb-apikey', variable: 'nameapikey'), string(credentialsId: 'shangxianapp-namecom-xuexb-secret', variable: 'namesecret')]) {
// sh label: '', script: 'docker run --rm -v "${WORKSPACE}/out/sg02":/acme.sh -e Namecom_Username=${nameapikey} -e Namecom_Token=${namesecret} neilpang/acme.sh --issue --renew-all --debug --dns dns_namecom --log --force -d bfe.app -d *.bfe.app -d dalao.app -d *.dalao.app -d mengxiang.app -d *.mengxiang.app -d yusan.app -d *.yusan.app -d diban.app -d *.diban.app -d jiemeng.app -d *.jiemeng.app -d mubu.app -d *.mubu.app'
// }
}
}
stage('xuexb') {
steps {
echo 'ok'
}
}
stage('jiandansousuo') {
steps {
echo 'ok'
}
}
stage('apijs') {
steps {
echo 'ok'
}
}
}
}
stage('Sync CA') {
parallel {
stage('bj01') {
steps {
echo 'ok'
}
}
stage('sg01') {
steps {
echo 'ok'
}
}
stage('sg02') {
steps {
sshPublisher(publishers: [sshPublisherDesc(configName: 'sg02', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: 'echo \'success ok\'', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '${DOCKER_NGINX_CA_DIR}', remoteDirectorySDF: false, removePrefix: 'out/sg02', sourceFiles: 'out/sg02/**/*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
}
}
}
}
stage('Reload Nginx') {
parallel {
stage('bj01') {
steps {
echo 'ok'
}
}
stage('sg01') {
steps {
echo 'ok'
}
}
stage('sg02') {
steps {
echo 'ok'
}
}
}
}
}
post {
always {
deleteDir()
}
}
}