Skip to content

Commit

Permalink
Record workflow conclusions in a GCS bucket
Browse files Browse the repository at this point in the history
To make it convenient to leverage a result in Concourse
  • Loading branch information
pjk25 committed Nov 13, 2020
1 parent cadd22a commit d351aec
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test-erlang-otp-22.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3664,6 +3664,11 @@ jobs:
export_default_credentials: true
- name: RECORD BUILD FINISH
run: |
echo -n "${{ env.WORKFLOW_CONCLUSION }}" > conclusion
gsutil cp conclusion \
'gs://monorepo_github_actions_conclusions/${{ github.sha }}/${{ github.workflow }}'
gcloud auth configure-docker
docker pull eu.gcr.io/cf-rabbitmq-core/ci:erlang-22.3-rabbitmq-${{ github.sha }}
docker run \
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-erlang-otp-23.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3835,6 +3835,11 @@ jobs:
export_default_credentials: true
- name: RECORD BUILD FINISH
run: |
echo -n "${{ env.WORKFLOW_CONCLUSION }}" > conclusion
gsutil cp conclusion \
'gs://monorepo_github_actions_conclusions/${{ github.sha }}/${{ github.workflow }}'
gcloud auth configure-docker
docker pull eu.gcr.io/cf-rabbitmq-core/ci:erlang-23.1-rabbitmq-${{ github.sha }}
docker run \
Expand Down
12 changes: 12 additions & 0 deletions workflow_sources/test/finish.lib.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#@ load("@ytt:data", "data")
#@ load("helpers.star", "ci_image")

#@ def gcs_path():
#@ c = ['monorepo_github_actions_conclusions']
#@ c.append('${{ github.sha }}')
#@ c.append('${{ github.workflow }}')
#@ return '/'.join(c)
#@ end

#@ def finish_jobs(prepare_jobs_names):
package-generic-unix:
name: package-generic-unix
Expand Down Expand Up @@ -58,6 +65,11 @@ finish:
export_default_credentials: true
- name: RECORD BUILD FINISH
run: |
echo -n "${{ env.WORKFLOW_CONCLUSION }}" > conclusion
gsutil cp conclusion \
'gs://(@= gcs_path() @)'
gcloud auth configure-docker
docker pull (@= ci_image() @)
docker run \
Expand Down

0 comments on commit d351aec

Please sign in to comment.