Skip to content

Commit

Permalink
do not check unleash on every PR, only master and tags (paritytech#5054)
Browse files Browse the repository at this point in the history
* do not check unleash on every PR, only master and tags

* move scripts folder

* add signed-tag check to CI

* remove publish-to-crates-io dependencies

Co-authored-by: s3krit <[email protected]>
  • Loading branch information
2 people authored and General-Beck committed Mar 4, 2020
1 parent 49d645f commit 4739c37
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 17 deletions.
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

0 comments on commit 4739c37

Please sign in to comment.