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

Move scripts used in CI to the new location #11008

Merged
merged 8 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Check labels
run: bash ${{ github.workspace }}/.maintain/github/check_labels.sh
run: bash ${{ github.workspace }}/scripts/ci/github/check_labels.sh
env:
GITHUB_PR: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/monthly-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
echo "" >> Changelog.md
echo "## Changes since last snapshot (${{ steps.tags.outputs.old }})" >> Changelog.md
echo "" >> Changelog.md
./.maintain/gitlab/generate_changelog.sh ${{ steps.tags.outputs.old }} >> Changelog.md
./scripts/ci/github/generate_changelog.sh ${{ steps.tags.outputs.old }} >> Changelog.md
- name: Release snapshot
id: release-snapshot
uses: actions/create-release@latest
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ rls*.log
.cargo-remote.toml
*.bin
*.iml
.maintain/node-template-release/Cargo.lock
scripts/ci/node-template-release/Cargo.lock
32 changes: 16 additions & 16 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# script:
# - echo "List of shell commands to run in your job"
# - echo "You can also just specify a script here, like so:"
# - ./.maintain/gitlab/my_amazing_script.sh
# - ./scripts/ci/gitlab/my_amazing_script.sh

stages:
- check
Expand Down Expand Up @@ -185,7 +185,7 @@ default:
tee ./artifacts/substrate/VERSION;
fi
- sha256sum ./artifacts/substrate/substrate | tee ./artifacts/substrate/substrate.sha256
- cp -r .maintain/docker/substrate.Dockerfile ./artifacts/substrate/
- cp -r scripts/ci/docker/substrate.Dockerfile ./artifacts/substrate/
sergejparity marked this conversation as resolved.
Show resolved Hide resolved
- sccache -s

#### Vault secrets
Expand Down Expand Up @@ -241,7 +241,7 @@ skip-if-draft:
- echo "Commit message is ${CI_COMMIT_MESSAGE}"
- echo "Ref is ${CI_COMMIT_REF_NAME}"
- echo "pipeline source is ${CI_PIPELINE_SOURCE}"
- ./.maintain/gitlab/skip_if_draft.sh
- ./scripts/ci/gitlab/skip_if_draft.sh

#### stage: check

Expand All @@ -256,7 +256,7 @@ check-runtime:
GITLAB_API: "https://gitlab.parity.io/api/v4"
GITHUB_API_PROJECT: "parity%2Finfrastructure%2Fgithub-api"
script:
- ./.maintain/gitlab/check_runtime.sh
- ./scripts/ci/gitlab/check_runtime.sh
allow_failure: true

check-signed-tag:
Expand All @@ -267,7 +267,7 @@ check-signed-tag:
- if: $CI_COMMIT_REF_NAME =~ /^ci-release-.*$/
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
script:
- ./.maintain/gitlab/check_signed.sh
- ./scripts/ci/gitlab/check_signed.sh

test-dependency-rules:
stage: check
Expand All @@ -276,7 +276,7 @@ test-dependency-rules:
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
script:
- .maintain/ensure-deps.sh
- ./scripts/ci/gitlab/ensure-deps.sh

test-prometheus-alerting-rules:
stage: check
Expand All @@ -288,11 +288,11 @@ test-prometheus-alerting-rules:
- if: $CI_COMMIT_BRANCH
changes:
- .gitlab-ci.yml
- .maintain/monitoring/**/*
- scripts/ci/monitoring/**/*
sergejparity marked this conversation as resolved.
Show resolved Hide resolved
script:
- promtool check rules .maintain/monitoring/alerting-rules/alerting-rules.yaml
- cat .maintain/monitoring/alerting-rules/alerting-rules.yaml |
promtool test rules .maintain/monitoring/alerting-rules/alerting-rule-tests.yaml
- promtool check rules scripts/ci/monitoring/alerting-rules/alerting-rules.yaml
sergejparity marked this conversation as resolved.
Show resolved Hide resolved
- cat scripts/ci/monitoring/alerting-rules/alerting-rules.yaml |
sergejparity marked this conversation as resolved.
Show resolved Hide resolved
promtool test rules scripts/ci/monitoring/alerting-rules/alerting-rule-tests.yaml
sergejparity marked this conversation as resolved.
Show resolved Hide resolved

#### stage: test

Expand All @@ -301,10 +301,10 @@ cargo-deny:
<<: *docker-env
<<: *nightly-pipeline
script:
- cargo deny check --hide-inclusion-graph -c .maintain/deny.toml
- cargo deny check --hide-inclusion-graph -c scripts/ci/deny.toml
sergejparity marked this conversation as resolved.
Show resolved Hide resolved
after_script:
- echo "___The complete log is in the artifacts___"
- cargo deny check -c .maintain/deny.toml 2> deny.log
- cargo deny check -c scripts/ci/deny.toml 2> deny.log
sergejparity marked this conversation as resolved.
Show resolved Hide resolved
artifacts:
name: $CI_COMMIT_SHORT_SHA
expire_in: 3 days
Expand Down Expand Up @@ -568,7 +568,7 @@ build-linux-substrate:
script:
- *build-linux-substrate-script
- printf '\n# building node-template\n\n'
- ./.maintain/node-template-release.sh ./artifacts/substrate/substrate-node-template.tar.gz
- ./scripts/ci/node-template-release.sh ./artifacts/substrate/substrate-node-template.tar.gz

build-linux-subkey: &build-subkey
stage: build
Expand All @@ -590,7 +590,7 @@ build-linux-subkey: &build-subkey
sed -n -E 's/^subkey ([0-9.]+.*)/\1/p' |
tee ./artifacts/subkey/VERSION;
- sha256sum ./artifacts/subkey/subkey | tee ./artifacts/subkey/subkey.sha256
- cp -r .maintain/docker/subkey.Dockerfile ./artifacts/subkey/
- cp -r scripts/ci/docker/subkey.Dockerfile ./artifacts/subkey/
sergejparity marked this conversation as resolved.
Show resolved Hide resolved
- sccache -s

build-macos-subkey:
Expand Down Expand Up @@ -784,7 +784,7 @@ publish-draft-release:
- if: $CI_COMMIT_REF_NAME =~ /^ci-release-.*$/
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
script:
- ./.maintain/gitlab/publish_draft_release.sh
- ./scripts/ci/gitlab/publish_draft_release.sh
allow_failure: true

#### stage: deploy
Expand All @@ -807,4 +807,4 @@ deploy-prometheus-alerting-rules:
- if: $CI_COMMIT_REF_NAME == "master"
changes:
- .gitlab-ci.yml
- .maintain/monitoring/**/*
- scripts/ci/monitoring/**/*
sergejparity marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion docs/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# - The latest matching rule, if multiple, takes precedence.

# CI
/.maintain/ @paritytech/ci
/scripts/ci/ @paritytech/ci
/.github/ @paritytech/ci
/.gitlab-ci.yml @paritytech/ci

Expand Down
4 changes: 2 additions & 2 deletions docs/node-template-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ the existence of your current git commit ID in the remote repository.
Assume you are in root directory of Substrate. Run:

```bash
cd .maintain/
cd .scripts/ci/
sergejparity marked this conversation as resolved.
Show resolved Hide resolved
./node-template-release.sh <output tar.gz file>
```

Expand Down Expand Up @@ -50,7 +50,7 @@ commit in Substrate remote repository, such as:
```

P.S: This step can be automated if we update `node-template-release` package in
`.maintain/node-template-release`.
`scripts/ci/node-template-release`.

4. Once the three `Cargo.toml`s are updated, compile and confirm that the Node Template builds. Then
commit the changes to a new branch in [Substrate Node Template](https://github.com/substrate-developer-hub/substrate-node-template), and make a PR.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LABEL io.parity.image.authors="[email protected]" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/subkey" \
io.parity.image.description="Subkey: key generating utility for Substrate." \
io.parity.image.source="https://github.com/paritytech/substrate/blob/${VCS_REF}/.maintain/docker/subkey.Dockerfile" \
io.parity.image.source="https://github.com/paritytech/substrate/blob/${VCS_REF}/scripts/ci/docker/subkey.Dockerfile" \
io.parity.image.revision="${VCS_REF}" \
io.parity.image.created="${BUILD_DATE}" \
io.parity.image.documentation="https://github.com/paritytech/substrate/tree/${VCS_REF}/subkey"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LABEL io.parity.image.authors="[email protected]" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/substrate" \
io.parity.image.description="Substrate: The platform for blockchain innovators." \
io.parity.image.source="https://github.com/paritytech/substrate/blob/${VCS_REF}/.maintain/docker/Dockerfile" \
io.parity.image.source="https://github.com/paritytech/substrate/blob/${VCS_REF}/scripts/ci/docker/Dockerfile" \
io.parity.image.revision="${VCS_REF}" \
io.parity.image.created="${BUILD_DATE}" \
io.parity.image.documentation="https://wiki.parity.io/Parity-Substrate"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ if [ "$#" -ne 1 ]; then
fi

PATH_TO_ARCHIVE=$1
cd $PROJECT_ROOT/.maintain/node-template-release
cd $PROJECT_ROOT/scripts/ci/node-template-release

cargo run $PROJECT_ROOT/bin/node-template $PROJECT_ROOT/$PATH_TO_ARCHIVE
Loading