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

Commit f87ea7d

Browse files
use pipeline-scripts for dependent projects script (#9749)
1 parent 00629de commit f87ea7d

File tree

3 files changed

+28
-220
lines changed

3 files changed

+28
-220
lines changed

.gitlab-ci.yml

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ variables: &default-vars
4646
VAULT_AUTH_PATH: "gitlab-parity-io-jwt"
4747
VAULT_AUTH_ROLE: "cicd_gitlab_parity_${CI_PROJECT_NAME}"
4848
SIMNET_FEATURES_PATH: "simnet_tests/tests"
49+
PIPELINE_SCRIPTS_TAG: "v0.1"
4950

5051
default:
5152
cache: {}
@@ -538,29 +539,37 @@ cargo-check-macos:
538539

539540
#### stage: build
540541

541-
check-polkadot-companion-status:
542-
stage: build
543-
image: paritytech/tools:latest
544-
<<: *kubernetes-env
545-
<<: *vault-secrets
546-
rules:
547-
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
548-
script:
549-
- ./.maintain/gitlab/check_polkadot_companion_status.sh
550-
551-
check-polkadot-companion-build:
542+
.check-dependent-project: &check-dependent-project
552543
stage: build
553544
<<: *docker-env
554545
<<: *test-refs-no-trigger
555546
<<: *vault-secrets
556-
needs:
557-
- job: test-linux-stable-int
558-
artifacts: false
559547
script:
560-
- ./.maintain/gitlab/check_polkadot_companion_build.sh
561-
after_script:
562-
- cd polkadot && git rev-parse --abbrev-ref HEAD
563-
allow_failure: true
548+
- git clone
549+
--depth=1
550+
"--branch=$PIPELINE_SCRIPTS_TAG"
551+
https://github.com/paritytech/pipeline-scripts
552+
- ./pipeline-scripts/check_dependent_project.sh
553+
paritytech
554+
substrate
555+
--substrate
556+
"$DEPENDENT_REPO"
557+
"$GITHUB_PR_TOKEN"
558+
- cd "$DEPENDENT_REPO" && git rev-parse --abbrev-ref HEAD
559+
560+
# Individual jobs are set up for each dependent project so that they can be ran in parallel.
561+
# Arguably we could generate a job for each companion in the PR's description using Gitlab's
562+
# parent-child pipelines but that's more complicated.
563+
564+
check-dependent-polkadot:
565+
<<: *check-dependent-project
566+
variables:
567+
DEPENDENT_REPO: polkadot
568+
569+
check-dependent-cumulus:
570+
<<: *check-dependent-project
571+
variables:
572+
DEPENDENT_REPO: cumulus
564573

565574
build-linux-substrate: &build-binary
566575
stage: build
@@ -884,7 +893,7 @@ deploy-prometheus-alerting-rules:
884893
# Runs "quick" and "long" tests on nightly schedule and on commit / merge to master
885894
# A "quick" test is a smoke test where basic check-expect tests run by
886895
# checking values from metrics exposed by the app.
887-
# A "long" test is the load testing where we send 50K transactions into the
896+
# A "long" test is the load testing where we send 50K transactions into the
888897
# network and check if all completed successfully
889898
simnet-tests:
890899
stage: deploy

.maintain/gitlab/check_polkadot_companion_build.sh

Lines changed: 0 additions & 99 deletions
This file was deleted.

.maintain/gitlab/check_polkadot_companion_status.sh

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)