upload a latest.json to the nightlies bucket
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
014d564e72
commit
d2160e3701
|
@ -80,12 +80,14 @@ pipeline {
|
||||||
ipaUrl = ios.getBuildVariables().get('DIAWI_URL')
|
ipaUrl = ios.getBuildVariables().get('DIAWI_URL')
|
||||||
/* add URLs to the build description */
|
/* add URLs to the build description */
|
||||||
cmn.setBuildDesc(
|
cmn.setBuildDesc(
|
||||||
Apk: apkUrl,
|
Apk: apkUrl, e2e: e2eUrl, iOS: ipaUrl, App: appUrl, Mac: dmgUrl,
|
||||||
e2e: e2eUrl,
|
|
||||||
iOS: ipaUrl,
|
|
||||||
App: appUrl,
|
|
||||||
Mac: dmgUrl
|
|
||||||
)
|
)
|
||||||
|
/* Create latest.json with newest nightly URLs */
|
||||||
|
if (btype == 'nightly') {
|
||||||
|
cmn.updateLatestNightlies(
|
||||||
|
APK: apkUrl, IOS: ipaUrl, APP: appUrl, MAC: dmgUrl
|
||||||
|
)
|
||||||
|
}
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
stage('Notify') {
|
stage('Notify') {
|
||||||
|
@ -108,7 +110,7 @@ pipeline {
|
||||||
[name: 'APK_URL', value: apkUrl, $class: 'StringParameterValue'],
|
[name: 'APK_URL', value: apkUrl, $class: 'StringParameterValue'],
|
||||||
[name: 'IOS_URL', value: ipaUrl, $class: 'StringParameterValue'],
|
[name: 'IOS_URL', value: ipaUrl, $class: 'StringParameterValue'],
|
||||||
[name: 'DMG_URL', value: dmgUrl, $class: 'StringParameterValue'],
|
[name: 'DMG_URL', value: dmgUrl, $class: 'StringParameterValue'],
|
||||||
[name: 'NIX_URL', value: appUrl, $class: 'StringParameterValue']
|
[name: 'NIX_URL', value: appUrl, $class: 'StringParameterValue'],
|
||||||
]
|
]
|
||||||
); break
|
); break
|
||||||
case 'release':
|
case 'release':
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import groovy.json.JsonBuilder
|
||||||
|
|
||||||
def version() {
|
def version() {
|
||||||
return readFile("${env.WORKSPACE}/VERSION").trim()
|
return readFile("${env.WORKSPACE}/VERSION").trim()
|
||||||
}
|
}
|
||||||
|
@ -181,6 +183,16 @@ def setBuildDesc(Map links) {
|
||||||
currentBuild.description = desc
|
currentBuild.description = desc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def updateLatestNightlies(Map links) {
|
||||||
|
def latestFile = pwd() + '/' + 'pkg/latest.json'
|
||||||
|
/* it might not exist */
|
||||||
|
sh 'mkdir -p pkg'
|
||||||
|
def latestJson = new JsonBuilder(links).toPrettyString()
|
||||||
|
println("latest.json:\n${latestJson}")
|
||||||
|
new File(latestFile).write(latestJson)
|
||||||
|
return uploadArtifact(latestFile)
|
||||||
|
}
|
||||||
|
|
||||||
def getParentRunEnv(name) {
|
def getParentRunEnv(name) {
|
||||||
def c = currentBuild.rawBuild.getCause(hudson.model.Cause$UpstreamCause)
|
def c = currentBuild.rawBuild.getCause(hudson.model.Cause$UpstreamCause)
|
||||||
if (c == null) { return null }
|
if (c == null) { return null }
|
||||||
|
|
Loading…
Reference in New Issue