use password for the right host, run before xcodebuild

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
Jakub Sokołowski 2018-08-09 08:37:36 -04:00 committed by Igor Mandrigin
parent c70e7a48b2
commit e8c43e2a2c
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
2 changed files with 10 additions and 6 deletions

View File

@ -74,14 +74,15 @@ timeout(90) {
} }
stage('Build (iOS)') { stage('Build (iOS)') {
withCredentials([ withCredentials([string(
string(credentialsId: 'jenkins_pass', variable: 'password') credentialsId: "slave-pass-${env.NODE_NAME}",
]) { variable: 'password'
)]) {
sh "plutil -replace CFBundleShortVersionString -string ${version} ios/StatusIm/Info.plist" sh "plutil -replace CFBundleShortVersionString -string ${version} ios/StatusIm/Info.plist"
sh "plutil -replace CFBundleVersion -string ${build_no} ios/StatusIm/Info.plist" sh "plutil -replace CFBundleVersion -string ${build_no} ios/StatusIm/Info.plist"
env.RCT_NO_LAUNCH_PACKAGER = true env.RCT_NO_LAUNCH_PACKAGER = true
sh 'xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration release -archivePath status clean archive'
sh "security unlock-keychain -p ${password} login.keychain" sh "security unlock-keychain -p ${password} login.keychain"
sh 'xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration release -archivePath status clean archive'
sh 'xcodebuild -exportArchive -exportPath status_appstore -archivePath status.xcarchive -exportOptionsPlist ios/archive-release.plist' sh 'xcodebuild -exportArchive -exportPath status_appstore -archivePath status.xcarchive -exportOptionsPlist ios/archive-release.plist'
sh 'xcodebuild -exportArchive -exportPath status -archivePath status.xcarchive -exportOptionsPlist ios/archive-develop.plist' sh 'xcodebuild -exportArchive -exportPath status -archivePath status.xcarchive -exportOptionsPlist ios/archive-develop.plist'
} }

View File

@ -74,12 +74,15 @@ timeout(90) {
} }
stage('Build (iOS)') { stage('Build (iOS)') {
withCredentials([string(credentialsId: 'jenkins_pass', variable: 'password')]) { withCredentials([string(
credentialsId: "slave-pass-${env.NODE_NAME}",
variable: 'password'
)]) {
sh "plutil -replace CFBundleShortVersionString -string ${version} ios/StatusIm/Info.plist" sh "plutil -replace CFBundleShortVersionString -string ${version} ios/StatusIm/Info.plist"
sh "plutil -replace CFBundleVersion -string ${build_no} ios/StatusIm/Info.plist" sh "plutil -replace CFBundleVersion -string ${build_no} ios/StatusIm/Info.plist"
env.RCT_NO_LAUNCH_PACKAGER = true env.RCT_NO_LAUNCH_PACKAGER = true
sh 'xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration release -archivePath status clean archive'
sh "security unlock-keychain -p ${password} login.keychain" sh "security unlock-keychain -p ${password} login.keychain"
sh 'xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration release -archivePath status clean archive'
sh 'xcodebuild -exportArchive -exportPath status_appstore -archivePath status.xcarchive -exportOptionsPlist ios/archive-release.plist' sh 'xcodebuild -exportArchive -exportPath status_appstore -archivePath status.xcarchive -exportOptionsPlist ios/archive-release.plist'
} }
} }