avoid creating useless stages
MODIFY
Jenkinsfile
Jenkinsfile
properties([disableConcurrentBuilds()])
try {
- stage('Prepare upload') {
- node('linux') {
cleanUploadFolderIfNeeded(params.VERSION)
- }
- }
-
buildArchitecture('32', '61')
-
- node('linux') {
- stage('Upload finalization') {
finalizeUpload(params.VERSION)
- }
- }
} catch(exception) {
currentBuild.result = 'FAILURE'
throw exception
@@ -121,11 +111,15 @@ def cleanUploadFolderIfNeeded(launcherVersion) {
return;
}
+ stage('Prepare upload') {
+ node('linux') {
sshagent (credentials: ['b5248b59-a193-4457-8459-e28e9eb29ed7']) {
sh "ssh -o StrictHostKeyChecking=no \
pharoorgde@ssh.cluster023.hosting.ovh.net rm -rf files/pharo-launcher/tmp-${launcherVersion}"
}
}
+ }
+}
def finalizeUpload(launcherVersion) {
if (isPullRequest()) {
@@ -134,6 +128,8 @@ def finalizeUpload(launcherVersion) {
return;
}
+ node('linux') {
+ stage('Upload finalization') {
sshagent (credentials: ['b5248b59-a193-4457-8459-e28e9eb29ed7']) {
sh "ssh -o StrictHostKeyChecking=no \
pharoorgde@ssh.cluster023.hosting.ovh.net rm -rf files/pharo-launcher/${launcherVersion}"
@@ -141,6 +137,8 @@ def finalizeUpload(launcherVersion) {
pharoorgde@ssh.cluster023.hosting.ovh.net mv files/pharo-launcher/tmp-${launcherVersion} files/pharo-launcher/${launcherVersion}"
}
}
+ }
+}
def upload(file, launcherVersion) {
if (isPullRequest()) {

avoid creating useless stages