WIP: remove deprecated only/except clauses, build is now manual on PRs (#1769)

* change (CI): soon to be deprecated only changed to rules, build is now manual on PRs

* change (CI): add workflow to avoid doubled pipelines, remove second job

* debug (CI): unblock pipeline from waiting a manual action
This commit is contained in:
Denis Pisarev
2020-09-30 22:17:00 +02:00
committed by GitHub
parent 1f55a92b5a
commit d089baf2d4
+34 -35
View File
@@ -13,6 +13,11 @@ stages:
image: paritytech/ci-linux:production image: paritytech/ci-linux:production
workflow:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
variables: variables:
GIT_STRATEGY: fetch GIT_STRATEGY: fetch
GIT_DEPTH: 100 GIT_DEPTH: 100
@@ -53,19 +58,19 @@ variables:
- sccache -s - sccache -s
.build-refs: &build-refs .build-refs: &build-refs
only: rules:
- master - if: $CI_PIPELINE_SOURCE == "web"
- schedules - if: $CI_PIPELINE_SOURCE == "schedule"
- web - if: $CI_COMMIT_REF_NAME == "master"
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
.test-refs: &test-refs .test-refs: &test-refs
only: rules:
- master - if: $CI_PIPELINE_SOURCE == "web"
- schedules - if: $CI_PIPELINE_SOURCE == "schedule"
- web - if: $CI_COMMIT_REF_NAME == "master"
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- /^[0-9]+$/ - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
#### stage: test #### stage: test
@@ -73,8 +78,8 @@ check-runtime:
stage: test stage: test
image: paritytech/tools:latest image: paritytech/tools:latest
<<: *kubernetes-env <<: *kubernetes-env
only: rules:
- /^[0-9]+$/ - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
variables: variables:
GITLAB_API: "https://gitlab.parity.io/api/v4" GITLAB_API: "https://gitlab.parity.io/api/v4"
GITHUB_API_PROJECT: "parity%2Finfrastructure%2Fgithub-api" GITHUB_API_PROJECT: "parity%2Finfrastructure%2Fgithub-api"
@@ -87,8 +92,8 @@ check-line-width:
stage: test stage: test
image: paritytech/tools:latest image: paritytech/tools:latest
<<: *kubernetes-env <<: *kubernetes-env
only: rules:
- /^[0-9]+$/ - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
script: script:
- ./scripts/gitlab/check_line_width.sh - ./scripts/gitlab/check_line_width.sh
interruptible: true interruptible: true
@@ -97,7 +102,6 @@ check-line-width:
test-deterministic-wasm: test-deterministic-wasm:
stage: test stage: test
<<: *docker-env <<: *docker-env
except:
script: script:
- ./scripts/gitlab/test_deterministic_wasm.sh - ./scripts/gitlab/test_deterministic_wasm.sh
@@ -142,9 +146,9 @@ build-wasm-release:
<<: *collect-artifacts <<: *collect-artifacts
<<: *docker-env <<: *docker-env
<<: *compiler_info <<: *compiler_info
# Note: We likely only want to do this for tagged releases, hence the 'only:' # Note: We likely only want to do this for tagged releases, hence the 'rules:'
only: rules:
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
script: script:
- time wasm-pack build --target web --out-dir wasm --release cli -- --no-default-features --features browser - time wasm-pack build --target web --out-dir wasm --release cli -- --no-default-features --features browser
- mkdir -p ./artifacts/wasm - mkdir -p ./artifacts/wasm
@@ -155,9 +159,17 @@ build-wasm-release:
build-linux-release: &build build-linux-release: &build
stage: build stage: build
<<: *collect-artifacts <<: *collect-artifacts
<<: *build-refs
<<: *docker-env <<: *docker-env
<<: *compiler_info <<: *compiler_info
rules:
# .build-refs with manual on PRs
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
when: manual
allow_failure: true
script: script:
- time cargo build --release --verbose - time cargo build --release --verbose
- mkdir -p ./artifacts - mkdir -p ./artifacts
@@ -177,19 +189,6 @@ build-linux-release: &build
- cp -r scripts/docker/* ./artifacts - cp -r scripts/docker/* ./artifacts
- sccache -s - sccache -s
build-linux-release-pr: &build
stage: build
<<: *collect-artifacts
<<: *test-refs
<<: *docker-env
<<: *compiler_info
script:
- time cargo build --release --verbose
- mkdir -p ./artifacts
- mv ./target/release/polkadot ./artifacts/.
- sha256sum ./artifacts/polkadot | tee ./artifacts/polkadot.sha256
when: manual
generate-impl-guide: generate-impl-guide:
stage: build stage: build
image: image:
@@ -288,7 +287,7 @@ check-labels:
stage: .post stage: .post
image: paritytech/tools:latest image: paritytech/tools:latest
<<: *kubernetes-env <<: *kubernetes-env
only: rules:
- /^[0-9]+$/ - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
script: script:
- ./scripts/gitlab/check_labels.sh - ./scripts/gitlab/check_labels.sh