From f0bdbc393dea4ed3de9f7da901c3adfba585d5ee Mon Sep 17 00:00:00 2001 From: Philip Kuryloski Date: Tue, 8 Sep 2020 13:14:35 +0200 Subject: Add a manually triggered workflow for builing base ci docker images The testing workflows rely on the presence of these base images, but they should change infrequently enough to justify manual triggering --- workflow_sources/test/rabbitmq_cli.lib.yml | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 workflow_sources/test/rabbitmq_cli.lib.yml (limited to 'workflow_sources/test/rabbitmq_cli.lib.yml') diff --git a/workflow_sources/test/rabbitmq_cli.lib.yml b/workflow_sources/test/rabbitmq_cli.lib.yml new file mode 100644 index 0000000000..e223151b46 --- /dev/null +++ b/workflow_sources/test/rabbitmq_cli.lib.yml @@ -0,0 +1,38 @@ +#@ load("@ytt:data", "data") +#@ load("helpers.lib.yml", "ci_image") + +#@ def rabbitmq_cli_job(dep): +name: #@ dep.name +needs: + - prepare +runs-on: ubuntu-18.04 +#@yaml/text-templated-strings +steps: + - name: RECORD STEP START + id: buildevents + run: | + echo "::set-output name=step_start::$(date +%s)" + - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master + with: + service_account_key: ${{ secrets.GCR_JSON_KEY }} + export_default_credentials: true + - name: RUN TESTS + run: | + gcloud auth configure-docker + docker pull (@= ci_image() @) + docker run \ + --env project=(@= dep.name @) \ + --env GITHUB_RUN_ID=${{ github.run_id }} \ + --env BUILDEVENT_APIKEY=${{ secrets.HONEYCOMB_API_KEY }} \ + --env STEP_START=${{ steps.buildevents.outputs.step_start }} \ + --volume /tmp/broker-logs:/broker-logs \ + (@= ci_image() @) \ + ci/scripts/rabbitmq_cli.sh + - name: ON FAILURE UPLOAD TESTS LOGS ARTIFACT + #! https://github.com/marketplace/actions/upload-artifact + uses: actions/upload-artifact@v2-preview + if: failure() + with: + name: (@= dep.name @)-broker-logs + path: "/tmp/broker-logs/broker-logs.tar.xz" +#@ end \ No newline at end of file -- cgit v1.2.1 From 316b27d65a9ed4bb3ef2d7333b2f16005968b425 Mon Sep 17 00:00:00 2001 From: Philip Kuryloski Date: Fri, 25 Sep 2020 15:06:32 +0200 Subject: Adjustments for rabbitmq-cli tests - Provide RABBITMQ_VERSION so that plugin version compatibility checks work correctly - Run tests generally as an unpriveleged user in docker, like we do in concourse - Set USER in the env for erlang-cookie-sources tests --- workflow_sources/test/rabbitmq_cli.lib.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'workflow_sources/test/rabbitmq_cli.lib.yml') diff --git a/workflow_sources/test/rabbitmq_cli.lib.yml b/workflow_sources/test/rabbitmq_cli.lib.yml index e223151b46..ba447375f1 100644 --- a/workflow_sources/test/rabbitmq_cli.lib.yml +++ b/workflow_sources/test/rabbitmq_cli.lib.yml @@ -20,12 +20,13 @@ steps: run: | gcloud auth configure-docker docker pull (@= ci_image() @) + mkdir broker-logs && chmod 777 broker-logs docker run \ --env project=(@= dep.name @) \ --env GITHUB_RUN_ID=${{ github.run_id }} \ --env BUILDEVENT_APIKEY=${{ secrets.HONEYCOMB_API_KEY }} \ --env STEP_START=${{ steps.buildevents.outputs.step_start }} \ - --volume /tmp/broker-logs:/broker-logs \ + --volume ${PWD}/broker-logs:/workspace/broker-logs \ (@= ci_image() @) \ ci/scripts/rabbitmq_cli.sh - name: ON FAILURE UPLOAD TESTS LOGS ARTIFACT @@ -34,5 +35,5 @@ steps: if: failure() with: name: (@= dep.name @)-broker-logs - path: "/tmp/broker-logs/broker-logs.tar.xz" + path: "broker-logs/broker-logs.tar.xz" #@ end \ No newline at end of file -- cgit v1.2.1 From 6ccd69e5261dd3334d83335fc2111b4c46986d71 Mon Sep 17 00:00:00 2001 From: Philip Kuryloski Date: Tue, 29 Sep 2020 11:10:22 +0200 Subject: Refactor GitHub Actions workflow templates Convert pure starlark files into '.star' files for better readability, especially for multiline starlark statements --- workflow_sources/test/rabbitmq_cli.lib.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'workflow_sources/test/rabbitmq_cli.lib.yml') diff --git a/workflow_sources/test/rabbitmq_cli.lib.yml b/workflow_sources/test/rabbitmq_cli.lib.yml index ba447375f1..b0b6b73484 100644 --- a/workflow_sources/test/rabbitmq_cli.lib.yml +++ b/workflow_sources/test/rabbitmq_cli.lib.yml @@ -1,5 +1,5 @@ #@ load("@ytt:data", "data") -#@ load("helpers.lib.yml", "ci_image") +#@ load("helpers.star", "ci_image") #@ def rabbitmq_cli_job(dep): name: #@ dep.name -- cgit v1.2.1 From 9f6d64ec4a4b1eeac24d7846c5c64fd96798d892 Mon Sep 17 00:00:00 2001 From: Philip Kuryloski Date: Wed, 18 Nov 2020 10:19:12 +0100 Subject: Make it possible to skip ci in a commit with `[ci skip]` By placing that sequence of characters in the commit message --- workflow_sources/test/rabbitmq_cli.lib.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'workflow_sources/test/rabbitmq_cli.lib.yml') diff --git a/workflow_sources/test/rabbitmq_cli.lib.yml b/workflow_sources/test/rabbitmq_cli.lib.yml index b0b6b73484..4281547814 100644 --- a/workflow_sources/test/rabbitmq_cli.lib.yml +++ b/workflow_sources/test/rabbitmq_cli.lib.yml @@ -1,11 +1,12 @@ #@ load("@ytt:data", "data") -#@ load("helpers.star", "ci_image") +#@ load("helpers.star", "ci_image", "skip_ci_condition") #@ def rabbitmq_cli_job(dep): name: #@ dep.name needs: - prepare runs-on: ubuntu-18.04 +if: #@ skip_ci_condition() #@yaml/text-templated-strings steps: - name: RECORD STEP START -- cgit v1.2.1