From b01b5b911f3bb209ee619055a154cd81ca0674be Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 25 Jul 2019 11:51:08 +0200 Subject: [PATCH] ci: gate toolstate repo pushes on the TOOLSTATE_PUBLISH envvar Unfortunately due to an Azure quirk the TOOLSTATE_REPO_ACCESS_TOKEN is not suitable to gate whether to push new commits to the repo, as if it's not defined on the Azure side it will actually be set to the literal `$(TOOLSTATE_REPO_ACCESS_TOKEN)`, which screws everything up. This instead adds another, non-secret environment variable to gate publishing: TOOLSTATE_PUBLISH. As non-secret environment variables behave correctly this fixes the issue. --- src/ci/docker/x86_64-gnu-tools/checktools.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ci/docker/x86_64-gnu-tools/checktools.sh b/src/ci/docker/x86_64-gnu-tools/checktools.sh index 9995d2aac7f24..2191d5d6e4680 100755 --- a/src/ci/docker/x86_64-gnu-tools/checktools.sh +++ b/src/ci/docker/x86_64-gnu-tools/checktools.sh @@ -112,7 +112,7 @@ $COMMIT\t$(cat "$TOOLSTATE_FILE") } if [ "$RUST_RELEASE_CHANNEL" = nightly ]; then - if [ -n "${TOOLSTATE_REPO_ACCESS_TOKEN+is_set}" ]; then + if [ -n "${TOOLSTATE_PUBLISH+is_set}" ]; then . "$(dirname $0)/repo.sh" MESSAGE_FILE=$(mktemp -t msg.XXXXXX) echo "($OS CI update)" > "$MESSAGE_FILE"