Commit Graph

82 Commits

Author SHA1 Message Date
Jakub Sokołowski cf9f160de9
ci: nicer artifact filenames for release builds
Depends on: https://github.com/status-im/status-jenkins-lib/pull/24

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-04-28 17:25:39 +02:00
Jakub Sokołowski 594c83013c
ci: upgrade jenkins lib to 1.2.12 to generalize GH release
This is required to also ad GitHub releases to `status-desktop`.

Also renamed `status-react-jenkins` to `status-jenkins-lib` for clarity.

Depends on: https://github.com/status-im/status-react-jenkins/pull/23

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-04-19 11:47:34 +02:00
Jakub Sokołowski 2e94e0e765
ci: rename folder to match status-desktop naming
Part of re-organization related to release builds for desktop.

See:
- https://github.com/status-im/status-react/pull/11992
- https://ci.status.im/job/status-desktop/

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-04-19 11:47:25 +02:00
Jakub Sokołowski f0d79f3af0
ci: adjust behavior of PUBLISH to be true for releases
Otherwise release builds never create the GitHub draft releases.
Not unless a user explicitly stats a build with `PUBLISH: true`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-02-23 13:45:25 +01:00
Jakub Sokołowski d946d473c6 fastlane: use Apple Store Connect API for CI builds
Because our CI Apple account still has 2FA disabled in order for it to
be usable in Jenkin it is now failing with an error that seems unrelated
to 2FA.

The recommended way of doing Apple authentication for CI are App Store
Connect API JWTs. The API appears to support both pushing builds as well as
updating metadata and other tasks like refreshing of provisioning
profiles.

Fixes: https://github.com/status-im/status-react/issues/11713
Issue: https://github.com/fastlane/fastlane/issues/18098
Docs: https://docs.fastlane.tools/app-store-connect-api/

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-02-04 15:10:07 +01:00
Jakub Sokołowski 9889e80bbd
ci: parametrize publishing, make BUILD_TYPE a choice
This changes the behavior of mobile combined builds to not publish
the results of `nightly` or `release` builds unless `PUBLISH`
parameter is set to `true`.

It also makes the `BUILD_TYPE` into a dropdown choice field with
pre-defined values, like `manual` or `e2e`.

Changes:
- Add parameter definitions for `BUILD_TYPE` and `PUBLISH`
- Move uploading of `latest.json` to `Publish` stage
- Make `Publish` stage optional based on the `PUBLISH` parameter

Requires: https://github.com/status-im/status-react-jenkins/pull/21

Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2021-01-08 12:54:17 +01:00
Jakub Sokołowski 458ef05740
bump jenkins library to 1.2.8 to add keychain password
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-12-02 19:34:10 +01:00
Jakub Sokołowski b62ff59f16
ci: make GitHub build links use CDN for downloads
Should speed up downloads for some geographical locations.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-12-02 15:53:17 +01:00
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
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 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 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
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 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
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 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
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 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 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 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 f6b7f637f0
disable desktop builds as work on them is on hold
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-26 16:30:21 +01:00
Vitaliy Vlasov f28fd8fc9c
customize TMPDIR and clean it
Also:
- parallelize upload and achive stages
- fix s3cmd uploads for combined Jenkinsfile
- fix failing TestFlight clean job

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-18 09:40:11 +02:00
Jakub Sokołowski afc2412514
desktop builds need GnuPG
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-17 11:03:41 +02:00
Volodymyr Kozieiev ace4b5a161
Desktop works with react-navigation v3
Signed-off-by: Volodymyr Kozieiev <vkjr.sp@gmail.com>
2019-10-02 10:19:37 +03:00
Jakub Sokołowski 00de482767
re-enable desktop builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-09-19 17:41:50 +03:00
Jakub Sokołowski a79544d043
forgot to disable desktop stuff in other steps
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-08-10 02:17:04 -04:00
Jakub Sokołowski c49e4933ee
disable desktop builds for now
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-08-08 15:12:22 -04:00
Jakub Sokołowski cca2af6875
don't provide --apk=, it's already there
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-03 08:16:00 -04:00
Jakub Sokołowski 7c1df4f3cd
fix load of github groovy module
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-06-11 07:43:46 -04:00
Jakub Sokołowski 55abf20645
modify .env settings using Jenkins params
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2019-04-11 19:49:13 +02:00
Jakub Sokołowski 0887a5299a
add github releases for mobile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-03-07 19:16:15 +01:00
Jakub Sokołowski 6ff36b5dd5
fix missing cmn. prefix
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-03-06 15:49:20 +01:00
Jakub Sokołowski f67ee8db56
upload release.json for release builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-03-06 14:52:26 +01:00
Jakub Sokołowski 9b3580fafe
ci: disable copying artifacts and using non-existent url
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2019-03-01 09:52:10 +01:00
Jakub Sokołowski fd59e76603
ci: use legacy build system to avoid xcode 10.1 issues
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2019-03-01 09:16:03 +01:00
Jakub Sokołowski fab20ffc35
copying from wrong job for nightlies
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-01-23 10:51:21 +01:00
Jakub Sokołowski 3acc480428
use separate jobs for e2e builds, disable aborting for non-pr builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-01-22 14:28:30 +01:00
Jakub Sokołowski 420a64e72d
don't update cn.status.im on every release build
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-01-15 17:22:03 +01:00
Jakub Sokołowski 3cfec19757
fix link used for Macs
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2018-12-13 18:09:04 +01:00
Jakub Sokołowski 2586e71b30
move upload step top platform specific builds, cleanup
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2018-12-12 14:12:17 +01:00