Unverified Commit 95fce90c authored by Denis_P's avatar Denis_P 🏑 Committed by GitHub
Browse files

CI: workaraound for variable not passed to after_script (#2256)

parent c385b486
Pipeline #119939 passed with stages
in 30 minutes and 38 seconds
...@@ -180,28 +180,28 @@ check-transaction-versions: ...@@ -180,28 +180,28 @@ check-transaction-versions:
script: script:
- scripts/gitlab/check_extrinsics_ordering.sh - scripts/gitlab/check_extrinsics_ordering.sh
.build-linux: &build-linux .pack-artifacts: &pack-artifacts
<<: *collect-artifacts - mkdir -p ./artifacts
<<: *docker-env - VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name
<<: *compiler-info - mv ./target/release/polkadot ./artifacts/.
after_script: - sha256sum ./artifacts/polkadot | tee ./artifacts/polkadot.sha256
- mv ./target/release/polkadot ./artifacts/. - if [ "${CI_COMMIT_TAG}" ]; then
- sha256sum ./artifacts/polkadot | tee ./artifacts/polkadot.sha256 EXTRATAG="latest";
- if [ "${CI_COMMIT_TAG}" ]; then else
EXTRATAG="latest"; EXTRATAG="$(./artifacts/polkadot --version |
else sed -n -r 's/^polkadot ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p')";
EXTRATAG="$(./artifacts/polkadot --version | EXTRATAG="${CI_COMMIT_REF_NAME}-${EXTRATAG}-$(cut -c 1-8 ./artifacts/polkadot.sha256)";
sed -n -r 's/^polkadot ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p')"; fi
EXTRATAG="${CI_COMMIT_REF_NAME}-${EXTRATAG}-$(cut -c 1-8 ./artifacts/polkadot.sha256)"; - echo "Polkadot version = ${VERSION} (EXTRATAG ${EXTRATAG})"
fi - echo -n ${VERSION} > ./artifacts/VERSION
- echo "Polkadot version = ${VERSION} (EXTRATAG ${EXTRATAG})" - echo -n ${EXTRATAG} > ./artifacts/EXTRATAG
- echo -n ${VERSION} > ./artifacts/VERSION - cp -r scripts/docker/* ./artifacts
- echo -n ${EXTRATAG} > ./artifacts/EXTRATAG
- cp -r scripts/docker/* ./artifacts
build-linux-release: build-linux-release:
stage: build stage: build
<<: *build-linux <<: *collect-artifacts
<<: *docker-env
<<: *compiler-info
rules: rules:
# .rules-test with manual on PRs # .rules-test with manual on PRs
- if: $PIPELINE == "rococo" - if: $PIPELINE == "rococo"
...@@ -211,21 +211,21 @@ build-linux-release: ...@@ -211,21 +211,21 @@ build-linux-release:
allow_failure: true allow_failure: true
- when: always - when: always
script: script:
- mkdir -p ./artifacts
- VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name
- time cargo build --release --verbose - time cargo build --release --verbose
- sccache -s - sccache -s
- *pack-artifacts
build-linux-rococo: build-linux-rococo:
stage: build stage: build
<<: *build-linux <<: *collect-artifacts
<<: *docker-env
<<: *compiler-info
rules: rules:
- if: $PIPELINE == "rococo" - if: $PIPELINE == "rococo"
script: script:
- mkdir -p ./artifacts
- VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name
- time cargo build --release --verbose --features=real-overseer - time cargo build --release --verbose --features=real-overseer
- sccache -s - sccache -s
- *pack-artifacts
generate-impl-guide: generate-impl-guide:
stage: build stage: build
...@@ -261,7 +261,7 @@ generate-impl-guide: ...@@ -261,7 +261,7 @@ generate-impl-guide:
--tag "$IMAGE_NAME:$EXTRATAG" . --tag "$IMAGE_NAME:$EXTRATAG" .
# The job will success only on the protected branch # The job will success only on the protected branch
- echo "$Docker_Hub_Pass_Parity" | - echo "$Docker_Hub_Pass_Parity" |
buildah login --username "$Docker_Hub_User_Parity" --password-stdin docker.io buildah login --username "$Docker_Hub_User_Parity" --password-stdin docker.io
- buildah info - buildah info
- buildah push --format=v2s2 "$IMAGE_NAME:$VERSION" - buildah push --format=v2s2 "$IMAGE_NAME:$VERSION"
- buildah push --format=v2s2 "$IMAGE_NAME:$EXTRATAG" - buildah push --format=v2s2 "$IMAGE_NAME:$EXTRATAG"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment