Skip to content

Commit

Permalink
Set WASM_BUILD_WORKSPACE_HINT before starting CI jobs (paritytech#12816)
Browse files Browse the repository at this point in the history
* set WASM_BUILD_WORKSPACE_HINT

this enables wasm-builder to find the Cargo.lock from within generated packages

* wip: try out paritytech/pipeline-scripts#90

* wip: fixup

* wip

* revert ci skip

* set up WASM_BUILD_WORKSPACE_HINT for .kubernetes-env as well

* Update scripts/ci/gitlab/pipeline/publish.yml

Co-authored-by: Alexander Samusev <[email protected]>

Co-authored-by: Alexander Samusev <[email protected]>
  • Loading branch information
2 people authored and ark0f committed Feb 27, 2023
1 parent f45dda7 commit 8f57f5a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ default:
paths:
- artifacts/

.prepare-env:
before_script:
# TODO: remove unset invocation when we'll be free from 'ENV RUSTC_WRAPPER=sccache' & sccache
# itself in all images
- unset RUSTC_WRAPPER
# $WASM_BUILD_WORKSPACE_HINT enables wasm-builder to find the Cargo.lock from within generated
# packages
- export WASM_BUILD_WORKSPACE_HINT="$PWD"

.job-switcher:
before_script:
- if echo "$CI_DISABLED_JOBS" | grep -xF "$CI_JOB_NAME"; then echo "The job has been cancelled in CI settings"; exit 0; fi
Expand All @@ -89,6 +98,7 @@ default:
image: "${CI_IMAGE}"
before_script:
- !reference [.job-switcher, before_script]
- !reference [.prepare-env, before_script]
tags:
- kubernetes-parity-build

Expand All @@ -115,9 +125,8 @@ default:
.docker-env:
image: "${CI_IMAGE}"
before_script:
# TODO: remove unset invocation when we'll be free from 'ENV RUSTC_WRAPPER=sccache' & sccache itself in all images
- unset RUSTC_WRAPPER
- !reference [.job-switcher, before_script]
- !reference [.prepare-env, before_script]
- !reference [.rust-info-script, script]
- !reference [.rusty-cachier, before_script]
- !reference [.pipeline-stopper-vars, script]
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/gitlab/pipeline/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
DOCKERFILE: $PRODUCT.Dockerfile
IMAGE_NAME: docker.io/$IMAGE_PATH
before_script:
- !reference [.job-switcher, before_script]
- !reference [.kubernetes-env, before_script]
- cd ./artifacts/$PRODUCT/
- VERSION="$(cat ./VERSION)"
- echo "${PRODUCT} version = ${VERSION}"
Expand Down

0 comments on commit 8f57f5a

Please sign in to comment.