authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-03 14:55:09-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-03 14:55:21-05:00
log96984e3033a084eac887a02e7c86d3b58c75b7f0
tree607b69380c5f9671e02ab979f48f2e3cad5524ec
parent629b91da610e2567c5ce4df097e062c0b605ebc0
signaturelock-open Commit is signed but in an unrecognized format.

ci: avoid leaking oauth access token


6 files changed, 14 insertions(+), 4 deletions(-)

.builds/freebsd.yml+1-1
...@@ -7,7 +7,7 @@ packages:...@@ -7,7 +7,7 @@ packages:
7 - jq7 - jq
8secrets:8secrets:
9 - 6c60aaee-92e7-4e7d-812c-114817689b4d9 - 6c60aaee-92e7-4e7d-812c-114817689b4d
10 - 2cd8c203-ba06-4504-be49-1e2b9b71efdd10 - dd0bd962-7664-4d3e-b0f3-41c9ee96b8b8
11sources:11sources:
12 - https://github.com/ziglang/zig12 - https://github.com/ziglang/zig
13tasks:13tasks:
ci/azure/on_master_success+3-1
...@@ -1,6 +1,8 @@...@@ -1,6 +1,8 @@
1#!/bin/sh1#!/bin/sh
22
3set -x3# We do not set -x because this would leak the oauth access token.
4set +x
5
4set -e6set -e
57
6sudo apt-get update -y8sudo apt-get update -y
ci/azure/pipelines.yml+1-1
...@@ -44,7 +44,7 @@ jobs:...@@ -44,7 +44,7 @@ jobs:
44 - script: ci/azure/windows_script.bat44 - script: ci/azure/windows_script.bat
45 name: main45 name: main
46 displayName: 'Build and test'46 displayName: 'Build and test'
47- job: UpdateDownloadPage47- job: OnMasterSuccess
48 dependsOn:48 dependsOn:
49 - BuildMacOS49 - BuildMacOS
50 - BuildLinux50 - BuildLinux
ci/drone/linux_script+3
...@@ -61,6 +61,9 @@ if [ -z "$DRONE_PULL_REQUEST" ]; then...@@ -61,6 +61,9 @@ if [ -z "$DRONE_PULL_REQUEST" ]; then
61 s3cmd put -P --add-header="Cache-Control: max-age=0, must-revalidate" "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE"61 s3cmd put -P --add-header="Cache-Control: max-age=0, must-revalidate" "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE"
62 s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$TRIPLEARCH-linux-$VERSION.json"62 s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$TRIPLEARCH-linux-$VERSION.json"
63 if [ "$GITBRANCH" = "master" ]; then 63 if [ "$GITBRANCH" = "master" ]; then
64 # avoid leaking oauth token
65 set +x
66
64 cd "$BUILDDIR"67 cd "$BUILDDIR"
65 ./ci/srht/on_master_success "$VERSION" "$SRHT_OAUTH_TOKEN"68 ./ci/srht/on_master_success "$VERSION" "$SRHT_OAUTH_TOKEN"
66 fi69 fi
ci/srht/freebsd_script+3
...@@ -88,6 +88,9 @@ if [ -f ~/.s3cfg ]; then...@@ -88,6 +88,9 @@ if [ -f ~/.s3cfg ]; then
88 s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/x86_64-freebsd-$VERSION.json"88 s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/x86_64-freebsd-$VERSION.json"
8989
90 if [ "$GITBRANCH" = "master" ]; then 90 if [ "$GITBRANCH" = "master" ]; then
91 # avoid leaking oauth token
92 set +x
93
91 OAUTH_TOKEN="$(cat ~/.oauth_token)"94 OAUTH_TOKEN="$(cat ~/.oauth_token)"
92 cd "$ZIGDIR"95 cd "$ZIGDIR"
93 ./ci/srht/on_master_success "$VERSION" "$OAUTH_TOKEN"96 ./ci/srht/on_master_success "$VERSION" "$OAUTH_TOKEN"
ci/srht/on_master_success+3-1
...@@ -6,7 +6,9 @@...@@ -6,7 +6,9 @@
6# * jq6# * jq
7# * cat7# * cat
88
9set -x9# We do not set -x because this would leak the oauth access token.
10set +x
11
10set -e12set -e
1113
12VERSION="$1"14VERSION="$1"