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

Commit

Permalink
handle substrate-node-template and substrate-parachain-template (#6541)
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-paulo-parity authored Jan 11, 2023
1 parent 0ac8822 commit 7f3a6e1
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions scripts/ci/gitlab/pipeline/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,24 +215,37 @@ publish-rustdoc:
after_script:
- rm -rf .git/ ./*

# Ref: https://github.com/paritytech/opstooling/issues/111
update-node-template:
.update-substrate-template-repository:
stage: publish
extends: .kubernetes-env
variables:
GIT_STRATEGY: none
GIT_STRATEGY: none
rules:
# The template is only updated for FINAL releases
# i.e. the rule should not cover RC or patch releases
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+$/ # e.g. v1.0
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/ # e.g. v1.0.0
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+$/ # e.g. v1.0
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/ # e.g. v1.0.0
script:
- git clone --depth=1 --branch="$PIPELINE_SCRIPTS_TAG" https://github.com/paritytech/pipeline-scripts
- export POLKADOT_BRANCH="polkadot-v$CI_COMMIT_TAG"
- git clone --depth=1 --branch="$POLKADOT_BRANCH" https://github.com/paritytech/substrate
- cd substrate
- ../pipeline-scripts/update_substrate_template.sh
--repo-name "substrate-node-template"
--template-path "bin/node-template"
--repo-name "$TARGET_REPOSITORY"
--template-path "$TEMPLATE_PATH"
--github-api-token "$GITHUB_TOKEN"
--polkadot-branch "$POLKADOT_BRANCH"

# Ref: https://github.com/paritytech/opstooling/issues/111
update-node-template:
extends: .update-substrate-template-repository
variables:
TARGET_REPOSITORY: substrate-node-template
TEMPLATE_PATH: bin/node-template

# Ref: https://github.com/paritytech/opstooling/issues/111
update-parachain-template:
extends: .update-substrate-template-repository
variables:
TARGET_REPOSITORY: substrate-parachain-template
TEMPLATE_PATH: parachain-template

0 comments on commit 7f3a6e1

Please sign in to comment.