fix uploading to digitalocean

This commit is contained in:
Jakub Sokołowski 2018-08-21 12:38:32 -04:00
parent a0e7dc65c4
commit ae0a017b50
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 7 additions and 7 deletions

View File

@ -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') {

View File

@ -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}"