summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRin Kuryloski <kuryloskip@vmware.com>2022-10-18 10:31:34 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2022-10-18 09:02:48 +0000
commit14aa34e7717f1b9e59b1ccfd995883277aee9365 (patch)
treec178f96ebdee526a1336dcf0631c84f9936469e3
parenta844ac08bce2b791141a139426e9458e56b4da90 (diff)
downloadrabbitmq-server-git-mergify/bp/v3.11.x/pr-6151.tar.gz
Adjustments to the OCI workflow to ensure the correct otp versionmergify/bp/v3.11.x/pr-6151
is embedded in the OCI (cherry picked from commit 51b8ed40560102654b8d44c6795ca41ac0bb3afd)
-rw-r--r--.github/workflows/oci.yaml22
1 files changed, 12 insertions, 10 deletions
diff --git a/.github/workflows/oci.yaml b/.github/workflows/oci.yaml
index ac3dbd76d8..ba1363deac 100644
--- a/.github/workflows/oci.yaml
+++ b/.github/workflows/oci.yaml
@@ -73,8 +73,12 @@ jobs:
run: |
bazelisk build :otp_version :elixir_version \
--config=rbe-${{ matrix.otp_version_id }}
- echo "::set-output name=otp::$(cat bazel-bin/otp_version.txt)"
- echo "::set-output name=elixir::$(cat bazel-bin/elixir_version.txt)"
+ echo "otp=$(cat bazel-bin/otp_version.txt)" >> $GITHUB_OUTPUT
+ echo "elixir=$(cat bazel-bin/elixir_version.txt)" >> $GITHUB_OUTPUT
+
+ # clean so that when we next run bazelisk, the host erlang version
+ # is re-detected
+ bazelisk clean --expunge
- name: Configure OTP & Elixir
uses: erlef/setup-beam@v1.13
@@ -82,25 +86,23 @@ jobs:
otp-version: ${{ steps.load-info.outputs.otp }}
elixir-version: ${{ steps.load-info.outputs.elixir }}
+ - name: Validate otp version embedded in OCI
+ run: |
+ bazel cquery //packaging/docker-image:otp_source --output=build
+
- name: Build
run: |
- export ERLANG_HOME="$(dirname $(dirname $(which erl)))"
- export ELIXIR_HOME="$(dirname $(dirname $(which iex)))"
bazelisk build //packaging/docker-image:rabbitmq \
--config=buildbuddy
- name: Test
run: |
- export ERLANG_HOME="$(dirname $(dirname $(which erl)))"
- export ELIXIR_HOME="$(dirname $(dirname $(which iex)))"
OCI_TESTS=$(bazel query 'tests(//packaging/docker-image/...)')
bazelisk test ${OCI_TESTS} \
--config=buildbuddy
- name: Load
run: |
- export ERLANG_HOME="$(dirname $(dirname $(which erl)))"
- export ELIXIR_HOME="$(dirname $(dirname $(which iex)))"
bazelisk run //packaging/docker-image:rabbitmq \
--config=buildbuddy
@@ -108,9 +110,9 @@ jobs:
id: authorized
run: |
if [ -n "${{ secrets.DOCKERHUB_USERNAME }}" ]; then
- echo "::set-output name=PUSH::true"
+ echo "PUSH=true" >> $GITHUB_OUTPUT
else
- echo "::set-output name=PUSH::false"
+ echo "PUSH=false" >> $GITHUB_OUTPUT
fi
- name: Login to DockerHub