Fixes #3456: Publish diawi links in relevant PR
This commit is contained in:
parent
8369afdddc
commit
89632bea1b
|
@ -58,12 +58,16 @@ node ('macos1') {
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy (Android)') {
|
stage('Deploy (Android)') {
|
||||||
withCredentials([string(credentialsId: 'diawi-token', variable: 'token')]) {
|
withCredentials([string(credentialsId: 'diawi-token', variable: 'token'), string(credentialsId: 'GIT_HUB_TOKEN', variable: 'githubToken')] ) {
|
||||||
def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@android/app/build/outputs/apk/release/app-release.apk -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim()
|
def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@android/app/build/outputs/apk/release/app-release.apk -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim()
|
||||||
sh 'sleep 10'
|
sh 'sleep 10'
|
||||||
def hash = sh(returnStdout: true, script: "curl -vvv 'https://upload.diawi.com/status?token="+token+"&job="+job+"'|jq -r '.hash'").trim()
|
def hash = sh(returnStdout: true, script: "curl -vvv 'https://upload.diawi.com/status?token="+token+"&job="+job+"'|jq -r '.hash'").trim()
|
||||||
apkUrl = 'https://i.diawi.com/' + hash
|
apkUrl = 'https://i.diawi.com/' + hash
|
||||||
|
|
||||||
|
def commentMsg = "apk uploaded to " + apkUrl + " for branch " + BRANCH_NAME
|
||||||
|
def ghOutput = sh(returnStdout: true, script: "curl -u status-im:" + githubToken + " -H 'Content-Type: application/json' --data '{\"body\": \"" + commentMsg + "\"}' https://api.github.com/repos/status-im/status-react/issues/" + CHANGE_ID + "/comments")
|
||||||
|
println("Result of github comment curl: " + ghOutput)
|
||||||
|
|
||||||
sh ('echo ARTIFACT Android: ' + apkUrl)
|
sh ('echo ARTIFACT Android: ' + apkUrl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,12 +79,16 @@ node ('macos1') {
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy (iOS)') {
|
stage('Deploy (iOS)') {
|
||||||
withCredentials([string(credentialsId: 'diawi-token', variable: 'token')]) {
|
withCredentials([string(credentialsId: 'diawi-token', variable: 'token'), string(credentialsId: 'GIT_HUB_TOKEN', variable: 'githubToken')]) {
|
||||||
def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@status/StatusIm.ipa -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim()
|
def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@status/StatusIm.ipa -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim()
|
||||||
sh 'sleep 10'
|
sh 'sleep 10'
|
||||||
def hash = sh(returnStdout: true, script: "curl -vvv 'https://upload.diawi.com/status?token="+token+"&job="+job+"'|jq -r '.hash'").trim()
|
def hash = sh(returnStdout: true, script: "curl -vvv 'https://upload.diawi.com/status?token="+token+"&job="+job+"'|jq -r '.hash'").trim()
|
||||||
ipaUrl = 'https://i.diawi.com/' + hash
|
ipaUrl = 'https://i.diawi.com/' + hash
|
||||||
|
|
||||||
|
def commentMsg = "ipa uploaded to " + ipaUrl + " for branch " + BRANCH_NAME
|
||||||
|
def ghOutput = sh(returnStdout: true, script: "curl -u status-im:" + githubToken + " -H 'Content-Type: application/json' --data '{\"body\": \"" + commentMsg + "\"}' https://api.github.com/repos/status-im/status-react/issues/" + CHANGE_ID + "/comments")
|
||||||
|
println("Result of github comment curl: " + ghOutput)
|
||||||
|
|
||||||
sh ('echo ARTIFACT iOS: ' + ipaUrl)
|
sh ('echo ARTIFACT iOS: ' + ipaUrl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue