mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
ci: extract validate-toolstate into a script
This commit is contained in:
parent
af6b26646b
commit
6104aa77eb
@ -144,18 +144,7 @@ steps:
|
||||
|
||||
# As a quick smoke check on the otherwise very fast mingw-check linux builder
|
||||
# check our own internal scripts.
|
||||
- bash: |
|
||||
set -e
|
||||
git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git
|
||||
cd rust-toolstate
|
||||
python2.7 "$BUILD_SOURCESDIRECTORY/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" ""
|
||||
# Only check maintainers if this build is supposed to publish toolstate.
|
||||
# Builds that are not supposed to publish don't have the access token.
|
||||
if [ -n "${TOOLSTATE_PUBLISH+is_set}" ]; then
|
||||
TOOLSTATE_VALIDATE_MAINTAINERS_REPO=rust-lang/rust python2.7 "${BUILD_SOURCESDIRECTORY}/src/tools/publish_toolstate.py"
|
||||
fi
|
||||
cd ..
|
||||
rm -rf rust-toolstate
|
||||
- bash: src/ci/scripts/validate-toolstate.sh
|
||||
env:
|
||||
TOOLSTATE_REPO_ACCESS_TOKEN: $(TOOLSTATE_REPO_ACCESS_TOKEN)
|
||||
condition: and(succeeded(), not(variables.SKIP_JOB), eq(variables['IMAGE'], 'mingw-check'))
|
||||
|
18
src/ci/scripts/validate-toolstate.sh
Executable file
18
src/ci/scripts/validate-toolstate.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# A quick smoke test to make sure publish_tooolstate.py works.
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
|
||||
|
||||
git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git
|
||||
cd rust-toolstate
|
||||
python2.7 "${BUILD_SOURCESDIRECTORY}/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" ""
|
||||
# Only check maintainers if this build is supposed to publish toolstate.
|
||||
# Builds that are not supposed to publish don't have the access token.
|
||||
if [ -n "${TOOLSTATE_PUBLISH+is_set}" ]; then
|
||||
TOOLSTATE_VALIDATE_MAINTAINERS_REPO=rust-lang/rust python2.7 "${BUILD_SOURCESDIRECTORY}/src/tools/publish_toolstate.py"
|
||||
fi
|
||||
cd ..
|
||||
rm -rf rust-toolstate
|
Loading…
Reference in New Issue
Block a user