Try single scm checkout
MODIFY
Jenkinsfile
Jenkinsfile
@@ -4,6 +4,13 @@ properties([disableConcurrentBuilds()])
try {
cleanUploadFolderIfNeeded(params.VERSION)
+ node('linux') {
+ stage('Checkout from SCM') {
+ checkout scm
+ commitHash = sh(returnStdout: true, script: 'git log -1 --format="%p"').trim()
+ }
+ }
+
buildArchitecture('32', '61')
buildArchitecture('64', '61')
buildArchitecture('32', '70')
@@ -19,13 +26,7 @@ try {
def buildArchitecture(architecture, pharoVersion) {
withEnv(["ARCHITECTURE=${architecture}", "PHARO=${pharoVersion}"]) {
node('linux') {
- dir("Pharo${pharoVersion}-${architecture}") {
deleteDir()
- stage('Checkout from SCM') {
- checkout scm
- commitHash = sh(returnStdout: true, script: 'git log -1 --format="%p"').trim()
- }
-
stage("Build Pharo${pharoVersion}-${architecture}-bits") {
dir('pharo-build-scripts') {
git('https://github.com/pharo-project/pharo-build-scripts.git')
@@ -48,7 +49,6 @@ def buildArchitecture(architecture, pharoVersion) {
upload(packageFile, params.VERSION)
}
}
- }
node('windows') {
if (architecture == '32') {
stage("Packaging-Windows Pharo${pharoVersion}-${architecture}-bits") {
@@ -64,7 +64,6 @@ def buildArchitecture(architecture, pharoVersion) {
}
node('osx') {
stage("Packaging-Mac Pharo${pharoVersion}-${architecture}-bits") {
- dir("Pharo${pharoVersion}-${architecture}") {
deleteDir()
unstash "pharo-launcher-one-${architecture}"
withCredentials([usernamePassword(credentialsId: 'inriasoft-osx-developer', passwordVariable: 'PHARO_CERT_PASSWORD', usernameVariable: 'PHARO_SIGN_IDENTITY')]) {
@@ -74,7 +73,6 @@ def buildArchitecture(architecture, pharoVersion) {
stash includes: 'PharoLauncher*.dmg', name: "pharo-launcher-osx-${architecture}-package"
}
}
- }
//Do not deploy if in PR
if (isPullRequest()){
@@ -82,8 +80,6 @@ def buildArchitecture(architecture, pharoVersion) {
}
node('linux') {
stage("Deploy Pharo${pharoVersion}-${architecture}-bits") {
- dir("Pharo${pharoVersion}-${architecture}") {
- deleteDir()
if (currentBuild.result == null || currentBuild.result == 'SUCCESS') {
if (architecture == '32') {
unstash "pharo-launcher-win-${architecture}-package"
@@ -97,7 +93,6 @@ def buildArchitecture(architecture, pharoVersion) {
}
}
}
-}
def notifyBuild() {
if (isPullRequest()) {

Try single scm checkout