zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 96984e3033a084eac887a02e7c86d3b58c75b7f0 (tree)
parent 629b91da610e2567c5ce4df097e062c0b605ebc0
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Sun,  3 Nov 2019 14:55:09 -0500

ci: avoid leaking oauth access token

Diffstat:
M.builds/freebsd.yml | 2+-
Mci/azure/on_master_success | 4+++-
Mci/azure/pipelines.yml | 2+-
Mci/drone/linux_script | 3+++
Mci/srht/freebsd_script | 3+++
Mci/srht/on_master_success | 4+++-
6 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml @@ -7,7 +7,7 @@ packages: - jq secrets: - 6c60aaee-92e7-4e7d-812c-114817689b4d - - 2cd8c203-ba06-4504-be49-1e2b9b71efdd + - dd0bd962-7664-4d3e-b0f3-41c9ee96b8b8 sources: - https://github.com/ziglang/zig tasks: diff --git a/ci/azure/on_master_success b/ci/azure/on_master_success @@ -1,6 +1,8 @@ #!/bin/sh -set -x +# We do not set -x because this would leak the oauth access token. +set +x + set -e sudo apt-get update -y diff --git a/ci/azure/pipelines.yml b/ci/azure/pipelines.yml @@ -44,7 +44,7 @@ jobs: - script: ci/azure/windows_script.bat name: main displayName: 'Build and test' -- job: UpdateDownloadPage +- job: OnMasterSuccess dependsOn: - BuildMacOS - BuildLinux diff --git a/ci/drone/linux_script b/ci/drone/linux_script @@ -61,6 +61,9 @@ if [ -z "$DRONE_PULL_REQUEST" ]; then s3cmd put -P --add-header="Cache-Control: max-age=0, must-revalidate" "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$TRIPLEARCH-linux-$VERSION.json" if [ "$GITBRANCH" = "master" ]; then + # avoid leaking oauth token + set +x + cd "$BUILDDIR" ./ci/srht/on_master_success "$VERSION" "$SRHT_OAUTH_TOKEN" fi diff --git a/ci/srht/freebsd_script b/ci/srht/freebsd_script @@ -88,6 +88,9 @@ if [ -f ~/.s3cfg ]; then s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/x86_64-freebsd-$VERSION.json" if [ "$GITBRANCH" = "master" ]; then + # avoid leaking oauth token + set +x + OAUTH_TOKEN="$(cat ~/.oauth_token)" cd "$ZIGDIR" ./ci/srht/on_master_success "$VERSION" "$OAUTH_TOKEN" diff --git a/ci/srht/on_master_success b/ci/srht/on_master_success @@ -6,7 +6,9 @@ # * jq # * cat -set -x +# We do not set -x because this would leak the oauth access token. +set +x + set -e VERSION="$1"