|
|
@@ -3,7 +3,7 @@ |
|
|
@Library('cliqz-shared-library@vagrant') _ |
|
|
|
|
|
properties([ |
|
|
disableConcurrentBuilds(), |
|
|
disableConcurrentBuilds(), |
|
|
[$class: 'JobRestrictionProperty'] |
|
|
]) |
|
|
node('mac-vm-host') { |
|
|
@@ -12,7 +12,7 @@ node('mac-vm-host') { |
|
|
writeFile file: 'Vagrantfile', text: ''' |
|
|
Vagrant.configure("2") do |config| |
|
|
config.vm.box = "browser-ios-v300" |
|
|
|
|
|
|
|
|
config.vm.define "publishios" do |publishios| |
|
|
publishios.vm.hostname ="publishios" |
|
|
|
|
|
@@ -54,77 +54,78 @@ node('mac-vm-host') { |
|
|
stage('Checkout') { |
|
|
checkout scm |
|
|
} |
|
|
|
|
|
stage('Prepare') { |
|
|
sh '''#!/bin/bash -l |
|
|
brew install getsentry/tools/sentry-cli |
|
|
set -e |
|
|
set -x |
|
|
java -version |
|
|
node -v |
|
|
npm -v |
|
|
yarn -v |
|
|
xcodebuild -version |
|
|
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables |
|
|
sudo xcodebuild -license accept |
|
|
brew -v |
|
|
npm -g install yarn |
|
|
rm -rf Cartfile.resolved Carthage node_modules Podfile.lock Pods |
|
|
./bootstrap.sh --force |
|
|
yarn install |
|
|
pod install |
|
|
pip install virtualenv |
|
|
sudo /usr/bin/easy_install virtualenv |
|
|
''' |
|
|
} |
|
|
|
|
|
stage('Build & Upload') { |
|
|
withCredentials([ |
|
|
[ |
|
|
$class : 'UsernamePasswordMultiBinding', |
|
|
credentialsId : '85859bba-4927-4b14-bfdf-aca726009962', |
|
|
passwordVariable: 'GITHUB_PASSWORD', |
|
|
usernameVariable: 'GITHUB_USERNAME', |
|
|
], |
|
|
string(credentialsId: 'c9d7aaae-25ee-4b74-b03f-d50312c53edd', variable: 'ITUNES_USER'), |
|
|
string(credentialsId: 'c033c0cc-a707-4a5d-aa5f-efccdd28c654', variable: 'SentryDSN'), |
|
|
string(credentialsId: 'd373025a-dc98-4fba-a2e3-da21e2011972', variable: 'FASTLANE_PASSWORD'), |
|
|
string(credentialsId: '9d4b5abb-a0ab-4d8b-85b7-cf380485da7c', variable: 'MATCH_PASSWORD'), |
|
|
string(credentialsId: 'f206e880-e09a-4369-a3f6-f86ee94481f2', variable: 'SENTRY_AUTH_TOKEN'), |
|
|
string(credentialsId: 'd9dc5c33-beef-402e-93d2-376a722a9766', variable: 'FASTLANE_ITC_TEAM_ID')]) |
|
|
{ |
|
|
try { |
|
|
stage('Prepare') { |
|
|
sh '''#!/bin/bash -l |
|
|
set -x |
|
|
brew install getsentry/tools/sentry-cli |
|
|
set -e |
|
|
rm -rf /Users/vagrant/Library/Keychains/ios-build.keychain* |
|
|
rm -rf ../build-tools |
|
|
fastlane importLocalizations |
|
|
set -x |
|
|
java -version |
|
|
node -v |
|
|
npm -v |
|
|
brew -v |
|
|
xcodebuild -version |
|
|
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables |
|
|
sudo xcodebuild -license accept |
|
|
fastlane clearCache |
|
|
fastlane prepare |
|
|
pip install virtualenv |
|
|
sudo /usr/bin/easy_install virtualenv |
|
|
''' |
|
|
if("${branchName}".contains("-beta")){ |
|
|
sh '''#!/bin/bash -l |
|
|
set -x |
|
|
set -e |
|
|
export MATCH_KEYCHAIN_NAME=ios-build.keychain |
|
|
fastlane beta |
|
|
''' |
|
|
} |
|
|
else if ("${branchName}".contains("-r")){ |
|
|
} |
|
|
|
|
|
stage('Build & Upload') { |
|
|
withCredentials([ |
|
|
[ |
|
|
$class : 'UsernamePasswordMultiBinding', |
|
|
credentialsId : '85859bba-4927-4b14-bfdf-aca726009962', |
|
|
passwordVariable: 'GITHUB_PASSWORD', |
|
|
usernameVariable: 'GITHUB_USERNAME', |
|
|
], |
|
|
string(credentialsId: 'c9d7aaae-25ee-4b74-b03f-d50312c53edd', variable: 'ITUNES_USER'), |
|
|
string(credentialsId: 'c033c0cc-a707-4a5d-aa5f-efccdd28c654', variable: 'SentryDSN'), |
|
|
string(credentialsId: 'd373025a-dc98-4fba-a2e3-da21e2011972', variable: 'FASTLANE_PASSWORD'), |
|
|
string(credentialsId: '9d4b5abb-a0ab-4d8b-85b7-cf380485da7c', variable: 'MATCH_PASSWORD'), |
|
|
string(credentialsId: 'f206e880-e09a-4369-a3f6-f86ee94481f2', variable: 'SENTRY_AUTH_TOKEN'), |
|
|
string(credentialsId: 'd9dc5c33-beef-402e-93d2-376a722a9766', variable: 'FASTLANE_ITC_TEAM_ID')]) |
|
|
{ |
|
|
sh '''#!/bin/bash -l |
|
|
set -x |
|
|
set -e |
|
|
export MATCH_KEYCHAIN_NAME=ios-build.keychain |
|
|
fastlane release |
|
|
set -e |
|
|
rm -rf /Users/vagrant/Library/Keychains/ios-build.keychain* |
|
|
rm -rf ../build-tools |
|
|
fastlane importLocalizations |
|
|
''' |
|
|
if("${branchName}".contains("-beta")){ |
|
|
sh '''#!/bin/bash -l |
|
|
set -x |
|
|
set -e |
|
|
export MATCH_KEYCHAIN_NAME=ios-build.keychain |
|
|
fastlane beta |
|
|
''' |
|
|
} |
|
|
else if ("${branchName}".contains("-r")){ |
|
|
sh '''#!/bin/bash -l |
|
|
set -x |
|
|
set -e |
|
|
export MATCH_KEYCHAIN_NAME=ios-build.keychain |
|
|
fastlane release |
|
|
''' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
stage("Clean Up"){ |
|
|
sh '''#!/bin/bash -l |
|
|
set -x |
|
|
set -e |
|
|
rm -rf Cartfile.resolved Carthage node_modules Podfile.lock Pods |
|
|
''' |
|
|
catch(all){ |
|
|
print "Something Failed. Check the above logs." |
|
|
} |
|
|
finally { |
|
|
stage("Clean Up"){ |
|
|
sh '''#!/bin/bash -l |
|
|
set -x |
|
|
set -e |
|
|
fastlane clearCache |
|
|
''' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|