Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Add possibility to run .cicd scripts from different environments (2.0.x Backport) #8972

Merged
merged 1 commit into from Apr 17, 2020

Conversation

maoueh
Copy link
Contributor

@maoueh maoueh commented Apr 17, 2020

Change Description

Backport to release/2.0.x branch of PR #8865

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

### With FORCE_LINUX=true, you can run the Docker version in `build.sh` an `package.sh` scripts

When running the scripts from Mac OS X, it was always picking up the Darwin conditional
paths in the script. `FORCE_LINUX=true` can be used on a Mac OS X environment to run
the scripts.

### Fix shell expansion in `package.sh`

In the packaging script, there is a Docker pre command that add executable bit permission
on *.sh scripts in the `build/packages` folder. However, without the escaping, the shell
expansion was performed in the `package.sh` script execution directly instead of being
delayed so that the expansion is performed inside the `docker run` call!

I suspect this worked in your CI system because execution of `package.sh` in performed in
such way that filesystem layout of `package.sh` and filesystem layout of `docker run` were
the same and as such, the expanded `chmod 755 file1.sh file2.sh` command was correctly
working inside the container.

The shell expansion via the `*` is now escaped which correctly delays the expansion until
it's in the `docker run` execution environment.

### Conditional buildkite-agent upload

Now, the upload task is performed only  if BUILDKITE env is set to `true`, so it's possible
to run the script without having to upload the actual package.
@heifner heifner merged commit b5597f3 into EOSIO:release/2.0.x Apr 17, 2020
@maoueh maoueh deleted the feature/build-packages-2.0.x branch April 17, 2020 22:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants