diff --git a/substrate/.gitattributes b/substrate/.gitattributes
index a77c52fccdb77..4cb3ef4972feb 100644
--- a/substrate/.gitattributes
+++ b/substrate/.gitattributes
@@ -1,4 +1,2 @@
Cargo.lock linguist-generated=true
-/.gitlab-ci.yml filter=ci-prettier
-/scripts/ci/gitlab/pipeline/*.yml filter=ci-prettier
frame/**/src/weights.rs linguist-generated=true
diff --git a/substrate/.github/dependabot.yml b/substrate/.github/dependabot.yml
deleted file mode 100644
index 04cf0d1e1a5a4..0000000000000
--- a/substrate/.github/dependabot.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-version: 2
-updates:
- - package-ecosystem: "cargo"
- directory: "/"
- labels: ["A2-insubstantial", "B0-silent", "C1-low", "E2-dependencies"]
- schedule:
- interval: "daily"
- - package-ecosystem: github-actions
- directory: '/'
- labels: ["A2-insubstantial", "B0-silent", "C1-low", "E2-dependencies"]
- schedule:
- interval: daily
diff --git a/substrate/.github/pr-custom-review.yml b/substrate/.github/pr-custom-review.yml
deleted file mode 100644
index 059f4a283af07..0000000000000
--- a/substrate/.github/pr-custom-review.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-# 🔒 PROTECTED: Changes to locks-review-team should be approved by the current locks-review-team
-locks-review-team: locks-review
-team-leads-team: polkadot-review
-action-review-team: ci
-
-rules:
- - name: Core developers
- check_type: changed_files
- condition:
- include: .*
- # excluding files from 'CI team' and 'FRAME coders' rules
- exclude: ^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*|^\.config/nextest.toml|^frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
- min_approvals: 2
- teams:
- - core-devs
-
- - name: FRAME coders
- check_type: changed_files
- condition:
- include: ^frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
- all:
- - min_approvals: 2
- teams:
- - core-devs
- - min_approvals: 1
- teams:
- - frame-coders
-
- - name: CI team
- check_type: changed_files
- condition:
- include: ^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*|^\.config/nextest.toml
- min_approvals: 2
- teams:
- - ci
-
-prevent-review-request:
- teams:
- - core-devs
diff --git a/substrate/.github/stale.yml b/substrate/.github/stale.yml
deleted file mode 100644
index 61d0fd0228d97..0000000000000
--- a/substrate/.github/stale.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-# Number of days of inactivity before an issue becomes stale
-daysUntilStale: 30
-# Number of days of inactivity before a stale issue is closed
-daysUntilClose: 14
-# Issues with these labels will never be considered stale
-exemptLabels:
- - "D9-needsaudit 👮"
-# Label to use when marking an issue as stale
-staleLabel: "A3-stale"
-# we only bother with pull requests
-only: pulls
-# Comment to post when marking an issue as stale. Set to `false` to disable
-markComment: >
- Hey, is anyone still working on this? Due to the inactivity this issue has
- been automatically marked as stale. It will be closed if no further activity
- occurs. Thank you for your contributions.
-# Comment to post when closing a stale issue. Set to `false` to disable
-closeComment: false
diff --git a/substrate/.github/workflows/auto-label-issues.yml b/substrate/.github/workflows/auto-label-issues.yml
deleted file mode 100644
index 12ffce702cdcc..0000000000000
--- a/substrate/.github/workflows/auto-label-issues.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-# If the author of the issues is not a contributor to the project, label
-# the issue with 'Z0-unconfirmed'
-
-name: Label New Issues
-on:
- issues:
- types: [opened]
-
-jobs:
- label-new-issues:
- runs-on: ubuntu-latest
- steps:
- - name: Label drafts
- uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 # 1.0.4
- if: github.event.issue.author_association == 'NONE'
- with:
- add-labels: "I10-unconfirmed"
diff --git a/substrate/.github/workflows/burnin-label-notification.yml b/substrate/.github/workflows/burnin-label-notification.yml
deleted file mode 100644
index f45455d31db1e..0000000000000
--- a/substrate/.github/workflows/burnin-label-notification.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: Notify devops when burn-in label applied
-on:
- pull_request:
- types: [labeled]
-
-jobs:
- notify-devops:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- channel:
- - name: 'Team: DevOps'
- room: '!lUslSijLMgNcEKcAiE:parity.io'
-
- steps:
- - name: Notify devops
- if: startsWith(github.event.label.name, 'A1-')
- uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
- with:
- room_id: ${{ matrix.channel.room }}
- access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }}
- server: "m.parity.io"
- message: |
- @room Burn-in request received for [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})
diff --git a/substrate/.github/workflows/check-D-labels.yml b/substrate/.github/workflows/check-D-labels.yml
deleted file mode 100644
index 7bb358ce1182e..0000000000000
--- a/substrate/.github/workflows/check-D-labels.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-name: Check D labels
-
-on:
- pull_request:
- types: [labeled, opened, synchronize, unlabeled]
- paths:
- - frame/**
- - primitives/**
-
-env:
- IMAGE: paritytech/ruled_labels:0.4.0
-
-jobs:
- check-labels:
- runs-on: ubuntu-latest
- steps:
- - name: Pull image
- run: docker pull $IMAGE
-
- - name: Check labels
- env:
- MOUNT: /work
- GITHUB_PR: ${{ github.event.pull_request.number }}
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- API_BASE: https://api.github.com/repos
- REPO: ${{ github.repository }}
- RULES_PATH: labels/ruled_labels
- CHECK_SPECS: specs_substrate.yaml
- run: |
- echo "REPO: ${REPO}"
- echo "GITHUB_PR: ${GITHUB_PR}"
- # Clone repo with labels specs
- git clone https://github.com/paritytech/labels
- # Fetch the labels for the PR under test
- labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",")
-
- if [ -z "${labels}" ]; then
- docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --tags audit --no-label
- fi
-
- labels_args=${labels: :-1}
- printf "Checking labels: %s\n" "${labels_args}"
-
- # Prevent the shell from splitting labels with spaces
- IFS=","
-
- # --dev is more useful to debug mode to debug
- docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --labels ${labels_args} --dev --tags audit
diff --git a/substrate/.github/workflows/check-labels.yml b/substrate/.github/workflows/check-labels.yml
deleted file mode 100644
index 55b8f7389fa7f..0000000000000
--- a/substrate/.github/workflows/check-labels.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-name: Check labels
-
-on:
- pull_request:
- types: [labeled, opened, synchronize, unlabeled]
-
-env:
- IMAGE: paritytech/ruled_labels:0.4.0
-
-jobs:
- check-labels:
- runs-on: ubuntu-latest
- steps:
- - name: Pull image
- run: docker pull $IMAGE
-
- - name: Check labels
- env:
- MOUNT: /work
- GITHUB_PR: ${{ github.event.pull_request.number }}
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- API_BASE: https://api.github.com/repos
- REPO: ${{ github.repository }}
- RULES_PATH: labels/ruled_labels
- CHECK_SPECS: specs_substrate.yaml
- run: |
- echo "REPO: ${REPO}"
- echo "GITHUB_PR: ${GITHUB_PR}"
- # Clone repo with labels specs
- git clone https://github.com/paritytech/labels
- # Fetch the labels for the PR under test
- labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",")
-
- if [ -z "${labels}" ]; then
- docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --tags PR --no-label
- fi
-
- labels_args=${labels: :-1}
- printf "Checking labels: %s\n" "${labels_args}"
-
- # Prevent the shell from splitting labels with spaces
- IFS=","
-
- # --dev is more useful to debug mode to debug
- docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --labels ${labels_args} --dev --tags PR
diff --git a/substrate/.github/workflows/md-link-check.yml b/substrate/.github/workflows/md-link-check.yml
deleted file mode 100644
index e1387f6da13f7..0000000000000
--- a/substrate/.github/workflows/md-link-check.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: Check Links
-
-on:
- pull_request:
- branches:
- - master
- push:
- branches:
- - master
-
-jobs:
- markdown-link-check:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: gaurav-nelson/github-action-markdown-link-check@0a51127e9955b855a9bbfa1ff5577f1d1338c9a5 # 1.0.14
- with:
- use-quiet-mode: 'yes'
- config-file: '.github/workflows/mlc_config.json'
diff --git a/substrate/.github/workflows/mlc_config.json b/substrate/.github/workflows/mlc_config.json
deleted file mode 100644
index e7e620b39e0a9..0000000000000
--- a/substrate/.github/workflows/mlc_config.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "ignorePatterns": [
- {
- "pattern": "^https://crates.io",
- }
- ]
-}
diff --git a/substrate/.github/workflows/monthly-tag.yml b/substrate/.github/workflows/monthly-tag.yml
deleted file mode 100644
index 055207d85a4dd..0000000000000
--- a/substrate/.github/workflows/monthly-tag.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Monthly Snapshot Tag
-
-on:
- schedule:
- - cron: "0 1 1 * *"
- workflow_dispatch:
-
-jobs:
- build:
- name: Take Snapshot
- runs-on: ubuntu-latest
- steps:
- - name: Get the tags by date
- id: tags
- run: |
- echo "new=$(date +'monthly-%Y-%m')" >> $GITHUB_OUTPUT
- echo "old=$(date -d'1 month ago' +'monthly-%Y-%m')" >> $GITHUB_OUTPUT
- - name: Checkout branch "master"
- uses: actions/checkout@v3
- with:
- ref: 'master'
- fetch-depth: 0
- - name: Generate changelog
- id: changelog
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- echo "# Automatic snapshot pre-release ${{ steps.tags.outputs.new }}" > Changelog.md
- echo "" >> Changelog.md
- echo "## Changes since last snapshot (${{ steps.tags.outputs.old }})" >> Changelog.md
- echo "" >> Changelog.md
- ./scripts/ci/github/generate_changelog.sh ${{ steps.tags.outputs.old }} >> Changelog.md
- - name: Release snapshot
- id: release-snapshot
- uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4 latest version, repo archived
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{ steps.tags.outputs.new }}
- release_name: ${{ steps.tags.outputs.new }}
- draft: false
- prerelease: true
- body_path: Changelog.md
diff --git a/substrate/.github/workflows/pr-custom-review.yml b/substrate/.github/workflows/pr-custom-review.yml
deleted file mode 100644
index 8e40c9ee72989..0000000000000
--- a/substrate/.github/workflows/pr-custom-review.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-name: Assign reviewers
-
-on:
- pull_request:
- branches:
- - master
- - main
- types:
- - opened
- - reopened
- - synchronize
- - review_requested
- - review_request_removed
- - ready_for_review
- - converted_to_draft
- pull_request_review:
-
-jobs:
- pr-custom-review:
- runs-on: ubuntu-latest
- steps:
- - name: Skip if pull request is in Draft
- # `if: github.event.pull_request.draft == true` should be kept here, at
- # the step level, rather than at the job level. The latter is not
- # recommended because when the PR is moved from "Draft" to "Ready to
- # review" the workflow will immediately be passing (since it was skipped),
- # even though it hasn't actually ran, since it takes a few seconds for
- # the workflow to start. This is also disclosed in:
- # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/17
- # That scenario would open an opportunity for the check to be bypassed:
- # 1. Get your PR approved
- # 2. Move it to Draft
- # 3. Push whatever commits you want
- # 4. Move it to "Ready for review"; now the workflow is passing (it was
- # skipped) and "Check reviews" is also passing (it won't be updated
- # until the workflow is finished)
- if: github.event.pull_request.draft == true
- run: exit 1
- - name: pr-custom-review
- uses: paritytech/pr-custom-review@action-v3
- with:
- checks-reviews-api: http://pcr.parity-prod.parity.io/api/v1/check_reviews
diff --git a/substrate/.github/workflows/release-bot.yml b/substrate/.github/workflows/release-bot.yml
deleted file mode 100644
index 05bea32abc697..0000000000000
--- a/substrate/.github/workflows/release-bot.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-name: Pushes release updates to a pre-defined Matrix room
-on:
- release:
- types:
- - edited
- - prereleased
- - published
-jobs:
- ping_matrix:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- channel:
- - name: 'General: Rust, Polkadot, Substrate'
- room: '!aJymqQYtCjjqImFLSb:parity.io'
- pre-release: false
-
- steps:
- - name: send message
- uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
- with:
- room_id: ${{ matrix.channel.room }}
- access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }}
- server: "m.parity.io"
- message: |
- ***${{github.event.repository.full_name}}:*** A release has been ${{github.event.action}}
- Release version [${{github.event.release.tag_name}}](${{github.event.release.html_url}})
-
- -----
-
- ${{github.event.release.body}}
diff --git a/substrate/.github/workflows/release-tagging.yml b/substrate/.github/workflows/release-tagging.yml
deleted file mode 100644
index 1862582f40eba..0000000000000
--- a/substrate/.github/workflows/release-tagging.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-# Github action to ensure the `release` tag always tracks latest release
-
-name: Retag release
-
-on:
- release:
- types: [ published ]
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- steps:
- - name: Set Git tag
- uses: s3krit/walking-tag-action@d04f7a53b72ceda4e20283736ce3627011275178 # latest version from master
- with:
- tag-name: release
- tag-message: Latest release
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/substrate/.gitlab-ci.yml b/substrate/.gitlab-ci.yml
deleted file mode 100644
index f00836528973e..0000000000000
--- a/substrate/.gitlab-ci.yml
+++ /dev/null
@@ -1,412 +0,0 @@
-# .gitlab-ci.yml
-#
-# substrate
-#
-# pipelines can be triggered manually in the web
-#
-# Currently the file is divided into subfiles. Each stage has a different file which
-# can be found here: scripts/ci/gitlab/pipeline/.yml
-#
-# Instead of YAML anchors "extends" is used.
-# Useful links:
-# https://docs.gitlab.com/ee/ci/yaml/index.html#extends
-# https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html#reference-tags
-#
-# SAMPLE JOB TEMPLATE - This is not a complete example but is enough to build a
-# simple CI job. For full documentation, visit https://docs.gitlab.com/ee/ci/yaml/
-#
-# my-example-job:
-# stage: test # One of the stages listed below this job (required)
-# image: paritytech/tools:latest # Any docker image (required)
-# allow_failure: true # Allow the pipeline to continue if this job fails (default: false)
-# needs:
-# - job: test-linux # Any jobs that are required to run before this job (optional)
-# variables:
-# MY_ENVIRONMENT_VARIABLE: "some useful value" # Environment variables passed to the job (optional)
-# script:
-# - echo "List of shell commands to run in your job"
-# - echo "You can also just specify a script here, like so:"
-# - ./scripts/ci/gitlab/my_amazing_script.sh
-
-stages:
- - check
- - test
- - build
- - publish
- - notify
- - zombienet
- - deploy
-
-workflow:
- rules:
- - if: $CI_COMMIT_TAG
- - if: $CI_COMMIT_BRANCH
-
-variables:
- GIT_STRATEGY: fetch
- GIT_DEPTH: 100
- CARGO_INCREMENTAL: 0
- DOCKER_OS: "debian:bullseye"
- ARCH: "x86_64"
- CI_IMAGE: !reference [.ci-unified, variables, CI_IMAGE]
- BUILDAH_IMAGE: "quay.io/buildah/stable:v1.29"
- BUILDAH_COMMAND: "buildah --storage-driver overlay2"
- RELENG_SCRIPTS_BRANCH: "master"
-
- RUSTY_CACHIER_SINGLE_BRANCH: master
- RUSTY_CACHIER_DONT_OPERATE_ON_MAIN_BRANCH: "true"
- RUSTY_CACHIER_MINIO_ALIAS: rustycachier_gcs
- RUSTY_CACHIER_MINIO_BUCKET: parity-build-rusty-cachier
- RUSTY_CACHIER_COMPRESSION_METHOD: zstd
-
- NEXTEST_FAILURE_OUTPUT: immediate-final
- NEXTEST_SUCCESS_OUTPUT: final
- ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.55"
-
-default:
- retry:
- max: 2
- when:
- - runner_system_failure
- - unknown_failure
- - api_failure
- cache: {}
- interruptible: true
-
-.collect-artifacts:
- artifacts:
- name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
- when: on_success
- expire_in: 7 days
- paths:
- - artifacts/
-
-.collect-artifacts-short:
- artifacts:
- name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
- when: on_success
- expire_in: 3 hours
- 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"
- # ensure that RUSTFLAGS are set correctly
- - echo $RUSTFLAGS
-
-.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 [.timestamp, before_script]
- - !reference [.job-switcher, before_script]
- - !reference [.prepare-env, before_script]
- tags:
- - kubernetes-parity-build
-
-.rust-info-script:
- script:
- - rustup show
- - cargo --version
- - rustup +nightly show
- - cargo +nightly --version
-
-.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
- - echo "PR_NUM=${CI_COMMIT_REF_NAME}" >> pipeline-stopper.env
-
-.pipeline-stopper-artifacts:
- artifacts:
- reports:
- dotenv: pipeline-stopper.env
-
-.docker-env:
- image: "${CI_IMAGE}"
- before_script:
- - !reference [.timestamp, before_script]
- - !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]
- after_script:
- - !reference [.rusty-cachier, after_script]
- tags:
- - linux-docker-vm-c2
-
-# rusty-cachier's hidden job. Parts of this job are used to instrument the pipeline's other real jobs with rusty-cachier
-# Description of the commands is available here - https://gitlab.parity.io/parity/infrastructure/ci_cd/rusty-cachier/client#description
-.rusty-cachier:
- before_script:
- - curl -s https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.parity.io/parity/infrastructure/ci_cd/rusty-cachier/client/-/raw/release/util/install.sh | bash
- - rusty-cachier environment check --gracefully
- - $(rusty-cachier environment inject)
- - rusty-cachier project mtime
- after_script:
- - env RUSTY_CACHIER_SUPRESS_OUTPUT=true rusty-cachier snapshot destroy
-
-.test-refs:
- rules:
- - if: $CI_PIPELINE_SOURCE == "web"
- - 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
-
-# handle the specific case where benches could store incorrect bench data because of the downstream staging runs
-# exclude cargo-check-benches from such runs
-.test-refs-check-benches:
- rules:
- - if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "pipeline" && $CI_IMAGE =~ /staging$/
- when: never
- - if: $CI_PIPELINE_SOURCE == "web"
- - 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
-
-.test-refs-no-trigger:
- 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 =~ /^[0-9]+$/ # PRs
- - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
- - if: $CI_COMMIT_REF_NAME =~ /^ci-release-.*$/
-
-.test-refs-no-trigger-prs-only:
- rules:
- - if: $CI_PIPELINE_SOURCE == "pipeline"
- when: never
- - if: $CI_PIPELINE_SOURCE == "web"
- - if: $CI_PIPELINE_SOURCE == "schedule"
- - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
-
-.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"
- - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
-
-.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
-
-.crates-publishing-variables:
- variables:
- CRATESIO_CRATES_OWNER: parity-crate-owner
- REPO: substrate
- REPO_OWNER: paritytech
-
-.crates-publishing-pipeline:
- extends: .crates-publishing-variables
- rules:
- - if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_REF_NAME == "master" && $PIPELINE == "automatic-crate-publishing"
-
-.crates-publishing-template:
- extends:
- - .docker-env
- - .crates-publishing-variables
- # 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:
- SPUB_TMP: artifacts
- # disable timestamping for the crate publishing jobs, they leave stray child processes behind
- # which don't interact well with the timestamping script
- CI_DISABLE_TIMESTAMP: 1
-
-#### stage: .pre
-
-check-crates-publishing-pipeline:
- stage: .pre
- extends:
- - .kubernetes-env
- - .crates-publishing-pipeline
- script:
- - git clone
- --depth 1
- --branch "$RELENG_SCRIPTS_BRANCH"
- https://github.com/paritytech/releng-scripts.git
- - ONLY_CHECK_PIPELINE=true ./releng-scripts/publish-crates
-
-# By default our pipelines are interruptible, but some special pipelines shouldn't be interrupted:
-# * multi-project pipelines such as the ones triggered by the scripts repo
-# * the scheduled automatic-crate-publishing pipeline
-#
-# In those cases, we add an uninterruptible .pre job; once that one has started,
-# the entire pipeline becomes uninterruptible
-uninterruptible-pipeline:
- extends: .kubernetes-env
- variables:
- CI_IMAGE: "paritytech/tools:latest"
- stage: .pre
- interruptible: false
- rules:
- - if: $CI_PIPELINE_SOURCE == "pipeline"
- - if: $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "automatic-crate-publishing"
- script: "true"
-
-include:
- # check jobs
- - scripts/ci/gitlab/pipeline/check.yml
- # tests jobs
- - scripts/ci/gitlab/pipeline/test.yml
- # build jobs
- - scripts/ci/gitlab/pipeline/build.yml
- # publish jobs
- - scripts/ci/gitlab/pipeline/publish.yml
- # zombienet jobs
- - scripts/ci/gitlab/pipeline/zombienet.yml
- # The crate-publishing pipeline requires a customized `interruptible` configuration. Unfortunately
- # `interruptible` can't currently be dynamically set based on variables as per:
- # - https://gitlab.com/gitlab-org/gitlab/-/issues/38349
- # - https://gitlab.com/gitlab-org/gitlab/-/issues/194023
- # Thus we work around that limitation by using conditional includes.
- # For crate-publishing pipelines: run it with defaults + `interruptible: false`. The WHOLE
- # pipeline is made uninterruptible to ensure that test jobs also get a chance to run to
- # completion, because the publishing jobs depends on them AS INTENDED: crates should not be
- # published before their source code is checked.
- - project: parity/infrastructure/ci_cd/shared
- ref: main
- file: /common/timestamp.yml
- - project: parity/infrastructure/ci_cd/shared
- ref: main
- file: /common/ci-unified.yml
-
-
-#### stage: notify
-
-# This job notifies rusty-cachier about the latest commit with the cache.
-# This info is later used for the cache distribution and an overlay creation.
-# Note that we don't use any .rusty-cachier references as we assume that a pipeline has reached this stage with working rusty-cachier.
-rusty-cachier-notify:
- stage: notify
- extends: .kubernetes-env
- variables:
- CI_IMAGE: paritytech/rusty-cachier-env:latest
- GIT_STRATEGY: none
- dependencies: []
- script:
- - curl -s https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.parity.io/parity/infrastructure/ci_cd/rusty-cachier/client/-/raw/release/util/install.sh | bash
- - rusty-cachier cache notify
-
-#### 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-template:
- stage: .post
- rules:
- - 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}"
- trigger:
- project: "parity/infrastructure/ci_cd/pipeline-stopper"
-
-remove-cancel-pipeline-message:
- stage: .post
- rules:
- - 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}"
- trigger:
- project: "parity/infrastructure/ci_cd/pipeline-stopper"
- branch: "as-improve"
-
-# need to copy jobs this way because otherwise gitlab will wait
-# for all 3 jobs to finish instead of cancelling if one fails
-cancel-pipeline-test-linux-stable1:
- extends: .cancel-pipeline-template
- needs:
- - job: "test-linux-stable 1/3"
-
-cancel-pipeline-test-linux-stable2:
- extends: .cancel-pipeline-template
- needs:
- - job: "test-linux-stable 2/3"
-
-cancel-pipeline-test-linux-stable3:
- extends: .cancel-pipeline-template
- needs:
- - job: "test-linux-stable 3/3"
-
-cancel-pipeline-cargo-check-benches1:
- extends: .cancel-pipeline-template
- needs:
- - job: "cargo-check-benches 1/2"
-
-cancel-pipeline-cargo-check-benches2:
- extends: .cancel-pipeline-template
- needs:
- - job: "cargo-check-benches 2/2"
-
-cancel-pipeline-test-linux-stable-int:
- extends: .cancel-pipeline-template
- needs:
- - job: test-linux-stable-int
-
-cancel-pipeline-cargo-check-each-crate-1:
- extends: .cancel-pipeline-template
- needs:
- - job: "cargo-check-each-crate 1/2"
-
-cancel-pipeline-cargo-check-each-crate-2:
- extends: .cancel-pipeline-template
- needs:
- - job: "cargo-check-each-crate 2/2"
-
-cancel-pipeline-cargo-check-each-crate-macos:
- extends: .cancel-pipeline-template
- needs:
- - job: cargo-check-each-crate-macos
-
-cancel-pipeline-check-tracing:
- extends: .cancel-pipeline-template
- needs:
- - job: check-tracing