diff --git a/ci/Jenkinsfile.android b/ci/Jenkinsfile.android index ff7734a214..6bcbd3e671 100644 --- a/ci/Jenkinsfile.android +++ b/ci/Jenkinsfile.android @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' /* Options section can't access functions in objects. */ def isPRBuild = utils.isPRBuild() @@ -71,7 +71,7 @@ pipeline { } stage('Upload') { steps { script { - def urls = apks.collect { s3.uploadArtifact(it) } + def urls = apks.collect { s5cmd.upload(it) } if (urls.size() > 1) { /* Return only the universal APK. */ env.PKG_URL = urls.find { it.contains('universal') } } else { /* If no universal is available pick first. */ diff --git a/ci/Jenkinsfile.combined b/ci/Jenkinsfile.combined index d0cd069c77..399034884e 100644 --- a/ci/Jenkinsfile.combined +++ b/ci/Jenkinsfile.combined @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' pipeline { agent { label 'linux' } @@ -72,7 +72,7 @@ pipeline { iOS: utils.pkgUrl(ios), Diawi: utils.getEnv(ios, 'DIAWI_URL'), /* upload the sha256 checksums file too */ - SHA: s3.uploadArtifact(sha), + SHA: s5cmd.upload(sha), ] /* add URLs to the build description */ jenkins.setBuildDesc(urls) @@ -83,7 +83,7 @@ pipeline { steps { script { switch (utils.getBuildType()) { case 'nightly': /* Create JSON file with newest build URLs */ - s3.updateBucketJSON(urls, 'latest.json'); + updateBucketJSON(urls, 'latest.json'); break; case 'release': github.publishReleaseFiles(repo: 'status-mobile'); @@ -114,3 +114,22 @@ def Boolean getPublishDefault(Boolean previousValue) { if (previousValue != null) { return previousValue } return false } + +/* Helper for updating JSON with newest builds. */ +def updateBucketJSON(urls, fileName) { + /* latest.json has slightly different key names */ + def content = [ + DIAWI: urls.Diawi, + APK: urls.Apk, IOS: urls.iOS, + APP: urls.App, MAC: urls.Mac, + WIN: urls.Win, SHA: urls.SHA + ] + def filePath = "${pwd()}/pkg/${fileName}" + /* it might not exist */ + sh "mkdir -p ${pwd()}/pkg" + def contentJson = new JsonBuilder(content).toPrettyString() + println "${filePath}:\n${contentJson}" + writeFile(file: filePath, text: contentJson) + return s5cmd.upload(filePath) +} + diff --git a/ci/Jenkinsfile.e2e-nightly b/ci/Jenkinsfile.e2e-nightly index 443fb49f26..188c04df01 100644 --- a/ci/Jenkinsfile.e2e-nightly +++ b/ci/Jenkinsfile.e2e-nightly @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' pipeline { agent { label 'linux' } diff --git a/ci/Jenkinsfile.ios b/ci/Jenkinsfile.ios index 0a31672c56..d2a8f9debf 100644 --- a/ci/Jenkinsfile.ios +++ b/ci/Jenkinsfile.ios @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' /* Options section can't access functions in objects. */ def isPRBuild = utils.isPRBuild() diff --git a/ci/Jenkinsfile.tests b/ci/Jenkinsfile.tests index 59d125ef5a..0a9b9af0bf 100644 --- a/ci/Jenkinsfile.tests +++ b/ci/Jenkinsfile.tests @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' /* Options section can't access functions in objects. */ def isPRBuild = utils.isPRBuild() @@ -75,7 +75,7 @@ pipeline { stage('Upload') { steps { script { - env.PKG_URL = s3.uploadArtifact(LOG_FILE) + env.PKG_URL = s5cmd.upload(LOG_FILE) } } } diff --git a/ci/tests/Jenkinsfile.e2e-nightly b/ci/tests/Jenkinsfile.e2e-nightly index 9c17a6d254..c550e7853d 100644 --- a/ci/tests/Jenkinsfile.e2e-nightly +++ b/ci/tests/Jenkinsfile.e2e-nightly @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' pipeline { diff --git a/ci/tests/Jenkinsfile.e2e-prs b/ci/tests/Jenkinsfile.e2e-prs index 4dcf06b32a..8bca86ecf9 100644 --- a/ci/tests/Jenkinsfile.e2e-prs +++ b/ci/tests/Jenkinsfile.e2e-prs @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' pipeline { diff --git a/ci/tests/Jenkinsfile.e2e-upgrade b/ci/tests/Jenkinsfile.e2e-upgrade index eeb9771bec..4672f76a34 100644 --- a/ci/tests/Jenkinsfile.e2e-upgrade +++ b/ci/tests/Jenkinsfile.e2e-upgrade @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' pipeline { diff --git a/ci/tools/Jenkinsfile.fastlane-clean b/ci/tools/Jenkinsfile.fastlane-clean index ff61eb14c8..eeb136d1d6 100644 --- a/ci/tools/Jenkinsfile.fastlane-clean +++ b/ci/tools/Jenkinsfile.fastlane-clean @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' pipeline { agent { label 'macos' } diff --git a/ci/tools/Jenkinsfile.nix-cache b/ci/tools/Jenkinsfile.nix-cache index a638d96bea..1f738de0c4 100644 --- a/ci/tools/Jenkinsfile.nix-cache +++ b/ci/tools/Jenkinsfile.nix-cache @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' pipeline { agent { label params.AGENT_LABEL } diff --git a/ci/tools/Jenkinsfile.playstore-meta b/ci/tools/Jenkinsfile.playstore-meta index 8775f78fff..5ee22d2d94 100644 --- a/ci/tools/Jenkinsfile.playstore-meta +++ b/ci/tools/Jenkinsfile.playstore-meta @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' pipeline { agent { label 'linux' } diff --git a/ci/tools/Jenkinsfile.xcode-clean b/ci/tools/Jenkinsfile.xcode-clean index 3f168b4c12..7409674d98 100644 --- a/ci/tools/Jenkinsfile.xcode-clean +++ b/ci/tools/Jenkinsfile.xcode-clean @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.8.12' +library 'status-jenkins-lib@v1.9.1' pipeline { agent {