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>
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>
Changes:
- Add missing lazy assignment for OS_NAME, fixes double Nix shells
- Moved `scripts/add-nix-gcroots.sh` to `nix/scripts/gcroots.sh`
- Moved Nix package manager setup to `nix/scripts/setup.sh`
- Created `nix/scripts/source.sh` to reuse in all Nix scripts
- Created `STARTING_GUIDE.md` with instructions for contributors
- Created `scripts/colors.sh` for definition of shell colors
- Removed `scripts/setup` in favor of `nix/scripts/setup.sh`
- Removed all of `scripts/lib` since it was useless
Signed-off-by: Jakub Sokołowski <jakub@status.im>
There was some confusion when given ref/tag did not exist.
Script would just use the value as commit SHA1 even if it was not one.
Signed-off-by: Jakub Sokołowski <jakub@status.im>
And we have to trim the one used for Android.
For more details see:
>Warning: The greatest value Google Play allows for versionCode is 2100000000.
https://developer.android.com/studio/publish/versioning
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Changes:
- Adds a new `nix-gc` Makefile target for removing old packages
- Moves all `nix/*.sh` files to `nix/scripts/*.sh` to make things more tidy
- Renames `TARGET_OS` into `TARGET` and makes it effective only with `nix/scripts/shell.sh`
- Renames `target-os` Nix argument to just `target` and makes it effective only with `shell.nix`
- Drops `IN_CI_ENVIRONMENT` env variable which was useless
- Drops use of `target-os` argument outside of `shell.nix` (with few exceptions, but just in naming)
- `nix/platform.nix` has been made obsolete and removed
- Moves the definition of all major targets to `nix/targets.nix`
- Moves the definition of all major shells to `nix/shells.nix`
- Makes `default.nix` and `shell.nix` just thin wrappers around `nix/default.nix`
- `nix/nixpkgs-bootstrap.nix` has been moved to `nix/pkgs.nix`
- All package and tool overrides have been moved to `nix/pkgs.nix`
- Explicit passing of contents of `pkgs` has been removed in favor of `callPackage` doing it for us
- `nix/bootstrapped-shell.nix` has been moved to `nix/tools/mkShell.nix`
- A new `mergeSh` tool has been added to `pkgs` from `nix/tools/mergeSh.nix`
- This tool is used to merge shells created using `mkShell`
- `mobile/targets/jsbundle.nix` has been moved to `mobile/android/jsbundle/default.nix`
- Moves `status-go` version sanitization to `nix/status-go/utils.nix`
- Renames version to rawVersion and versionName to cleanVersion in status-go derivation
- Ports nix/mobile/ios/install-pods-and-status-go.sh to Nix sub-shells
- Moves adjustment of `inotify/max_user_watches` out into `scripts/inotify_fix.sh`
- Makes iOS builds use the Nix version of Fastlane
Signed-off-by: Jakub Sokołowski <jakub@status.im>
- Move `mobile_files` into `mobile/js_files`
- Move `desktop_files` into `desktop/js_files`
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
Fixes#8635 by adding VERSION and BUILD_NUMBER files in the correct nix
template and updating bash script in order to prevent it from failing,
due to the git repository being not initialized in the nix environment.
Move scripts/build_no.sh and scripts/gen_build_no.sh to
scripts/version/build_no.sh to prevent Nix from rebuilding when
unrelated scripts are touched.
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
- The makefile now defines environment variables for the Desktop debug environment that allows running side by side with release
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
- For Linux, the real fix is `hardeningDisable` of "fortify";
- For macOS, the real fix is setting the C and CXX compilers in `desktop/build.sh` as well as disabling CMake install step;
- Unfortunately for iOS we still need stdenvNoCC (or find a way to use GNU's ld instead of Apple's)
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
- Add Conan to default.nix
- Integrate Qt5 Nix package (with forked repo for new QtWebView module)
- Fix rpaths in macOS and Linux
- Add Nix expressions to install nsis, appimagekit and linuxdeployqt
With the change in status-go mobile the name of the artifact as changed
and currently the script is looking at the wrong file.
I have also added an option to not clean the repo (only if specified),
as I rarely want to clean the repo myself, and I have always to comment
it out.
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>