From 83c066f51715d9db9732fe44b22f30ca3d2bcd6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 18 Jul 2022 20:17:48 +0200 Subject: [PATCH] ci: fix upload speeds on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By using `s3cmd` through PowerShell instead of Git Bash we improve upload speeds on Windows slightly, as described here: https://github.com/status-im/infra-ci/issues/40 Signed-off-by: Jakub SokoĊ‚owski --- ci/Jenkinsfile.combined | 2 +- ci/Jenkinsfile.linux | 6 ++-- ci/Jenkinsfile.linux-cpp | 2 +- ci/Jenkinsfile.macos | 8 ++++-- ...ac-cpp.todo => Jenkinsfile.macos-cpp.todo} | 2 +- ci/Jenkinsfile.windows | 28 ++++++++++++------- ci/Jenkinsfile.windows-cpp.todo | 2 +- 7 files changed, 31 insertions(+), 19 deletions(-) rename ci/{Jenkinsfile.mac-cpp.todo => Jenkinsfile.macos-cpp.todo} (98%) diff --git a/ci/Jenkinsfile.combined b/ci/Jenkinsfile.combined index 4fc86d451c..94429900e9 100644 --- a/ci/Jenkinsfile.combined +++ b/ci/Jenkinsfile.combined @@ -1,4 +1,4 @@ -library 'status-jenkins-lib@v1.5.1' +library 'status-jenkins-lib@v1.5.6' pipeline { agent { label 'linux' } diff --git a/ci/Jenkinsfile.linux b/ci/Jenkinsfile.linux index de1ab73cca..5c3e5e9b48 100644 --- a/ci/Jenkinsfile.linux +++ b/ci/Jenkinsfile.linux @@ -1,4 +1,4 @@ -library 'status-jenkins-lib@v1.5.1' +library 'status-jenkins-lib@v1.5.6' pipeline { agent { @@ -59,7 +59,9 @@ pipeline { } stage('status-go') { - steps { sh 'make status-go' } + steps { + sh 'make status-go' + } } stage('Package') { diff --git a/ci/Jenkinsfile.linux-cpp b/ci/Jenkinsfile.linux-cpp index e6c30af945..75fee004df 100644 --- a/ci/Jenkinsfile.linux-cpp +++ b/ci/Jenkinsfile.linux-cpp @@ -1,4 +1,4 @@ -library 'status-jenkins-lib@v1.5.1' +library 'status-jenkins-lib@v1.5.6' pipeline { agent { diff --git a/ci/Jenkinsfile.macos b/ci/Jenkinsfile.macos index e116fda51e..314eef5b37 100644 --- a/ci/Jenkinsfile.macos +++ b/ci/Jenkinsfile.macos @@ -1,4 +1,4 @@ -library 'status-jenkins-lib@v1.5.1' +library 'status-jenkins-lib@v1.5.6' pipeline { agent { @@ -64,12 +64,14 @@ pipeline { } stage('status-go') { - steps { sh 'make status-go' } + steps { + sh 'make status-go' + } } stage('Package') { steps { script { - macos.bundle() + macos.bundle('pkg-macos') } } } diff --git a/ci/Jenkinsfile.mac-cpp.todo b/ci/Jenkinsfile.macos-cpp.todo similarity index 98% rename from ci/Jenkinsfile.mac-cpp.todo rename to ci/Jenkinsfile.macos-cpp.todo index a26df44ef2..7e8c16caa7 100644 --- a/ci/Jenkinsfile.mac-cpp.todo +++ b/ci/Jenkinsfile.macos-cpp.todo @@ -1,4 +1,4 @@ -library 'status-jenkins-lib@v1.5.1' +library 'status-jenkins-lib@v1.5.6' pipeline { agent { diff --git a/ci/Jenkinsfile.windows b/ci/Jenkinsfile.windows index 16073be510..c1ce1edf2f 100644 --- a/ci/Jenkinsfile.windows +++ b/ci/Jenkinsfile.windows @@ -1,4 +1,4 @@ -library 'status-jenkins-lib@v1.5.1' +library 'status-jenkins-lib@v1.5.6' pipeline { agent { label 'windows' } @@ -31,7 +31,7 @@ pipeline { environment { TARGET = 'windows' /* Improve make performance */ - MAKEFLAGS = "-j4 V=${params.VERBOSE}" + MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}" /* Disable colors in Nim compiler logs */ NIMFLAGS = '--colors:off' /* Control output the filename */ @@ -53,7 +53,9 @@ pipeline { } stage('status-go') { - steps { sh 'make status-go' } + steps { + sh 'make status-go' + } } stage('Package') { @@ -63,23 +65,29 @@ pipeline { } stage('Parallel Upload') { + /* Uploads on Windows are slow. */ parallel { - stage('Upload') { + stage('Upload 7Z') { steps { script { zip_url = s3.uploadArtifact(env.STATUS_CLIENT_7Z) - exe_url = s3.uploadArtifact(env.STATUS_CLIENT_EXE) - env.PKG_URL = exe_url - jenkins.setBuildDesc(Zip: zip_url, Exe: exe_url) } } } - stage('Archive') { + stage('Upload EXE') { steps { script { - archiveArtifacts(env.STATUS_CLIENT_EXE) - archiveArtifacts(env.STATUS_CLIENT_7Z) + exe_url = s3.uploadArtifact(env.STATUS_CLIENT_EXE) } } } } } + + stage('Archive') { + steps { script { + archiveArtifacts(env.STATUS_CLIENT_EXE) + archiveArtifacts(env.STATUS_CLIENT_7Z) + env.PKG_URL = exe_url + jenkins.setBuildDesc(Zip: zip_url, Exe: exe_url) + } } + } } post { success { script { github.notifyPR(true) } } diff --git a/ci/Jenkinsfile.windows-cpp.todo b/ci/Jenkinsfile.windows-cpp.todo index 826defe32c..67920d9596 100644 --- a/ci/Jenkinsfile.windows-cpp.todo +++ b/ci/Jenkinsfile.windows-cpp.todo @@ -1,4 +1,4 @@ -library 'status-jenkins-lib@v1.5.1' +library 'status-jenkins-lib@v1.5.6' pipeline { agent {