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

Commit

Permalink
ci: fix broken tip and new version triggers
Browse files Browse the repository at this point in the history
For some reason, the local testing of these gave a false positive pass.
Hopefully this time we've got the shell script right.

Change-Id: I1d3c65f48ca7c8275eddebc1e7340b6e5fe40ef5
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9581
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
  • Loading branch information
myitcv committed May 1, 2021
1 parent 6c6b4e7 commit 24ce27e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/new_version_triggers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
- 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/}}})\""}}}"
"client_payload": {"type": "unity", "payload": {"versions": "\"${GITHUB_REF##refs/tags/}\"}}}"
https://api.github.com/repos/cue-sh/unity/dispatches'
2 changes: 1 addition & 1 deletion .github/workflows/tip_triggers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
- 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})\""}}}"
"client_payload": {"type": "unity", "payload": {"versions": "\"commit:${GITHUB_SHA}\""}}}"
https://api.github.com/repos/cue-sh/unity/dispatches'
8 changes: 4 additions & 4 deletions cmd/cue/cmd/testdata/script/cmd_github.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- 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/}}})\""}}}"
"client_payload": {"type": "unity", "payload": {"versions": "\"${GITHUB_REF##refs/tags/}\"}}}"
https://api.github.com/repos/cue-sh/unity/dispatches'
-- .github/workflows/release.yml.golden --
# Generated by internal/ci/ci_tool.cue; do not edit
Expand Down Expand Up @@ -351,7 +351,7 @@ jobs:
- 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})\""}}}"
"client_payload": {"type": "unity", "payload": {"versions": "\"commit:${GITHUB_SHA}\""}}}"
https://api.github.com/repos/cue-sh/unity/dispatches'
-- internal/ci/ci_tool.cue --
// Copyright 2021 The CUE Authors
Expand Down Expand Up @@ -1415,7 +1415,7 @@ tip_triggers: _#bashWorkflow & {
}, {
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
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
"""
}]
}
Expand All @@ -1433,7 +1433,7 @@ new_version_triggers: _#bashWorkflow & {
}, {
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
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
"""
}]
}
Expand Down
16 changes: 8 additions & 8 deletions cue/testdata/eval/github.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ tip_triggers: _#bashWorkflow & {
}, {
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
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
"""
}]
}
Expand All @@ -279,7 +279,7 @@ new_version_triggers: _#bashWorkflow & {
}, {
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
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
"""
}]
}
Expand Down Expand Up @@ -1624,7 +1624,7 @@ import "strings"
}
1: (#struct){
name: (string){ "Trigger unity build" }
run: (string){ "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" }
run: (string){ "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" }
}
}
defaults: (#struct){
Expand Down Expand Up @@ -1695,7 +1695,7 @@ import "strings"
}
1: (#struct){
name: (string){ "Trigger unity build" }
run: (string){ "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" }
run: (string){ "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" }
}
}
defaults: (#struct){
Expand Down Expand Up @@ -2394,7 +2394,7 @@ import "strings"
}
1: (#struct){
name: (string){ "Trigger unity build" }
run: (string){ "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" }
run: (string){ "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" }
}
}
defaults: (#struct){
Expand Down Expand Up @@ -2462,7 +2462,7 @@ import "strings"
}
1: (#struct){
name: (string){ "Trigger unity build" }
run: (string){ "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" }
run: (string){ "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" }
}
}
defaults: (#struct){
Expand Down Expand Up @@ -2958,7 +2958,7 @@ import "strings"
},
{
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"
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"
},
]
}
Expand All @@ -2983,7 +2983,7 @@ import "strings"
},
{
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"
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"
},
]
}
Expand Down
4 changes: 2 additions & 2 deletions internal/ci/workflows.cue
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ tip_triggers: _#bashWorkflow & {
{
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
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
"""
},
]
Expand All @@ -356,7 +356,7 @@ new_version_triggers: _#bashWorkflow & {
{
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
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
"""
},
]
Expand Down

0 comments on commit 24ce27e

Please sign in to comment.