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

Commit

Permalink
Merge remote-tracking branch 'origin/master' into shawntabrizi-pov-in…
Browse files Browse the repository at this point in the history
…-cli
  • Loading branch information
ggwpez committed Dec 17, 2022
2 parents 21d89aa + a96cb57 commit 9e7a9f9
Show file tree
Hide file tree
Showing 453 changed files with 17,821 additions and 13,029 deletions.
67 changes: 50 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ stages:
- test
- build
- publish
- zombienet
- deploy
- notify

Expand All @@ -52,6 +53,7 @@ variables:
BUILDAH_IMAGE: "quay.io/buildah/stable:v1.27"
RUSTY_CACHIER_SINGLE_BRANCH: master
RUSTY_CACHIER_DONT_OPERATE_ON_MAIN_BRANCH: "true"
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.22"

default:
retry:
Expand Down Expand Up @@ -79,8 +81,24 @@ default:
paths:
- artifacts/

.prepare-env:
before_script:
# TODO: remove unset invocation when we'll be free from 'ENV RUSTC_WRAPPER=sccache' & sccache
# itself in all images
- unset RUSTC_WRAPPER
# $WASM_BUILD_WORKSPACE_HINT enables wasm-builder to find the Cargo.lock from within generated
# packages
- export WASM_BUILD_WORKSPACE_HINT="$PWD"

.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

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

Expand All @@ -93,6 +111,7 @@ default:

.pipeline-stopper-vars:
script:
- !reference [.job-switcher, before_script]
- echo "Collecting env variables for the cancel-pipeline job"
- echo "FAILED_JOB_URL=${CI_JOB_URL}" > pipeline-stopper.env
- echo "FAILED_JOB_NAME=${CI_JOB_NAME}" >> pipeline-stopper.env
Expand All @@ -106,8 +125,8 @@ default:
.docker-env:
image: "${CI_IMAGE}"
before_script:
# TODO: remove unset invocation when we'll be free from 'ENV RUSTC_WRAPPER=sccache' & sccache itself in all images
- unset RUSTC_WRAPPER
- !reference [.job-switcher, before_script]
- !reference [.prepare-env, before_script]
- !reference [.rust-info-script, script]
- !reference [.rusty-cachier, before_script]
- !reference [.pipeline-stopper-vars, script]
Expand Down Expand Up @@ -166,40 +185,53 @@ default:
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs

.test-refs-wasmer-sandbox:
.publish-refs:
rules:
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_REF_NAME == "master"
changes:
- client/executor/**/*
- frame/contracts/**/*
- primitives/sandbox/**/*
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
changes:
- client/executor/**/*
- frame/contracts/**/*
- primitives/sandbox/**/*
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
changes:
- client/executor/**/*
- frame/contracts/**/*
- primitives/sandbox/**/*

.build-refs:
# publish-refs + PRs
rules:
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- 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

.zombienet-refs:
extends: .build-refs

.nightly-pipeline:
rules:
# this job runs only on nightly pipeline with the mentioned variable, against `master` branch
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly"

.crates-publishing-template:
stage: test
extends: .docker-env
# collect artifacts even on failure so that we know how the crates were generated (they'll be
# generated to the artifacts folder according to SPUB_TMP further down)
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: always
expire_in: 7 days
paths:
- artifacts/
variables:
CRATESIO_API: https://crates.io/api
CRATESIO_CRATES_OWNER: parity-crate-owner
GH_API: https://api.github.com
REPO: substrate
REPO_OWNER: paritytech
SPUB_TMP: artifacts

#### stage: .pre

skip-if-draft:
Expand All @@ -225,6 +257,8 @@ include:
- scripts/ci/gitlab/pipeline/build.yml
# publish jobs
- scripts/ci/gitlab/pipeline/publish.yml
# zombienet jobs
- scripts/ci/gitlab/pipeline/zombienet.yml

#### stage: deploy

Expand Down Expand Up @@ -283,7 +317,6 @@ rusty-cachier-notify:
PR_NUM: "${PR_NUM}"
trigger:
project: "parity/infrastructure/ci_cd/pipeline-stopper"
branch: "as-improve"

remove-cancel-pipeline-message:
stage: .post
Expand Down
Loading

0 comments on commit 9e7a9f9

Please sign in to comment.