Skip to content

Commit

Permalink
#1246: Use cleanWs() and checkout scm for the initial stage on each m…
Browse files Browse the repository at this point in the history
…achine; use 'Ride' label to force build on mac2
  • Loading branch information
dyaandys committed Jul 12, 2024
1 parent 3807b7f commit a967396
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ pipeline
}
}
steps {
cleanWs()
checkout scm
sh 'rm -Rf _ ship'
sh 'npm i'
sh 'npm run build l a w'
sh './CI/publish.sh'
stash name: 'ride-win', includes: '_/ride*/Ride-*-win32-ia32/**'
stash name: 'ride-linux', includes: '_/ride*/Ride-*-linux*/**'
stash name: 'ride-version', includes: '_/version, _/version.js'
sh 'rm -Rf _'
sh 'echo "First use" >>./andys.log'
}
}
stage ('Packaging') {
Expand All @@ -35,19 +35,21 @@ pipeline
}
}
steps {
sh 'rm -Rf _ ship'
sh 'rm -Rf _ ship'
unstash 'ride-linux'
unstash 'ride-version'
sh './CI/packagescripts/linux/packageLinux.sh'
stash name: 'linux-ship', includes: 'ship/*'
sh 'echo "second use" >>./andys.log'
}
}
stage ('Mac Build and Packaging') {
agent {
label 'mac && x86 && build && 20.0'
label 'mac && x86 && build && ride'
}
steps {
sh 'rm -Rf _ ship'
cleanWs()
checkout scm
sh 'npm i'
sh 'npm run build o'
withCredentials([usernamePassword(credentialsId: '868dda6c-aaec-4ee4-845a-57362dec695b', passwordVariable: 'APPLE_APP_PASS', usernameVariable: 'APPLE_ID')]) {
Expand All @@ -62,6 +64,8 @@ pipeline
label 'win && ride'
}
steps {
cleanWs()
checkout scm
powershell 'if (Test-Path -Path ship) {remove-item ship -Recurse -Force }'
powershell 'if (Test-Path -Path _) { remove-item _ -Recurse -Force }'
unstash 'ride-win'
Expand Down Expand Up @@ -115,7 +119,7 @@ pipeline
unstash 'mac-ship-notarised'
unstash 'win-ship'
sh './CI/copyinstallers.sh'
sh 'rm -Rf _ ship'
sh 'echo "third use" >>./andys.log'
}
when {
not {
Expand All @@ -141,7 +145,7 @@ pipeline
unstash 'mac-ship'
unstash 'win-ship'
sh './CI/GH-Release.sh'
sh 'rm -Rf _ ship'
sh 'echo "fourth use" >>./andys.log'
}
when {
not {
Expand Down

0 comments on commit a967396

Please sign in to comment.