From 746e02ecbb8132346fdf0ae938fd883366ca124a Mon Sep 17 00:00:00 2001 From: Paul Jolly Date: Mon, 3 May 2021 09:13:36 +0100 Subject: [PATCH] ci: more debugging of tip triggers Change-Id: I49a034bfbbf70a1683622d30b5262d4b0d949f07 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9622 Reviewed-by: CUE cueckoo Reviewed-by: Paul Jolly --- .github/workflows/tip_triggers.yml | 2 +- cmd/cue/cmd/testdata/script/cmd_github.txt | 4 ++-- cue/testdata/eval/github.txtar | 8 ++++---- internal/ci/workflows.cue | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tip_triggers.yml b/.github/workflows/tip_triggers.yml index dbcccdad9..3bae34bb6 100644 --- a/.github/workflows/tip_triggers.yml +++ b/.github/workflows/tip_triggers.yml @@ -16,7 +16,7 @@ jobs: run: curl -s -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:${{ secrets.CUECKOO_GITHUB_PAT + run: 'echo curl -s -H "Content-Type: application/json" -u cueckoo:${{ secrets.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' diff --git a/cmd/cue/cmd/testdata/script/cmd_github.txt b/cmd/cue/cmd/testdata/script/cmd_github.txt index 674fbb9e0..d56fe306d 100644 --- a/cmd/cue/cmd/testdata/script/cmd_github.txt +++ b/cmd/cue/cmd/testdata/script/cmd_github.txt @@ -349,7 +349,7 @@ jobs: run: curl -s -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:${{ secrets.CUECKOO_GITHUB_PAT + run: 'echo curl -s -H "Content-Type: application/json" -u cueckoo:${{ secrets.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' @@ -1414,7 +1414,7 @@ tip_triggers: _#bashWorkflow & { run: "\(_#curl) -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.CuelangOrgTipRebuildHook }}" }, { name: "Trigger unity build" - run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.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: "echo \(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.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" }] } } diff --git a/cue/testdata/eval/github.txtar b/cue/testdata/eval/github.txtar index e97f8e0d4..189a295ef 100644 --- a/cue/testdata/eval/github.txtar +++ b/cue/testdata/eval/github.txtar @@ -260,7 +260,7 @@ tip_triggers: _#bashWorkflow & { run: "\(_#curl) -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.CuelangOrgTipRebuildHook }}" }, { name: "Trigger unity build" - run: "\(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.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: "echo \(_#curl) -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.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" }] } } @@ -1619,7 +1619,7 @@ import "strings" } 1: (#struct){ name: (string){ "Trigger unity build" } - run: (string){ "curl -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.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){ "echo curl -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.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){ @@ -2389,7 +2389,7 @@ import "strings" } 1: (#struct){ name: (string){ "Trigger unity build" } - run: (string){ "curl -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.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){ "echo curl -s -H \"Content-Type: application/json\" -u cueckoo:${{ secrets.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){ @@ -2954,7 +2954,7 @@ import "strings" }, { name: "Trigger unity build" - run: "\(〈4;_#curl〉) -H "Content-Type: application/json" -u cueckoo:${{ secrets.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: "echo \(〈4;_#curl〉) -H "Content-Type: application/json" -u cueckoo:${{ secrets.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" }, ] } diff --git a/internal/ci/workflows.cue b/internal/ci/workflows.cue index b731363e0..db7e35709 100644 --- a/internal/ci/workflows.cue +++ b/internal/ci/workflows.cue @@ -333,7 +333,7 @@ tip_triggers: _#bashWorkflow & { { name: "Trigger unity build" run: """ - \(_#curl) -H "Content-Type: application/json" -u cueckoo:${{ secrets.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 + echo \(_#curl) -H "Content-Type: application/json" -u cueckoo:${{ secrets.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 """ }, ]