From ae0a017b50c71614d50c5d04429eeb171ed1a064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 21 Aug 2018 12:38:32 -0400 Subject: [PATCH] fix uploading to digitalocean --- ci/Jenkinsfile.combined | 10 +++++----- ci/common.groovy | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/Jenkinsfile.combined b/ci/Jenkinsfile.combined index f238f284d7..813b285e11 100644 --- a/ci/Jenkinsfile.combined +++ b/ci/Jenkinsfile.combined @@ -72,11 +72,11 @@ pipeline { stage('Upload') { when { expression { params.PUBLISH } } steps { script { - def pkg = "pkg/StatusIm-${GIT_COMMIT.take(6)}" - apkUrl = common.uploadArtifact("${pkg}.apk") - ipaUrl = common.uploadArtifact("${pkg}.ipa") - dmgUrl = common.uploadArtifact("${pkg}.dmg") - appUrl = common.uploadArtifact("${pkg}.AppImage") + def pkg = "StatusIm-${GIT_COMMIT.take(6)}" + apkUrl = common.uploadArtifact('pkg', "${pkg}.apk") + ipaUrl = common.uploadArtifact('pkg', "${pkg}.ipa") + dmgUrl = common.uploadArtifact('pkg', "${pkg}.dmg") + appUrl = common.uploadArtifact('pkg', "${pkg}.AppImage") } } } stage('Notify') { diff --git a/ci/common.groovy b/ci/common.groovy index 25e2091d18..f1fda97bc9 100644 --- a/ci/common.groovy +++ b/ci/common.groovy @@ -35,7 +35,7 @@ def tagBuild() { } } -def uploadArtifact(filename) { +def uploadArtifact(path, filename) { def domain = 'ams3.digitaloceanspaces.com' def bucket = 'status-im-desktop' withCredentials([usernamePassword( @@ -50,7 +50,7 @@ def uploadArtifact(filename) { --host-bucket='%(bucket)s.${domain}' \\ --access_key=${DO_ACCESS_KEY} \\ --secret_key=${DO_SECRET_KEY} \\ - put ${filename} s3://${bucket}/ + put ${path}/${filename} s3://${bucket}/ """ } def url = "https://${bucket}.${domain}/${filename}"