ci: linux: supply on_master_sucess with VERSION

- move on_master_success to the package step
- add required secret availability for packaging

This replaces a1b79ea5857a52332d9da49d261a7fd04e52a466 .
This commit is contained in:
Michael Dusan 2021-12-06 21:02:47 -05:00 committed by Andrew Kelley
parent 7d1f47313d
commit a711fcbbfa
3 changed files with 8 additions and 41 deletions

View File

@ -40,31 +40,7 @@ steps:
from_secret: AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: AWS_SECRET_ACCESS_KEY
commands:
- ./ci/zinc/linux_package.sh
---
kind: pipeline
type: docker
name: on-master-success
platform:
os: linux
arch: amd64
workspace:
path: /workspace
depends_on:
- x86_64-linux
trigger:
branch:
- master
event:
- push
steps:
- name: on-master-sucess
image: ci/debian-amd64:11.1-2
environment:
SRHT_OAUTH_TOKEN:
from_secret: SRHT_OAUTH_TOKEN
commands:
- ./ci/zinc/linux_on_master_sucess.sh
- ./ci/zinc/linux_package.sh

View File

@ -1,14 +0,0 @@
#!/bin/sh
. ./ci/zinc/linux_base.sh
VERSION=$(cat $WORKSPACE/env.version)
# Avoid leaking oauth token.
set +x
cd $WORKSPACE
./ci/srht/on_master_success "$VERSION" "$SRHT_OAUTH_TOKEN"
# Explicit exit helps show last command duration.
exit

View File

@ -36,8 +36,13 @@ s3cmd put -P --add-header="cache-control: public, max-age=31536000, immutable" "
# Publish manifest.
s3cmd put -P --add-header="cache-control: max-age=0, must-revalidate" "$MANIFEST" "s3://ziglang.org/builds/$ARCH-linux-$VERSION.json"
# Forward value to on_master_script
echo "$VERSION" > $WORKSPACE/env.version
# Avoid leaking oauth token.
set +x
cd $WORKSPACE
./ci/srht/on_master_success "$VERSION" "$SRHT_OAUTH_TOKEN"
set -x
# Explicit exit helps show last command duration.
exit