Commit Graph

318 Commits

Author SHA1 Message Date
Jakub Sokołowski 0b8c673094
ci: fix iOS signing, use same keychain name
Using different temporary keychains does not work if we do not set
`default_keychain=true`, because `codesign` then can't find the cert:
```
error: No signing certificate "iOS Distribution" found: No "iOS Distribution" signing certificate matching team ID
```
But if we set `default_keychain=true` then we cause a race condition
when the keychain is deleted by a parallel job while another is using it
as its default.

For this reason we have to use a static keychain name and keep it
between builds.

I tried disabling `default_keychain=true` in #11378 but it worked only
because the default user keychain already had the cert.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2020-11-17 10:16:32 +01:00
Churikova Tetiana 6b4f2901ae
reduce number of parallel sessions
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2020-11-13 15:29:35 +01:00
Serhy 473c5135b2
Update number of parallel sessions to align with Sauce
Signed-off-by: Serhy <sergii@status.im>
2020-11-09 21:32:20 +02:00
Jakub Sokołowski 3b780f4ff2
fastlane: Create temporary Keychain for iOS signing
This is a new approach to signing the iOS app by using a temporary
Keychain created only for that specific build and unlocked in advance.

By doing it this way we can avoid issues with `errSecInternalComponent`
appearing when there is no UI to open a Keychain password prompt when
running build in CI. I've described this problem in details in:
https://github.com/fastlane/fastlane/issues/15185

Thanks to `codesign:` partition ID being added to key partition list by
Fastlane `match` when importing a Keychain this approach now works:
https://github.com/fastlane/fastlane/pull/17456

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-11-03 00:03:38 +01:00
Jakub Sokołowski c4cac2cef7
fix availability of INFURA_TOKEN for Android build
The env variable `INFURA_TOKEN` is used at build time of JS bundle, not
the final APK file. We never passed the `secretsFile` to the
derivation for JS bundle so it never saw the `INFURA_TOKEN`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-05 16:36:05 +02:00
Jakub Sokołowski 93ed3eb7ff
ci: add public download url to build description
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-01 17:32:10 +02:00
Jakub Sokołowski c866082cde
ci: use more buckets for different builds
* `status-im-releases` for release builds
* `status-im-nightlies` for nightlies

I want to reserve the `status-im` bucket for use with the site.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-09-28 20:10:14 +02:00
Jakub Sokołowski eeff44eea7
ci: fix Android release builds not splitting ABIs
This was caused by Groovy script logic not checking `params.BUILT_TYPE`.

Related: https://github.com/status-im/status-react-jenkins/pull/14

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-10 14:48:23 +02:00
Jakub Sokołowski f904d7b543
nix: add --console=plain to gradle call
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-06 14:34:07 +02:00
Jakub Sokołowski 7a80eca73c
jenkin: fix GitHub releases
Specifically filenames and the diff link.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-06 14:28:21 +02:00
Jakub Sokołowski 95997530c6
jenkins: increase iOS build timeout to 25 minutes
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-04 10:34:32 +02:00
Jakub Sokołowski 84286782f6
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>
2020-07-13 12:13:47 +02:00
Jakub Sokołowski 7d7462356e
ci: lower build timeouts to 20 minutes
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-08 12:33:33 +02:00
Jakub Sokołowski 112132aa94
drop all desktop related files and references
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-08 10:26:51 +02:00
Jakub Sokołowski b95056f3ce
ci: fix what version is set for iOS PR builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-06 09:47:39 +02:00
Gheorghe Pinzaru d916751160
Add PR Scheme for iOs build
Build PR Scheme in PR build

use named parameters, use pr_build boolean

Signed-off-by: Jakub Sokołowski <jakub@status.im>

Enable capabilities

Signed-off-by: Jakub Sokołowski <jakub@status.im>

Add custom app icon

Remove user defined profile

Add PR scheme

Explicit provide provisioning profiles

Fix pr schema

Bump jenkins

Pod bump

Describe pr_build argument

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-06-29 16:16:35 +03:00
Jakub Sokołowski c943f5f283
nix: upgrade xcode 11.4.1 to 11.5
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-29 10:00:00 +02:00
Jakub Sokołowski 41e04b9555
disable play store release
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-23 17:17:50 +02:00
Andrea Maria Piana 1714970e4e
Use Infura token pulled from environment
This way we can use different token for e2e, release, and devel builds.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2020-06-19 19:26:40 +02:00
Jakub Sokołowski 284c26055f
update Jenkins library to allow vebose Fastlane calls
For more details see status-react-jenkins change:
https://github.com/status-im/status-react-jenkins/pull/7

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-02 18:50:43 +02:00
Jakub Sokołowski 2fcf0964f8
nix: fix nix-cache builds using wrong status-go targets
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-16 15:31:15 +02:00
Jakub Sokołowski ed4d0a1ed9
nix: refactor updating Gradle dependencies
changes:
- Moved Gradle deps setup to `nix/deps/gradle`
- Dropped `nix/mobile/android/maven-and-npm-deps/maven`
- Used GNU Parallel to optimize `nix/deps/gradle/generate.sh`
- Move Maven+Node shell setup from `release-android.nix` to Android shell
- Moved AAPT2 patching to `nix/pkgs/aapt2`
- Drop `patchPhase` and `gradlew` use from `release-android.nix`
- Simplify symlinking `{mobile,desktop}/js_files/*`
- Add new `nodejs` shell and merge it with `clojure` and `gradle`
- Re-created Gradle deps files with new scripts:
  - `nix/deps/gradle/proj.list`
  - `nix/deps/gradle/deps.list`
  - `nix/deps/gradle/deps.urls`
  - `nix/deps/gradle/deps.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:30 +02:00
Jakub Sokołowski a96b35996f
drop scripts/copy-translations.sh as useless
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:22 +02:00
Jakub Sokołowski 157d054e33
jenkins: allow combined jobs to copy artifacts
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-12 09:14:49 +02:00
Gheorghe Pinzaru c34df26e19
Move icons assets into resources
Fix logout icon usage

Update icons docs

Remove scripting

change jenkins

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-05-08 14:12:52 +03:00
Jakub Sokołowski 3ae5f87be3
ci: add Jenkinsfile for updating Play Store metadata
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-05 19:40:45 +02:00
yenda d5ef218584
use shadow-cljs
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: yenda <eric@status.im>
2020-04-30 15:43:46 +02:00
Jakub Sokołowski 7b6b620ceb
nix: use overlays instead of packageOverrides
Changes:
- Add `nix/DETAILS.md` for more in-depth info
- Rename some of `config.status-im` variables
- Drop `env` argument for Android build
- Use `overlays` instead of `packageOverrides`
- Move the `pkgs` overlay to `nix/overlay.nix`
- Move `nix/status-go/utils.nix` to `nix/tools`
- Make `shell.nix` use the `shells.default` only
- Use `default.nix` as target for `nix/scripts/shell.sh`
- Make `nix/scripts/shell.sh` use `--attr` instead of `target`
- Drop the `target` argument in favour of using `--attr`
- Drop unnecessary `src` from `nix/mobile/ios/default.nix`
- Move `mkShell` and `mergeSh` under `lib`
- Move `patched-go` package to `nix/pkgs` directory
- Move `gomobile` package to `nix/pkgs` directory
- Move `ANDROID_ABI_SPLIT` to `config.status-im.android.abi-split`
- Move `ANDROID_ABI_INCLUDE to `config.status-im.android.abi-include`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-29 11:53:33 +02:00
Churikova Tetiana d9862e2cef
upgrade e2e
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2020-04-22 13:17:03 +02:00
Jakub Sokołowski d68b757589
upgrade Xcode to 11.4.1
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-16 22:13:47 +02:00
Jakub Sokołowski 035e07f7be
upgrade to Xcode 11.4
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-16 12:56:03 +02:00
Jakub Sokołowski 5fab3268bd
allow lint stage fail in CI and still upload build result
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-27 09:19:46 +01:00
Jakub Sokołowski efc2fa9cf2
use the proper source of publish method
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-25 17:10:24 +01:00
Jakub Sokołowski 0306f1cfbd
ci: re-add Play Store upload case for release
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-25 11:17:06 +01:00
Jakub Sokołowski 4a7c03b1cc
avoid building jsbundle twice, drop jsbundle stage
Because we run nix/scripts/clean.sh after building JSBundle it is
removed from Nix store and can't be reused in the Bundle stage.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-17 22:11:54 +01:00
Jakub Sokołowski 4e567cf782
use status-react-jenkins as CI library
This PR extracts all the ci/*.groovy scripts into a separate private repo located at:
https://github.com/status-im/status-react-jenkins

The main reasons for a separate repo are:

* Hiding the internal details of our CI setup
* Hiding names of Jenkins credentials available in CI jobs
* Lowering attack surface for malicious external contributors
* Increasing focus on PRs related to CI setup

You can read more about how Jenkins pipeline shared libraries work here:
https://jenkins.io/doc/book/pipeline/shared-libraries/

In simple terms I've added the repo to the main Jenkins configuration in "Global Pipeline Libraries" section and load it using:

  library 'status-react-jenkins@master'

Which makes globally available all of the libraries defined in the `vars` directory of that repo.
This also eliminates the need for statements like `android = load 'ci/android.groovy'`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-11 19:11:36 +01:00
Jakub Sokołowski 8b3c7f29b2
fix bundle install by disabling Nix sandbox
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-06 12:36:25 +01:00
Jakub Sokołowski de53581ef4
nix: don't generate keystore inside of Nix build
changes:
- Stops scripts/generate-keystore.sh runnig for every new TARGET=android shell
- Moves running scripts/generate-keystore.sh to keystore Makefile target
- Makes generate-keystore.sh accept STATUS_RELEASE_STORE_FILE as env variable
- Fixes error about missing lsof from start-react-native.sh
- Fixes error about unknown -keystore command in scripts/generate-keystore.sh
- Fixes getting OS_NAME without calling Nix shell
- Fixes getting TMP_BUILD_NUMBER without calling Nix shell
- Adds lsof used in start-react-native.sh to Android release Nix derivation
- Simplified how nix/scripts/build.sh appends the --keep flag
- Made use of colors.sh in more scripts

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-05 10:56:54 +01:00
Jakub Sokołowski efa420def4
disable playstore upload
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2020-03-05 10:52:19 +01:00
Jakub Sokołowski 8ac20b442e
don't use sandbox for Nix Cache builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-29 12:28:40 +01:00
Jakub Sokołowski 001264bd1a
fix creation of pkg folder for latest.json
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-28 15:07:53 +01:00
Jakub Sokołowski 8abea59196
don't use Jenkins master host for combined jobs
This lowers the risk of someone extracting sensitive data from master.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-27 17:58:19 +01:00
Jakub Sokołowski cb78293db7
use Android keystore from Jenkins credentials
This way we don't have to store it on individual CI hosts.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-27 06:54:28 +01:00
Jakub Sokołowski 1c81d6e190
nix: force sandbox in CI
For more details see:
https://github.com/status-im/security-internal/blob/master/overview/infra.md#continuous-integration-ci

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-26 11:10:19 +01:00
Jakub Sokołowski 90bae33689
e2e: fix handling of GitHub token
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2020-02-24 14:58:09 +01:00
Churikova Tetiana b8c7e44326
fix e2e
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2020-02-24 12:32:08 +01:00
Jakub Sokołowski 8ffbf61b79
e2e-tests: update GitHub token used
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-18 20:50:21 +01:00
Jakub Sokołowski 3d52d1cb9c
jenkins: build() doesn't like mixed arguments
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-14 17:53:02 +01:00
Jakub Sokołowski dc0d0b59cb
re-enable site updates on nightly builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-12 20:55:25 +01:00
Jakub Sokołowski 128f44f58b
fastlane: disable oldest_build_allowed for TestFlight clean
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-01-29 15:58:17 +01:00