From f5640ed5a864e701d029c48537d8bd7e7156df1a Mon Sep 17 00:00:00 2001 From: TriplEight Date: Sat, 25 May 2019 13:34:38 +0200 Subject: [PATCH] show rust version (#269) * new image, show rust version * show rust version, fix metadata --- polkadot/.gitlab-ci.yml | 38 +++++++++++++----------------- polkadot/scripts/docker/Dockerfile | 2 +- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/polkadot/.gitlab-ci.yml b/polkadot/.gitlab-ci.yml index ce1fc364b3..ab7c19d4c9 100644 --- a/polkadot/.gitlab-ci.yml +++ b/polkadot/.gitlab-ci.yml @@ -19,22 +19,18 @@ variables: GIT_STRATEGY: fetch CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}" SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache" - SCCACHE_CACHE_SIZE: 50G CI_SERVER_NAME: "GitLab CI" DOCKER_OS: "debian:stretch" ARCH: "x86_64" - .collect-artifacts: &collect-artifacts artifacts: name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" when: on_success expire_in: 7 days paths: - - artifacts/ - - + - artifacts/ .kubernetes-build: &kubernetes-build tags: @@ -42,6 +38,11 @@ variables: environment: name: parity-build +.compiler_info: &compiler_info + before_script: + - rustup show + - cargo --version + - sccache -s #### stage: merge-test @@ -64,6 +65,7 @@ check-merge-conflict: test-linux-stable: &test stage: test + <<: *compiler_info variables: RUST_TOOLCHAIN: stable # Enable debug assertions since we are running optimized builds for testing @@ -81,37 +83,31 @@ test-linux-stable: &test except: variables: - $DEPLOY_TAG - before_script: - - sccache -s - - ./scripts/build.sh script: + - ./scripts/build.sh - time cargo test --all --release --verbose --locked - sccache -s - - - -.build-only: &build-only +.build-only: &build-only only: - master - tags - web -build-linux-release: &build +build-linux-release: &build stage: build <<: *collect-artifacts <<: *build-only + <<: *compiler_info except: variables: - $DEPLOY_TAG tags: - linux-docker - before_script: - - sccache -s - - ./scripts/build.sh script: + - ./scripts/build.sh - time cargo build --release --verbose - mkdir -p ./artifacts - mv ./target/release/polkadot ./artifacts/. @@ -165,7 +161,7 @@ publish-docker-release: - test -z "${VERSION}" && exit 1 - cd ./artifacts - docker build - --build-arg VCS_REF="${CI_COMMIT_SHORT_SHA}" + --build-arg VCS_REF="${CI_COMMIT_SHA}" --build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" --tag $CONTAINER_IMAGE:$VERSION --tag $CONTAINER_IMAGE:$EXTRATAG . @@ -258,22 +254,22 @@ publish-s3-release: deploy-ew3: <<: *deploy-cibuild environment: - name: parity-prod-ew3 + name: parity-prod-ew3 deploy-ue1: <<: *deploy-cibuild environment: - name: parity-prod-ue1 + name: parity-prod-ue1 deploy-ew3-tag: <<: *deploy-tag environment: - name: parity-prod-ew3 + name: parity-prod-ew3 deploy-ue1-tag: <<: *deploy-tag environment: - name: parity-prod-ue1 + name: parity-prod-ue1 diff --git a/polkadot/scripts/docker/Dockerfile b/polkadot/scripts/docker/Dockerfile index 4b48815b65..34fee7481a 100644 --- a/polkadot/scripts/docker/Dockerfile +++ b/polkadot/scripts/docker/Dockerfile @@ -8,7 +8,7 @@ LABEL io.parity.image.authors="devops-team@parity.io" \ io.parity.image.vendor="Parity Technologies" \ io.parity.image.title="parity/polkadot" \ io.parity.image.description="polkadot: a platform for web3" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/master/scripts/docker/Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/"