mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-24 15:38:56 +00:00
bump status-react-jenkins to 1.2.0
This updates a bunch of things in the Jenkins logic. For details of that see: https://github.com/status-im/status-react-jenkins/pull/12 It grew out of the changes I made to make PR builds available in Desktop client: https://github.com/status-im/nim-status-client/pull/507 Changes: - Bump `status-react-jenkins` library to newer version, probably `1.2.0` - Update use of `utils.pkgFilename()` in `ci/Jenkinsfile.combined` - Make all iOS builds go into the same folder: `status-ios` - Drop e2e build type, infer it from Android ABIs set to `x86` only - Simplify logic in `nix/mobile/android/release.nix.` Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
ba0ae149ad
commit
84286782f6
@ -1,4 +1,4 @@
|
|||||||
library 'status-react-jenkins@v1.1.10'
|
library 'status-react-jenkins@v1.2.0'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
@ -101,12 +101,11 @@ pipeline {
|
|||||||
} else { /* if no universal is available pick first */
|
} else { /* if no universal is available pick first */
|
||||||
env.PKG_URL = urls.first()
|
env.PKG_URL = urls.first()
|
||||||
}
|
}
|
||||||
/* build type specific */
|
if (utils.isNightlyBuild()) {
|
||||||
switch (btype) {
|
env.DIAWI_URL = android.uploadToDiawi()
|
||||||
case 'nightly':
|
}
|
||||||
env.DIAWI_URL = android.uploadToDiawi(); break;
|
if (utils.isE2EBuild()) {
|
||||||
case 'e2e':
|
env.SAUCE_URL = android.uploadToSauceLabs()
|
||||||
env.SAUCE_URL = android.uploadToSauceLabs(); break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
library 'status-react-jenkins@v1.1.10'
|
library 'status-react-jenkins@v1.2.0'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
@ -44,9 +44,10 @@ pipeline {
|
|||||||
//jenkins.copyArts(iose2e)
|
//jenkins.copyArts(iose2e)
|
||||||
jenkins.copyArts(apk)
|
jenkins.copyArts(apk)
|
||||||
jenkins.copyArts(apke2e)
|
jenkins.copyArts(apke2e)
|
||||||
|
sha = "pkg/${utils.pkgFilename('sha256')}"
|
||||||
dir('pkg') {
|
dir('pkg') {
|
||||||
/* generate sha256 checksums for upload */
|
/* generate sha256 checksums for upload */
|
||||||
sh "sha256sum * | tee ${utils.pkgFilename(btype, 'sha256')}"
|
sh "sha256sum * | tee ../${sha}"
|
||||||
archiveArtifacts('*')
|
archiveArtifacts('*')
|
||||||
}
|
}
|
||||||
} }
|
} }
|
||||||
@ -60,7 +61,7 @@ pipeline {
|
|||||||
iOS: utils.pkgUrl(ios), /*iOSe2e: utils.pkgUrl(iose2e),*/
|
iOS: utils.pkgUrl(ios), /*iOSe2e: utils.pkgUrl(iose2e),*/
|
||||||
Diawi: utils.utils.getEnv(ios, 'DIAWI_URL'),
|
Diawi: utils.utils.getEnv(ios, 'DIAWI_URL'),
|
||||||
/* upload the sha256 checksums file too */
|
/* upload the sha256 checksums file too */
|
||||||
SHA: s3.uploadArtifact(utils.pkgFind('sha256')),
|
SHA: s3.uploadArtifact(sha),
|
||||||
]
|
]
|
||||||
/* add URLs to the build description */
|
/* add URLs to the build description */
|
||||||
jenkins.setBuildDesc(urls)
|
jenkins.setBuildDesc(urls)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
library 'status-react-jenkins@v1.1.10'
|
library 'status-react-jenkins@v1.2.0'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'macos-xcode-11.5' }
|
agent { label 'macos-xcode-11.5' }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
library 'status-react-jenkins@v1.1.10'
|
library 'status-react-jenkins@v1.2.0'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label params.AGENT_LABEL }
|
agent { label params.AGENT_LABEL }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
library 'status-react-jenkins@v1.1.10'
|
library 'status-react-jenkins@v1.2.0'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'macos' }
|
agent { label 'macos' }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
library 'status-react-jenkins@v1.1.10'
|
library 'status-react-jenkins@v1.2.0'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
|
@ -82,7 +82,7 @@ def upload_to_saucelabs(file)
|
|||||||
end
|
end
|
||||||
|
|
||||||
# builds an ios app with ad-hoc configuration and put it
|
# builds an ios app with ad-hoc configuration and put it
|
||||||
# to "status-adhoc" output folder
|
# to "status-ios" output folder
|
||||||
# `readonly`:
|
# `readonly`:
|
||||||
# if true - only fetch existing certificates and profiles, don't upgrade from AppStoreConnect
|
# if true - only fetch existing certificates and profiles, don't upgrade from AppStoreConnect
|
||||||
# if false - read list of devices from AppStoreConnect, and upgrade the provisioning profiles from it
|
# if false - read list of devices from AppStoreConnect, and upgrade the provisioning profiles from it
|
||||||
@ -110,7 +110,7 @@ def build_ios_adhoc(readonly: false, pr_build: false)
|
|||||||
clean: true,
|
clean: true,
|
||||||
export_method: 'ad-hoc',
|
export_method: 'ad-hoc',
|
||||||
output_name: 'StatusIm',
|
output_name: 'StatusIm',
|
||||||
output_directory: 'status-adhoc',
|
output_directory: 'status-ios',
|
||||||
export_options: {
|
export_options: {
|
||||||
signingStyle: 'manual',
|
signingStyle: 'manual',
|
||||||
provisioningProfiles: {
|
provisioningProfiles: {
|
||||||
@ -122,7 +122,7 @@ def build_ios_adhoc(readonly: false, pr_build: false)
|
|||||||
end
|
end
|
||||||
|
|
||||||
# builds an ios app with e2e configuration and put it
|
# builds an ios app with e2e configuration and put it
|
||||||
# to "status-e2e" output folder
|
# to "status-ios" output folder
|
||||||
def build_ios_e2e
|
def build_ios_e2e
|
||||||
# determine a simulator SDK installed
|
# determine a simulator SDK installed
|
||||||
showsdks_output = sh('xcodebuild', '-showsdks')
|
showsdks_output = sh('xcodebuild', '-showsdks')
|
||||||
@ -144,7 +144,7 @@ def build_ios_e2e
|
|||||||
# it looks like i386 isn't supported by React Native
|
# it looks like i386 isn't supported by React Native
|
||||||
xcargs: 'ARCHS="x86_64" ONLY_ACTIVE_ARCH=NO',
|
xcargs: 'ARCHS="x86_64" ONLY_ACTIVE_ARCH=NO',
|
||||||
# 3. directory where to up StatusIm.app
|
# 3. directory where to up StatusIm.app
|
||||||
derived_data_path: 'status-e2e',
|
derived_data_path: 'status-ios',
|
||||||
output_name: 'StatusIm.app',
|
output_name: 'StatusIm.app',
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
# Normal stuff
|
# Normal stuff
|
||||||
@ -158,8 +158,8 @@ def build_ios_e2e
|
|||||||
)
|
)
|
||||||
|
|
||||||
zip(
|
zip(
|
||||||
path: 'status-e2e/Build/Products/Release-iphonesimulator/StatusIm.app',
|
path: 'status-ios/Build/Products/Release-iphonesimulator/StatusIm.app',
|
||||||
output_path: 'status-e2e/StatusIm.app.zip',
|
output_path: 'status-ios/StatusIm.app.zip',
|
||||||
verbose: false
|
verbose: false
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -222,7 +222,7 @@ platform :ios do
|
|||||||
configuration: 'Release',
|
configuration: 'Release',
|
||||||
clean: true,
|
clean: true,
|
||||||
export_method: 'app-store',
|
export_method: 'app-store',
|
||||||
output_directory: 'status_appstore',
|
output_directory: 'status-ios',
|
||||||
include_symbols: false,
|
include_symbols: false,
|
||||||
export_options: {
|
export_options: {
|
||||||
"combileBitcode": true,
|
"combileBitcode": true,
|
||||||
@ -231,7 +231,7 @@ platform :ios do
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
upload_to_testflight(
|
upload_to_testflight(
|
||||||
ipa: 'status_appstore/StatusIm.ipa',
|
ipa: 'status-ios/StatusIm.ipa',
|
||||||
skip_waiting_for_build_processing: true
|
skip_waiting_for_build_processing: true
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -246,14 +246,14 @@ platform :ios do
|
|||||||
end
|
end
|
||||||
|
|
||||||
desc '`fastlane ios upload-diawi` - upload .ipa to diawi'
|
desc '`fastlane ios upload-diawi` - upload .ipa to diawi'
|
||||||
desc 'expects to have an .ipa prepared: `status-adhoc/StatusIm.ipa`'
|
desc 'expects to have an .ipa prepared: `status-ios/StatusIm.ipa`'
|
||||||
desc 'expects to have a diawi token as DIAWI_TOKEN env variable'
|
desc 'expects to have a diawi token as DIAWI_TOKEN env variable'
|
||||||
desc 'expects to have a github token as GITHUB_TOKEN env variable'
|
desc 'expects to have a github token as GITHUB_TOKEN env variable'
|
||||||
desc "will fails if file isn't there"
|
desc "will fails if file isn't there"
|
||||||
desc '---'
|
desc '---'
|
||||||
desc 'Output: writes `fastlane/diawi.out` file url of the uploded file'
|
desc 'Output: writes `fastlane/diawi.out` file url of the uploded file'
|
||||||
lane :upload_diawi do
|
lane :upload_diawi do
|
||||||
ipa = ENV['DIAWI_IPA'] || 'status-adhoc/StatusIm.ipa'
|
ipa = ENV['DIAWI_IPA'] || 'status-ios/StatusIm.ipa'
|
||||||
upload_to_diawi(ipa)
|
upload_to_diawi(ipa)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -266,7 +266,7 @@ platform :ios do
|
|||||||
desc "will fails if file isn't there"
|
desc "will fails if file isn't there"
|
||||||
lane :saucelabs do
|
lane :saucelabs do
|
||||||
upload_to_saucelabs(
|
upload_to_saucelabs(
|
||||||
'status-e2e/StatusIm.app.zip'
|
'status-ios/StatusIm.app.zip'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -17,11 +17,13 @@ assert (lib.stringLength watchmanSockPath) > 0 -> stdenv.isDarwin;
|
|||||||
let
|
let
|
||||||
inherit (lib)
|
inherit (lib)
|
||||||
toLower optionalString stringLength assertMsg
|
toLower optionalString stringLength assertMsg
|
||||||
getConfig makeLibraryPath assertEnvVarSet;
|
getConfig makeLibraryPath assertEnvVarSet elem;
|
||||||
|
|
||||||
buildType = getConfig "build-type" "prod";
|
buildType = getConfig "build-type" "release";
|
||||||
buildNumber = getConfig "build-number" 9999;
|
buildNumber = getConfig "build-number" 9999;
|
||||||
gradleOpts = getConfig "android.gradle-opts" null;
|
gradleOpts = getConfig "android.gradle-opts" null;
|
||||||
|
# Used to detect end-to-end builds
|
||||||
|
androidAbiInclude = getConfig "android.abi-include" "armeabi-v7a;arm64-v8a;x86";
|
||||||
# Keystore can be provided via config and extra-sandbox-paths.
|
# Keystore can be provided via config and extra-sandbox-paths.
|
||||||
# If it is not we use an ad-hoc one generated with default password.
|
# If it is not we use an ad-hoc one generated with default password.
|
||||||
keystorePath = getConfig "android.keystore-path" keystore;
|
keystorePath = getConfig "android.keystore-path" keystore;
|
||||||
@ -29,15 +31,14 @@ let
|
|||||||
baseName = "release-android";
|
baseName = "release-android";
|
||||||
name = "status-react-build-${baseName}";
|
name = "status-react-build-${baseName}";
|
||||||
|
|
||||||
envFileName = if (buildType == "release" || buildType == "nightly" || buildType == "e2e")
|
envFileName =
|
||||||
then ".env.${buildType}"
|
if (elem buildType ["release" "nightly"]) then ".env.${buildType}"
|
||||||
else if buildType != "" then ".env.jenkins"
|
else if androidAbiInclude == "x86" then ".env.e2e"
|
||||||
|
else if (elem buildType ["pr" "manual"]) then ".env.jenkins"
|
||||||
else ".env";
|
else ".env";
|
||||||
|
|
||||||
# There are only two types of Gradle builds: pr and release
|
# There are only two types of Gradle build targets: pr and release
|
||||||
gradleBuildType = if (buildType == "pr" || buildType == "e2e")
|
gradleBuildType = if buildType == "pr" then "Pr" else "Release";
|
||||||
then "Pr"
|
|
||||||
else "Release"; # PR builds shouldn't replace normal releases
|
|
||||||
|
|
||||||
apksPath = "./android/app/build/outputs/apk/${toLower gradleBuildType}";
|
apksPath = "./android/app/build/outputs/apk/${toLower gradleBuildType}";
|
||||||
patchedWatchman = watchmanFactory watchmanSockPath;
|
patchedWatchman = watchmanFactory watchmanSockPath;
|
||||||
@ -72,7 +73,7 @@ in stdenv.mkDerivation rec {
|
|||||||
# custom env variables derived from config
|
# custom env variables derived from config
|
||||||
STATUS_GO_SRC_OVERRIDE = getConfig "nimbus.src-override" null;
|
STATUS_GO_SRC_OVERRIDE = getConfig "nimbus.src-override" null;
|
||||||
ANDROID_ABI_SPLIT = getConfig "android.abi-split" "false";
|
ANDROID_ABI_SPLIT = getConfig "android.abi-split" "false";
|
||||||
ANDROID_ABI_INCLUDE = getConfig "android.abi-include" "armeabi-v7a;arm64-v8a;x86";
|
ANDROID_ABI_INCLUDE = androidAbiInclude;
|
||||||
|
|
||||||
# Android SDK/NDK for use by Gradle
|
# Android SDK/NDK for use by Gradle
|
||||||
ANDROID_SDK_ROOT = "${androidPkgs}";
|
ANDROID_SDK_ROOT = "${androidPkgs}";
|
||||||
@ -93,7 +94,7 @@ in stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
# Ensure we have the right .env file
|
# Ensure we have the right .env file
|
||||||
cp -f ./${envFileName} ./.env
|
cp -bf ./${envFileName} ./.env
|
||||||
|
|
||||||
# Copy index.js and app/ input files
|
# Copy index.js and app/ input files
|
||||||
cp -ra --no-preserve=ownership ${jsbundle}/* ./
|
cp -ra --no-preserve=ownership ${jsbundle}/* ./
|
||||||
|
Loading…
x
Reference in New Issue
Block a user