Skip to content

Commit ee179e0

Browse files
Release CI script
1 parent a40b69e commit ee179e0

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

JenkinsfileRelease

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
parameters {
2-
string(name: 'version', defaultValue: '18.7', description: 'version of gem')
2+
string(name: 'version', defaultValue: '19.9.0', description: 'version of gem')
33
string(name: 'deployKey', defaultValue: 'xxx', description: 'key')
4-
string(name: 'testServerUrl', defaultValue: 'https://api.aspose.cloud', description: 'server url')
4+
string(name: 'testServerUrl', defaultValue: 'https://api-qa.aspose.cloud', description: 'server url')
55
string(name: 'StartFromStage', defaultValue: '0', description: '0 based index of stage which will be started')
66
}
77
node('billing-qa-ubuntu-16.04.4') {
88
try {
99
stage('0:Merge master to testPackage'){
1010
if (params.StartFromStage.toInteger() < 1) {
11-
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '9d6c4dfa-042c-4ed1-81c7-9175179dddda', url: 'https://github.com/aspose-words-cloud/aspose-words-cloud-ruby.git/']]])
11+
checkout([$class: 'GitSCM', branches: [[name: '*/release']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: "**"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '361885ba-9425-4230-950e-0af201d90547', url: 'https://git.auckland.dynabic.com/words-cloud/words-cloud-ruby.git']]])
1212

1313
sh "git checkout --merge testPackage"
1414
sh "git reset --hard origin/testPackage"
15-
sh "git merge --no-ff --allow-unrelated-histories origin/master"
15+
sh "git merge --no-ff --allow-unrelated-histories origin/release"
1616
sh "git diff --name-status"
17-
sh 'git commit -am "Merged master branch to testPackage" || exit 0'
17+
sh 'git commit -am "Merged release branch to testPackage" || exit 0'
1818

19-
withCredentials([usernamePassword(credentialsId: '9d6c4dfa-042c-4ed1-81c7-9175179dddda', passwordVariable: 'gitPass', usernameVariable: 'gitUsername')]) {
20-
sh "git push https://WordsCloud:$gitPass@github.com/aspose-words-cloud/aspose-words-cloud-ruby testPackage"
19+
withCredentials([usernamePassword(credentialsId: '361885ba-9425-4230-950e-0af201d90547', passwordVariable: 'gitPass', usernameVariable: 'gitUsername')]) {
20+
sh "git push "https://%gitUsername%:%gitPass%@git.auckland.dynabic.com/words-cloud/words-cloud-ruby.git" testPackage"
2121
}
2222
}
2323
}
@@ -40,7 +40,7 @@ def testGemLocally()
4040
try {
4141
stage('2:checkout again'){
4242
if (params.StartFromStage.toInteger() < 3) {
43-
checkout([$class: 'GitSCM', branches: [[name: '*/testPackage']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '9d6c4dfa-042c-4ed1-81c7-9175179dddda', url: 'https://github.com/aspose-words-cloud/aspose-words-cloud-ruby.git/']]])
43+
checkout([$class: 'GitSCM', branches: [[name: '*/testPackage']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: "**"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '361885ba-9425-4230-950e-0af201d90547', url: 'https://git.auckland.dynabic.com/words-cloud/words-cloud-ruby.git']]])
4444
withCredentials([usernamePassword(credentialsId: '6839cbe8-39fa-40c0-86ce-90706f0bae5d', passwordVariable: 'AppKey', usernameVariable: 'AppSid')]) {
4545
sh 'mkdir -p Settings'
4646
sh 'echo "{\\"AppSid\\": \\"$AppSid\\",\\"AppKey\\": \\"$AppKey\\", \\"BaseUrl\\": \\"${testServerUrl}\\"}" > Settings/servercreds.json'
@@ -82,7 +82,7 @@ def publishGem()
8282
try {
8383
stage('4:checkout again'){
8484
if (params.StartFromStage.toInteger() < 5) {
85-
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '9d6c4dfa-042c-4ed1-81c7-9175179dddda', url: 'https://github.com/aspose-words-cloud/aspose-words-cloud-ruby.git/']]])
85+
checkout([$class: 'GitSCM', branches: [[name: '*/release']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: "**"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '361885ba-9425-4230-950e-0af201d90547', url: 'https://git.auckland.dynabic.com/words-cloud/words-cloud-ruby.git']]])
8686
}
8787
}
8888

@@ -106,14 +106,14 @@ def publishGem()
106106
}
107107
stage('6:add version tag'){
108108
if (params.StartFromStage.toInteger() < 6) {
109-
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '9d6c4dfa-042c-4ed1-81c7-9175179dddda', url: 'https://github.com/aspose-words-cloud/aspose-words-cloud-ruby.git/']]])
109+
checkout([$class: 'GitSCM', branches: [[name: '*/release']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: "**"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '361885ba-9425-4230-950e-0af201d90547', url: 'https://git.auckland.dynabic.com/words-cloud/words-cloud-ruby.git']]])
110110

111111
sh "git config user.email \"[email protected]\""
112112
sh "git config user.name \"jenkins\""
113113
sh "git tag -a ${version} -m 'version ${version}' | exit 0"
114114

115-
withCredentials([usernamePassword(credentialsId: '9d6c4dfa-042c-4ed1-81c7-9175179dddda', passwordVariable: 'gitPass', usernameVariable: 'gitUsername')]) {
116-
sh "git push https://WordsCloud:$gitPass@github.com/aspose-words-cloud/aspose-words-cloud-ruby ${version}"
115+
withCredentials([usernamePassword(credentialsId: '361885ba-9425-4230-950e-0af201d90547', passwordVariable: 'gitPass', usernameVariable: 'gitUsername')]) {
116+
sh "git push https://%gitUsername%:%gitPass%@git.auckland.dynabic.com/words-cloud/words-cloud-ruby.git ${version}"
117117
}
118118
}
119119
}
@@ -122,7 +122,7 @@ def publishGem()
122122
}
123123
}
124124

125-
node('billing-qa-ubuntu-16.04.4') {
125+
node('words-linux') {
126126
try {
127127
testGemLocally()
128128
} finally {

0 commit comments

Comments
 (0)