diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e00b4ce69645c5d6dd91dee1daa15b925f3a623..f80d3af2ae51b971290d5efa7318cc1a81d7ca4d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ stages: - test - build - publish + - label image: parity/rust:nightly @@ -39,16 +40,21 @@ cache: test:runtime: stage: test - # image: alpine/git:latest + image: parity/tools:latest cache: {} tags: - linux-docker only: - /^[0-9]+$/ + variables: + GITLAB_API: "https://gitlab.parity.io/api/v4" + GITHUB_API_PROJECT: "parity%2Finfrastructure%2Fgithub-api" script: - ./scripts/gitlab/check_runtime.sh + + test:rust:stable: &test stage: test variables: @@ -166,24 +172,6 @@ publish:docker:release: -# configures aws for fast uploads/syncs -.s3_before_script: &s3_before_script - before_script: - - mkdir -p ${HOME}/.aws - - | - cat > ${HOME}/.aws/config <<EOC - [default] - s3 = - max_concurrent_requests = 20 - max_queue_size = 10000 - multipart_threshold = 64MB - multipart_chunksize = 16MB - max_bandwidth = 50MB/s - use_accelerate_endpoint = false - addressing_style = path - EOC - - publish:s3:release: <<: *publish_build @@ -192,7 +180,6 @@ publish:s3:release: GIT_STRATEGY: none BUCKET: "releases.parity.io" PREFIX: "substrate/${ARCH}-${DOCKER_OS}" - <<: *s3_before_script script: - aws s3 sync ./artifacts/ s3://${BUCKET}/${PREFIX}/$(cat ./artifacts/VERSION)/ - echo "update objects in latest path" @@ -224,7 +211,6 @@ publish:s3:doc: GIT_STRATEGY: none BUCKET: "releases.parity.io" PREFIX: "substrate-rustdoc" - <<: *s3_before_script script: - aws s3 sync --delete --size-only --only-show-errors ./crate-docs/ s3://${BUCKET}/${PREFIX}/ @@ -233,3 +219,8 @@ publish:s3:doc: --human-readable --summarize tags: - linux-docker + + + + + diff --git a/scripts/gitlab/check_runtime.sh b/scripts/gitlab/check_runtime.sh index 89484f385ea7d249248a0abf772962ab0a8bb681..15ef47c6b91759a5b3a4c71f127f517fbf3c7d4e 100755 --- a/scripts/gitlab/check_runtime.sh +++ b/scripts/gitlab/check_runtime.sh @@ -25,6 +25,7 @@ then no changes to the runtime source code detected EOT + exit 0 fi @@ -61,7 +62,15 @@ binary blob. This may break the api. EOT - +echo +echo "# run github-api job for labelling it breaksapi" +curl -sS -X POST \ + -F "token=${CI_JOB_TOKEN}" \ + -F "ref=master" \ + -F "variables[BREAKSAPI]=true" \ + -F "variables[PRNO]=${CI_COMMIT_REF_NAME}" \ + ${GITLAB_API}/projects/${GITHUB_API_PROJECT}/trigger/pipeline +