mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 03:26:31 +00:00
deploay apk to diawi
This commit is contained in:
parent
8d040aee11
commit
6a56b60085
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@ -38,16 +38,12 @@ node {
|
|||||||
sh 'cd android && ./gradlew assembleRelease'
|
sh 'cd android && ./gradlew assembleRelease'
|
||||||
}
|
}
|
||||||
stage('Deploy (Android)') {
|
stage('Deploy (Android)') {
|
||||||
def artifact_dir = pwd() + '/android/app/build/outputs/apk/'
|
withCredentials([string(credentialsId: 'diawi-token', variable: 'token')]) {
|
||||||
def artifact = new File(artifact_dir + 'app-release.apk')
|
def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@android/app/build/outputs/apk/app-release.apk -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim()
|
||||||
assert artifact.exists()
|
sh 'sleep 10'
|
||||||
def server = Artifactory.server('artifacts')
|
def hash = sh(returnStdout: true, script: "curl -vvv 'https://upload.diawi.com/status?token="+token+"&job="+job+"'|jq -r '.hash'").trim()
|
||||||
def shortCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim().take(6)
|
apkUrl = 'https://i.diawi.com/' + hash
|
||||||
def filename = 'im.status.ethereum-' + shortCommit + '.apk'
|
}
|
||||||
artifact.renameTo artifact_dir + filename
|
|
||||||
def uploadSpec = '{ "files": [ { "pattern": "*apk/' + filename + '", "target": "pull-requests" }]}'
|
|
||||||
def buildInfo = server.upload(uploadSpec)
|
|
||||||
apkUrl = 'http://artifacts.status.im:8081/artifactory/pull-requests/' + filename
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// try {
|
// try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user