summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kuryloski <kuryloskip@vmware.com>2020-11-27 09:48:05 +0100
committerMichael Klishin <michael@clojurewerkz.org>2020-11-30 13:29:16 +0300
commitc40d90b2330ba2648bcb35ef97180b7222a398f5 (patch)
tree38da92bab21c6a7bd3d51c029639e1febddf0fa1
parent4a6bd67bc9398f2ad797935fef4fe9c11f85bfd4 (diff)
downloadrabbitmq-server-git-c40d90b2330ba2648bcb35ef97180b7222a398f5.tar.gz
GitHub Actions tweaks
1. Set ERLANG_VERSION explicitly in the rabbitmq_peer_discovery_aws tests as terraform requires it (it should already be present in our ci docker images, but I have not figured out why not yet) 2. Ensure that 'rabbit' & 'finish' jobs in actions do not run for cancelled workflows
-rw-r--r--.github/workflows/test-erlang-otp-22.3.yaml5
-rw-r--r--.github/workflows/test-erlang-otp-23.1.yaml5
-rw-r--r--.github/workflows/test-erlang-otp-git.yaml5
-rw-r--r--ci/dockerfiles/ci1
-rw-r--r--workflow_sources/test/ct.lib.yml4
-rw-r--r--workflow_sources/test/finish.lib.yml4
-rw-r--r--workflow_sources/test/tests.lib.yml5
7 files changed, 17 insertions, 12 deletions
diff --git a/.github/workflows/test-erlang-otp-22.3.yaml b/.github/workflows/test-erlang-otp-22.3.yaml
index a2cab35398..af2197c973 100644
--- a/.github/workflows/test-erlang-otp-22.3.yaml
+++ b/.github/workflows/test-erlang-otp-22.3.yaml
@@ -7212,7 +7212,7 @@ jobs:
- rabbit-ct-upgrade_preparation
- rabbit-ct-vhost
runs-on: ubuntu-18.04
- if: '!contains(github.event.head_commit.message, ''[ci skip]'') && always()'
+ if: '!contains(github.event.head_commit.message, ''[ci skip]'') && (success() || failure())'
steps:
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
@@ -7977,6 +7977,7 @@ jobs:
--env GITHUB_RUN_ID=${{ github.run_id }} \
--env BUILDEVENT_APIKEY=${{ secrets.HONEYCOMB_API_KEY }} \
--env STEP_START=${{ steps.buildevents.outputs.step_start }} \
+ --env ERLANG_VERSION=22.3 \
--env AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \
--env AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \
--env SSH_KEY=/workspace/terraform/id_rsa_terraform \
@@ -8766,7 +8767,7 @@ jobs:
- rabbitmq_web_stomp_examples
- package-generic-unix
runs-on: ubuntu-18.04
- if: '!contains(github.event.head_commit.message, ''[ci skip]'') && always()'
+ if: '!contains(github.event.head_commit.message, ''[ci skip]'') && (success() || failure())'
steps:
- uses: technote-space/workflow-conclusion-action@v1
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
diff --git a/.github/workflows/test-erlang-otp-23.1.yaml b/.github/workflows/test-erlang-otp-23.1.yaml
index aa3fba8bc4..3b59c7dceb 100644
--- a/.github/workflows/test-erlang-otp-23.1.yaml
+++ b/.github/workflows/test-erlang-otp-23.1.yaml
@@ -3963,7 +3963,7 @@ jobs:
- rabbit-ct-upgrade_preparation
- rabbit-ct-vhost
runs-on: ubuntu-18.04
- if: '!contains(github.event.head_commit.message, ''[ci skip]'') && always()'
+ if: '!contains(github.event.head_commit.message, ''[ci skip]'') && (success() || failure())'
steps:
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
@@ -4728,6 +4728,7 @@ jobs:
--env GITHUB_RUN_ID=${{ github.run_id }} \
--env BUILDEVENT_APIKEY=${{ secrets.HONEYCOMB_API_KEY }} \
--env STEP_START=${{ steps.buildevents.outputs.step_start }} \
+ --env ERLANG_VERSION=23.1 \
--env AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \
--env AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \
--env SSH_KEY=/workspace/terraform/id_rsa_terraform \
@@ -5518,7 +5519,7 @@ jobs:
- rabbitmq_web_stomp_examples
- package-generic-unix
runs-on: ubuntu-18.04
- if: '!contains(github.event.head_commit.message, ''[ci skip]'') && always()'
+ if: '!contains(github.event.head_commit.message, ''[ci skip]'') && (success() || failure())'
steps:
- uses: technote-space/workflow-conclusion-action@v1
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
diff --git a/.github/workflows/test-erlang-otp-git.yaml b/.github/workflows/test-erlang-otp-git.yaml
index c5d079d70a..b401b23977 100644
--- a/.github/workflows/test-erlang-otp-git.yaml
+++ b/.github/workflows/test-erlang-otp-git.yaml
@@ -3831,7 +3831,7 @@ jobs:
- rabbit-ct-upgrade_preparation
- rabbit-ct-vhost
runs-on: ubuntu-18.04
- if: '!contains(github.event.head_commit.message, ''[ci skip]'') && always()'
+ if: '!contains(github.event.head_commit.message, ''[ci skip]'') && (success() || failure())'
steps:
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
@@ -4596,6 +4596,7 @@ jobs:
--env GITHUB_RUN_ID=${{ github.run_id }} \
--env BUILDEVENT_APIKEY=${{ secrets.HONEYCOMB_API_KEY }} \
--env STEP_START=${{ steps.buildevents.outputs.step_start }} \
+ --env ERLANG_VERSION=git \
--env AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \
--env AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \
--env SSH_KEY=/workspace/terraform/id_rsa_terraform \
@@ -5385,7 +5386,7 @@ jobs:
- rabbitmq_web_stomp_examples
- package-generic-unix
runs-on: ubuntu-18.04
- if: '!contains(github.event.head_commit.message, ''[ci skip]'') && always()'
+ if: '!contains(github.event.head_commit.message, ''[ci skip]'') && (success() || failure())'
steps:
- uses: technote-space/workflow-conclusion-action@v1
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
diff --git a/ci/dockerfiles/ci b/ci/dockerfiles/ci
index 439ece8e34..3173961454 100644
--- a/ci/dockerfiles/ci
+++ b/ci/dockerfiles/ci
@@ -18,6 +18,7 @@ ENV GITHUB_SHA=${GITHUB_SHA}
ENV base_rmq_ref=${base_rmq_ref}
ENV current_rmq_ref=${current_rmq_ref}
+ENV ERLANG_VERSION=${ERLANG_VERSION}
ENV RABBITMQ_VERSION=${RABBITMQ_VERSION}
ENV BUILDEVENT_CIPROVIDER=GitHubActions
diff --git a/workflow_sources/test/ct.lib.yml b/workflow_sources/test/ct.lib.yml
index b70fb00331..d8e10ea1f0 100644
--- a/workflow_sources/test/ct.lib.yml
+++ b/workflow_sources/test/ct.lib.yml
@@ -113,8 +113,8 @@ name: #@ dep.name
needs: #@ [dep.name + "-checks"] + [dep.name + "-ct-" + group["name"] for group in group_by_one(dep.suites)]
runs-on: ubuntu-18.04
#! See https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions
-#! as to why 'always()' is needed
-if: #@ skip_ci_condition() + " && always()"
+#! as to why '(success() || failure())' is needed
+if: #@ skip_ci_condition() + " && (success() || failure())"
#@yaml/text-templated-strings
steps:
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
diff --git a/workflow_sources/test/finish.lib.yml b/workflow_sources/test/finish.lib.yml
index c0b473837c..f8292322db 100644
--- a/workflow_sources/test/finish.lib.yml
+++ b/workflow_sources/test/finish.lib.yml
@@ -57,8 +57,8 @@ finish:
needs: #@ prepare_jobs_names + [dep.name for dep in data.values.deps if not getattr(dep, "skip_tests", False)] + ['package-generic-unix']
runs-on: ubuntu-18.04
#! See https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions
- #! as to why 'always()' is needed
- if: #@ skip_ci_condition() + " && always()"
+ #! as to why '(success() || failure())' is needed
+ if: #@ skip_ci_condition() + " && (success() || failure())"
#@yaml/text-templated-strings
steps:
- uses: technote-space/workflow-conclusion-action@v1
diff --git a/workflow_sources/test/tests.lib.yml b/workflow_sources/test/tests.lib.yml
index d82b66cf4e..25b6d5c1dd 100644
--- a/workflow_sources/test/tests.lib.yml
+++ b/workflow_sources/test/tests.lib.yml
@@ -34,7 +34,7 @@ steps:
--env GITHUB_RUN_ID=${{ github.run_id }} \
--env BUILDEVENT_APIKEY=${{ secrets.HONEYCOMB_API_KEY }} \
--env STEP_START=${{ steps.buildevents.outputs.step_start }} \
- (@= additional_docker_args(dep) @) \
+ (@= additional_docker_args(dep, erlang_version=erlang_version) @) \
--volume ${PWD}/ct-logs:/workspace/ct-logs \
--oom-kill-disable \
(@= ci_image(erlang_version) @) \
@@ -48,9 +48,10 @@ steps:
path: "ct-logs/*-ct-logs-*.tar.xz"
#@ end
-#@ def additional_docker_args(dep):
+#@ def additional_docker_args(dep, erlang_version=None):
#@ if getattr(dep, 'use_terraform', False):
#@ args = []
+#@ args.append("--env ERLANG_VERSION={}".format(erlang_version))
#@ args.append("--env AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}")
#@ args.append("--env AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}")
#@ args.append("--env SSH_KEY=/workspace/terraform/id_rsa_terraform")