Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all 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
26 changes: 20 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# script:
# - echo "List of shell commands to run in your job"
# - echo "You can also just specify a script here, like so:"
# - ./scripts/gitlab/my_amazing_script.sh
# - ./.maintain/gitlab/my_amazing_script.sh

stages:
- test
Expand Down Expand Up @@ -104,6 +104,16 @@ check-runtime:
interruptible: true
allow_failure: true

check-signed-tag:
stage: test
image: parity/tools:latest
<<: *kubernetes-build
only:
- tags
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
script:
- ./.maintain/gitlab/check_signed.sh
allow_failure: false

check-line-width:
stage: test
Expand Down Expand Up @@ -177,7 +187,14 @@ test-dependency-rules:
- $DEPLOY_TAG
script:
- .maintain/ensure-deps.sh
# FIXME set to release

unleash-check:
stage: test
<<: *docker-env
only:
- master
- tags
script:
- cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}
- cargo unleash check ${CARGO_UNLEASH_PKG_DEF}

Expand Down Expand Up @@ -552,16 +569,13 @@ publish-draft-release:
- tags
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
script:
- ./scripts/gitlab/publish_draft_release.sh
- ./.maintain/gitlab/publish_draft_release.sh
interruptible: true
allow_failure: true

publish-to-crates-io:
stage: publish
<<: *docker-env
dependencies:
- build-linux-substrate
- test-dependency-rules
only:
- tags
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
Expand Down
16 changes: 16 additions & 0 deletions .maintain/gitlab/check_signed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

# shellcheck source=lib.sh
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/lib.sh"

version="$CI_COMMIT_TAG"

echo '[+] Checking tag has been signed'
check_tag "paritytech/substrate" "$version"
case $? in
0) echo '[+] Tag found and has been signed'; exit 0
;;
1) echo '[!] Tag found but has not been signed. Aborting release.'; exit 1
;;
2) echo '[!] Tag not found. Aborting release.'; exit 1
esac
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@ version="$CI_COMMIT_TAG"
last_version=$(git tag -l | sort -V | grep -B 1 -x "$version" | head -n 1)
echo "[+] Version: $version; Previous version: $last_version"

# Check that a signed tag exists on github for this version
echo '[+] Checking tag has been signed'
#check_tag "paritytech/substrate" "$version"
case $? in
0) echo '[+] Tag found and has been signed'
;;
1) echo '[!] Tag found but has not been signed. Aborting release.'; exit 1
;;
2) echo '[!] Tag not found. Aborting release.'; exit
esac

all_changes="$(sanitised_git_logs "$last_version" "$version")"
labelled_changes=""
echo "[+] Iterating through $(wc -l <<< "$all_changes") changes to find labelled PRs"
Expand Down