update script for nightly build
This commit is contained in:
parent
0d4cbd98e5
commit
900d4074bf
|
@ -4,16 +4,18 @@
|
||||||
env.LANG="en_US.UTF-8"
|
env.LANG="en_US.UTF-8"
|
||||||
env.LANGUAGE="en_US.UTF-8"
|
env.LANGUAGE="en_US.UTF-8"
|
||||||
env.LC_ALL="en_US.UTF-8"
|
env.LC_ALL="en_US.UTF-8"
|
||||||
node {
|
|
||||||
|
node ('macos1'){
|
||||||
def apkUrl = ''
|
def apkUrl = ''
|
||||||
def ipaUrl = ''
|
def ipaUrl = ''
|
||||||
def testPassed = true
|
def testPassed = true
|
||||||
|
|
||||||
sh 'source /etc/profile'
|
load "$HOME/env.groovy"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
stage('Git & Dependencies') {
|
stage('Git & Dependencies') {
|
||||||
|
slackSend color: 'good', message: 'Nightly build started. ' + env.BUILD_URL
|
||||||
git([url: 'https://github.com/status-im/status-react.git', branch: 'develop'])
|
git([url: 'https://github.com/status-im/status-react.git', branch: 'develop'])
|
||||||
// Checkout master because used for iOS Plist version information
|
// Checkout master because used for iOS Plist version information
|
||||||
sh 'git checkout -- .'
|
sh 'git checkout -- .'
|
||||||
|
@ -42,17 +44,19 @@ node {
|
||||||
|
|
||||||
stage('Build (iOS)') {
|
stage('Build (iOS)') {
|
||||||
sh 'export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration release -archivePath status clean archive'
|
sh 'export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration release -archivePath status clean archive'
|
||||||
sh 'xcodebuild -exportArchive -exportPath status -archivePath status.xcarchive -exportOptionsPlist /Users/Xcloud/archive.plist'
|
sh 'xcodebuild -exportArchive -exportPath status -archivePath status.xcarchive -exportOptionsPlist ~/archive.plist'
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy (Android)') {
|
stage('Deploy (Android)') {
|
||||||
def artifact_dir = pwd() + '/android/app/build/outputs/apk/'
|
def artifact_dir = pwd() + '/android/app/build/outputs/apk/'
|
||||||
def artifact = new File(artifact_dir + 'app-release.apk')
|
println (artifact_dir + 'app-release.apk')
|
||||||
assert artifact.exists()
|
sh ('ls -la ' + artifact_dir)
|
||||||
|
def artifact = (artifact_dir + 'app-release.apk')
|
||||||
def server = Artifactory.server('artifacts')
|
def server = Artifactory.server('artifacts')
|
||||||
def shortCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim().take(6)
|
def shortCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim().take(6)
|
||||||
def filename = 'im.status.ethereum-' + shortCommit + '.apk'
|
def filename = 'im.status.ethereum-' + shortCommit + '.apk'
|
||||||
artifact.renameTo artifact_dir + filename
|
def newArtifact = (artifact_dir + filename)
|
||||||
|
sh ('mv ' + artifact + ' ' + newArtifact)
|
||||||
def uploadSpec = '{ "files": [ { "pattern": "*apk/' + filename + '", "target": "nightlies-local" }]}'
|
def uploadSpec = '{ "files": [ { "pattern": "*apk/' + filename + '", "target": "nightlies-local" }]}'
|
||||||
def buildInfo = server.upload(uploadSpec)
|
def buildInfo = server.upload(uploadSpec)
|
||||||
apkUrl = 'http://artifacts.status.im:8081/artifactory/nightlies-local/' + filename
|
apkUrl = 'http://artifacts.status.im:8081/artifactory/nightlies-local/' + filename
|
||||||
|
|
Loading…
Reference in New Issue