use a table to post links to build artifacts
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
510961e333
commit
c825ff285a
4
Makefile
4
Makefile
|
@ -51,11 +51,11 @@ _prepare-mobile: ##@prepare Install mobile platform dependencies and prepare wor
|
|||
npm install
|
||||
|
||||
$(STATUS_GO_IOS_ARCH):
|
||||
cd $(RCTSTATUS_DIR) && curl -OL "$(GITHUB_URL)/$(STATUS_GO_VER)/status-go-ios.zip"
|
||||
cd $(RCTSTATUS_DIR) && curl -s -OL "$(GITHUB_URL)/$(STATUS_GO_VER)/status-go-ios.zip"
|
||||
|
||||
$(STATUS_GO_DRO_ARCH):
|
||||
mkdir -p $(ANDROID_LIBS_DIR)
|
||||
cd $(ANDROID_LIBS_DIR) && curl -o status-go-$(STATUS_GO_VER).aar -OL "$(GITHUB_URL)/$(STATUS_GO_VER)/status-go-android.aar"
|
||||
cd $(ANDROID_LIBS_DIR) && curl -s -o status-go-$(STATUS_GO_VER).aar -OL "$(GITHUB_URL)/$(STATUS_GO_VER)/status-go-android.aar"
|
||||
|
||||
prepare-ios: $(STATUS_GO_IOS_ARCH) _prepare-mobile ##@prepare Install and prepare iOS-specific dependencies
|
||||
cd $(RCTSTATUS_DIR) && unzip -q -o status-go-ios.zip
|
||||
|
|
|
@ -74,7 +74,6 @@ pipeline {
|
|||
steps { script {
|
||||
e2eUrl = cmn.uploadArtifact(cmn.pkgFind('e2e.apk'))
|
||||
apkUrl = cmn.uploadArtifact(cmn.pkgFind("${btype}.apk"))
|
||||
|
||||
if (btype != 'release') {
|
||||
dmgUrl = cmn.uploadArtifact(cmn.pkgFind('dmg'))
|
||||
appUrl = cmn.uploadArtifact(cmn.pkgFind('AppImage'))
|
||||
|
@ -102,8 +101,7 @@ pipeline {
|
|||
steps { script {
|
||||
if (env.CHANGE_ID != null) {
|
||||
cmn.githubNotify(
|
||||
apkUrl, e2eUrl, ipaUrl, dmgUrl, appUrl, zipUrl,
|
||||
env.CHANGE_ID
|
||||
apk: apkUrl, e2e: e2eUrl, ipa: ipaUrl, app: appUrl, dmg: dmgUrl, win: zipUrl,
|
||||
)
|
||||
}
|
||||
} }
|
||||
|
@ -129,10 +127,10 @@ pipeline {
|
|||
when { expression { btype == 'nightly' } }
|
||||
steps { script {
|
||||
e2eApk = e2e.getBuildVariables().get('SAUCE_URL')
|
||||
build(
|
||||
job: 'end-to-end-tests/status-app-nightly', wait: false,
|
||||
parameters: [string(name: 'apk', value: "--apk=${e2eApk}")]
|
||||
)
|
||||
build(
|
||||
job: 'end-to-end-tests/status-app-nightly', wait: false,
|
||||
parameters: [string(name: 'apk', value: "--apk=${e2eApk}")]
|
||||
)
|
||||
} }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,23 +4,31 @@ env.LC_ALL="en_US.UTF-8"
|
|||
env.FASTLANE_DISABLE_COLORS=1
|
||||
env.REALM_DISABLE_ANALYTICS=1
|
||||
|
||||
timeout(90) {
|
||||
node ('fastlane'){
|
||||
|
||||
stage('Git & Dependencies'){
|
||||
|
||||
checkout([$class: 'GitSCM', branches: [[name: 'develop']],
|
||||
doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanBeforeCheckout']],
|
||||
submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/status-im/status-react.git']]])
|
||||
|
||||
load "$HOME/env.groovy"
|
||||
timeout(120) {
|
||||
node ('macos') {
|
||||
stage('Git Checkout'){
|
||||
checkout([
|
||||
$class: 'GitSCM',
|
||||
branches: [[name: 'develop']],
|
||||
doGenerateSubmoduleConfigurations: false,
|
||||
extensions: [[$class: 'CleanBeforeCheckout']],
|
||||
submoduleCfg: [],
|
||||
userRemoteConfigs: [[url: 'https://github.com/status-im/status-react.git']]
|
||||
])
|
||||
}
|
||||
|
||||
stage('Clean Testflight Users'){
|
||||
stage('Install Deps'){
|
||||
sh ('bundle install')
|
||||
}
|
||||
|
||||
withCredentials([string(credentialsId: 'FASTLANE_PASSWORD', variable: 'FASTLANE_PASSWORD'),
|
||||
string(credentialsId: 'APPLE_ID', variable: 'APPLE_ID')]) {
|
||||
stage('Clean Users'){
|
||||
withCredentials([
|
||||
string(credentialsId: 'FASTLANE_PASSWORD', variable: 'FASTLANE_PASSWORD'),
|
||||
string(credentialsId: 'APPLE_ID', variable: 'APPLE_ID')]
|
||||
) {
|
||||
sh ('bundle install')
|
||||
sh ('bundle exec fastlane ios clean')}}
|
||||
sh ('bundle exec fastlane ios clean')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,31 +142,28 @@ def pkgFilename(type, ext) {
|
|||
}
|
||||
|
||||
|
||||
def githubNotify(apkUrl, e2eUrl, ipaUrl, dmgUrl, appUrl, zipUrl, changeId) {
|
||||
def githubNotify(Map urls) {
|
||||
def githubIssuesUrl = 'https://api.github.com/repos/status-im/status-react/issues'
|
||||
withCredentials([string(credentialsId: 'GIT_HUB_TOKEN', variable: 'githubToken')]) {
|
||||
def message = (
|
||||
"#### :white_check_mark: CI BUILD SUCCESSFUL\\n" +
|
||||
"Jenkins job: [${currentBuild.displayName}](${currentBuild.absoluteUrl})\\n"+
|
||||
"##### Mobile\\n" +
|
||||
"* [Android](${apkUrl}), ([e2e](${e2eUrl}))\\n" +
|
||||
"* [iOS](${ipaUrl})\\n")
|
||||
|
||||
if (dmgUrl != null && appUrl != null && zipUrl != null) {
|
||||
message = message +
|
||||
"##### Desktop\\n" +
|
||||
"* [MacOS](${dmgUrl})\\n" +
|
||||
"* [AppImage](${appUrl})\\n" +
|
||||
"* [Windows](${zipUrl})"
|
||||
def message = "#### :white_check_mark: [${currentBuild.displayName}](${currentBuild.absoluteUrl}) "
|
||||
message += "CI BUILD SUCCESSFUL in ${currentBuild.durationString} (${GIT_COMMIT})\n"
|
||||
message += '| | | | | |\n'
|
||||
message += '|-|-|-|-|-|\n'
|
||||
message += "| [Android](${urls.apk})([e2e](${urls.e2e})) | [iOS](${urls.ipa}) |"
|
||||
if (dmgUrl != null) {
|
||||
message += " [MacOS](${urls.dmg}) | [AppImage](${urls.app}) | [Windows](${urls.win}) |"
|
||||
} else {
|
||||
message += " ~~MacOS~~ | ~~AppImage~~ | ~~Windows~~~ |"
|
||||
}
|
||||
def script = (
|
||||
"curl "+
|
||||
"-u status-im:${githubToken} " +
|
||||
"-H 'Content-Type: application/json' " +
|
||||
"--data '{\"body\": \"${message}\"}' " +
|
||||
"https://api.github.com/repos/status-im/status-react/issues/${changeId}/comments"
|
||||
)
|
||||
def ghOutput = sh(returnStdout: true, script: script)
|
||||
println("Result of github comment curl: " + ghOutput);
|
||||
def msgObj = [body: message]
|
||||
def msgJson = new JsonBuilder(msgObj).toPrettyString()
|
||||
sh """
|
||||
curl --silent \
|
||||
-u status-im:${githubToken} \
|
||||
-H "Content-Type: application/json" \
|
||||
--data '${msgJson}' \
|
||||
"${githubIssuesUrl}/${env.CHANGE_ID}/comments"
|
||||
""".trim()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue