Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
ci: trigger unity and cuelang.org builds/equivalent on tip/new versions
Browse files Browse the repository at this point in the history
A new tip merge of CUE should:

* trigger a unity build
* trigger a redeploy of tip.cuelang.org

A new release of CUE should:

* trigger a unity build against that version
* prompt us to release a new version of cuelang.org

We could choose to make the release of a new version of cuelang.org on a
new version of CUE automatic (or automate the creation of a PR that
releases a new version of cuelang.org), but for now we simply trigger a
build which will fail if the current version of CUE referenced by
cuelang.org is _not_ the latest. This in effect will be the prompt we
need to perform a manual release of cuelang.org, using the latest CUE.

This change reflects the desired end state described above. Automating
the release of cuelang.org/creation of a PR can follow later.

Change-Id: I6623fd50c6c15e4f423bc204d65e3dc98569da7a
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9576
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
  • Loading branch information
myitcv committed May 1, 2021
1 parent 3cdf845 commit 6c6b4e7
Show file tree
Hide file tree
Showing 6 changed files with 544 additions and 219 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/new_version_triggers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by internal/ci/ci_tool.cue; do not edit

name: New release triggers
on:
push:
tags:
- v*
jobs:
push:
runs-on: ubuntu-18.04
defaults:
run:
shell: bash
steps:
- name: Rebuild tip.cuelang.org
run: 'curl -s -H "Content-Type: application/json" -u cueckoo:$CUECKOO_GITHUB_PAT
--request POST --data-binary "{"event_type": "Re-test post release of ${GITHUB_REF##refs/tags/}"}"
https://api.github.com/repos/cuelang/cuelang.org/dispatches'
- name: Trigger unity build
run: 'curl -s -H "Content-Type: application/json" -u cueckoo:$CUECKOO_GITHUB_PAT
--request POST --data-binary "{"event_type": "Check against CUE ${GITHUB_REF##refs/tags/}",
"client_payload": {"type": "unity", "payload": {"versions": "\"${GITHUB_REF##refs/tags/}}})\""}}}"
https://api.github.com/repos/cue-sh/unity/dispatches'
17 changes: 0 additions & 17 deletions .github/workflows/rebuild_tip_cuelang_org.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/tip_triggers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by internal/ci/ci_tool.cue; do not edit

name: Push to tip triggers
on:
push:
branches:
- master
jobs:
push:
runs-on: ubuntu-18.04
defaults:
run:
shell: bash
steps:
- name: Rebuild tip.cuelang.org
run: curl -f -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.CuelangOrgTipRebuildHook
}}
- name: Trigger unity build
run: 'curl -s -H "Content-Type: application/json" -u cueckoo:$CUECKOO_GITHUB_PAT
--request POST --data-binary "{"event_type": "Check against ${GITHUB_SHA}",
"client_payload": {"type": "unity", "payload": {"versions": "\"commit:${GITHUB_SHA})\""}}}"
https://api.github.com/repos/cue-sh/unity/dispatches'
Loading

0 comments on commit 6c6b4e7

Please sign in to comment.