Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into ao-past-session-slashing-companion
Browse files Browse the repository at this point in the history
* master: (44 commits)
  Companion for #13287 (#2155)
  timestamp ci job logs (#2327)
  Release parachain host API v4 (#2325)
  Bump clap from 4.1.6 to 4.1.8 (#2272)
  Enabled `polkadot-parachain` build for `runtime-benchmarks`, e.g.: (#2324)
  Bump tokio from 1.25.0 to 1.26.0 (#2273)
  Bump async-trait from 0.1.64 to 0.1.66 (#2318)
  ReadMe followup for  #2313 (#2317)
  Fix runtime api import path (#2319)
  Update Westend collectives chainspec (#2311)
  README: Document usage of RPC node (#2313)
  Companion for paritytech/substrate#13592 (#2310)
  Update orchestra and metered-channel (#2304)
  Backport: Brigehub: Add in force upgrade xcm version (into master) (#2289)
  [Backport] version bumps from 9380 (#2309)
  Bump proc-macro2 from 1.0.50 to 1.0.52 (#2312)
  Remove use of trait Store (#2286)
  Companion for #13482 (#2303)
  add amforc bootnodes (#2246)
  Cleanup dependencies + dead code (#2302)
  ...
  • Loading branch information
ordian committed Mar 16, 2023
2 parents a1df3e8 + 710fee5 commit 1ba14e8
Show file tree
Hide file tree
Showing 217 changed files with 4,819 additions and 3,792 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.gitlab-ci.yml filter=ci-prettier
/scripts/ci/gitlab/pipeline/*.yml filter=ci-prettier
101 changes: 54 additions & 47 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#
# pipelines can be triggered manually in the web


stages:
- test
- build
Expand All @@ -15,7 +14,7 @@ stages:
- zombienet

default:
interruptible: true
interruptible: true
retry:
max: 2
when:
Expand All @@ -24,68 +23,72 @@ default:
- api_failure

variables:
GIT_STRATEGY: fetch
GIT_DEPTH: 100
CARGO_INCREMENTAL: 0
CI_IMAGE: "paritytech/ci-linux:production"
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.35"
GIT_STRATEGY: fetch
GIT_DEPTH: 100
CARGO_INCREMENTAL: 0
CI_IMAGE: "paritytech/ci-linux:production"
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.37"

.common-before-script:
before_script:
- !reference [.job-switcher, before_script]
- !reference [.timestamp, before_script]

.collect-artifacts:
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: on_success
expire_in: 1 days
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: on_success
expire_in: 1 days
paths:
- ./artifacts/

# collecting vars for pipeline stopper
# they will be used if the job fails
.pipeline-stopper-vars:
before_script:
- !reference [.job-switcher, before_script]
- echo "FAILED_JOB_URL=${CI_JOB_URL}" > pipeline-stopper.env
- echo "FAILED_JOB_NAME=${CI_JOB_NAME}" >> pipeline-stopper.env
- echo "FAILED_JOB_NAME=${CI_JOB_NAME}" >> pipeline-stopper.env
- echo "PR_NUM=${CI_COMMIT_REF_NAME}" >> pipeline-stopper.env

.pipeline-stopper-artifacts:
artifacts:
reports:
dotenv: pipeline-stopper.env
reports:
dotenv: pipeline-stopper.env

.common-refs:
# these jobs run always*
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
- if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000
- if: $CI_COMMIT_REF_NAME =~ /^polkadot-v[0-9]+\.[0-9]+.*$/ # i.e. polkadot-v1.0.99, polkadot-v2.1rc1
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
- if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000
- if: $CI_COMMIT_REF_NAME =~ /^polkadot-v[0-9]+\.[0-9]+.*$/ # i.e. polkadot-v1.0.99, polkadot-v2.1rc1

.pr-refs:
# these jobs run always*
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs

.publish-refs:
rules:
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME =~ /^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

# run benchmarks manually only on release-parachains-v* branch
.benchmarks-manual-refs:
rules:
- if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000
- if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000
when: manual

# run benchmarks only on release-parachains-v* branch
.benchmarks-refs:
rules:
- if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000
- if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000

.zombienet-refs:
rules:
Expand All @@ -94,16 +97,16 @@ variables:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs

.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

.docker-env:
image: "${CI_IMAGE}"
image: "${CI_IMAGE}"
before_script:
- !reference [.job-switcher, before_script]
- !reference [.common-before-script, before_script]
- rustup show
- cargo --version
- rustup +nightly show
Expand All @@ -113,9 +116,9 @@ variables:
- linux-docker-vm-c2

.kubernetes-env:
image: "${CI_IMAGE}"
image: "${CI_IMAGE}"
before_script:
- !reference [.job-switcher, before_script]
- !reference [.common-before-script, before_script]
tags:
- kubernetes-parity-build

Expand Down Expand Up @@ -145,40 +148,44 @@ include:
- scripts/ci/gitlab/pipeline/publish.yml
# zombienet jobs
- scripts/ci/gitlab/pipeline/zombienet.yml
# timestamp handler
- project: parity/infrastructure/ci_cd/shared
ref: v0.1
file: /common/timestamp.yml

#### stage: .post

# This job cancels the whole pipeline if any of provided jobs fail.
# In a DAG, every jobs chain is executed independently of others. The `fail_fast` principle suggests
# to fail the pipeline as soon as possible to shorten the feedback loop.
cancel-pipeline:
stage: .post
stage: .post
needs:
- job: test-linux-stable
- job: test-linux-stable
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
when: on_failure
variables:
PROJECT_ID: "${CI_PROJECT_ID}"
PROJECT_NAME: "${CI_PROJECT_NAME}"
PIPELINE_ID: "${CI_PIPELINE_ID}"
FAILED_JOB_URL: "${FAILED_JOB_URL}"
FAILED_JOB_NAME: "${FAILED_JOB_NAME}"
PR_NUM: "${PR_NUM}"
PROJECT_ID: "${CI_PROJECT_ID}"
PROJECT_NAME: "${CI_PROJECT_NAME}"
PIPELINE_ID: "${CI_PIPELINE_ID}"
FAILED_JOB_URL: "${FAILED_JOB_URL}"
FAILED_JOB_NAME: "${FAILED_JOB_NAME}"
PR_NUM: "${PR_NUM}"
trigger:
project: "parity/infrastructure/ci_cd/pipeline-stopper"
branch: "as-improve"
project: "parity/infrastructure/ci_cd/pipeline-stopper"
branch: "as-improve"

remove-cancel-pipeline-message:
stage: .post
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
variables:
PROJECT_ID: "${CI_PROJECT_ID}"
PROJECT_NAME: "${CI_PROJECT_NAME}"
PIPELINE_ID: "${CI_PIPELINE_ID}"
FAILED_JOB_URL: "https://gitlab.com"
FAILED_JOB_NAME: "nope"
PR_NUM: "${CI_COMMIT_REF_NAME}"
PROJECT_ID: "${CI_PROJECT_ID}"
PROJECT_NAME: "${CI_PROJECT_NAME}"
PIPELINE_ID: "${CI_PIPELINE_ID}"
FAILED_JOB_URL: "https://gitlab.com"
FAILED_JOB_NAME: "nope"
PR_NUM: "${CI_COMMIT_REF_NAME}"
trigger:
project: "parity/infrastructure/ci_cd/pipeline-stopper"
project: "parity/infrastructure/ci_cd/pipeline-stopper"
Loading

0 comments on commit 1ba14e8

Please sign in to comment.