Skip to content

Commit

Permalink
Turn off BuildBuddy integration (#11343)
Browse files Browse the repository at this point in the history
Builds now execute on the github actions workers, using Google Cloud Storage (GCS) as a cache

(cherry picked from commit a6874e3)

# Conflicts:
#	.github/workflows/update-elixir-patches.yaml
#	.github/workflows/update-otp-patches.yaml
#	MODULE.bazel
#	WORKSPACE
#	deps/rabbitmq_peer_discovery_consul/test/system_SUITE_data/consul.hcl
(cherry picked from commit 2c62185)

# Conflicts:
#	.bazelrc
#	.github/workflows/rabbitmq_peer_discovery_aws.yaml
#	.github/workflows/templates/test-mixed-versions.template.yaml
#	.github/workflows/templates/test.template.yaml
#	.github/workflows/test-mixed-versions.yaml
#	.github/workflows/test.yaml
#	MODULE.bazel
#	bazel/platforms/BUILD.bazel
  • Loading branch information
pjk25 authored and mergify[bot] committed Jun 7, 2024
1 parent 81e1214 commit 50d0cba
Show file tree
Hide file tree
Showing 13 changed files with 1,730 additions and 214 deletions.
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ build --flag_alias=test_build=//:enable_test_build

build --combined_report=lcov

<<<<<<< HEAD
build:buildbuddy --bes_results_url=https://app.buildbuddy.io/invocation/
build:buildbuddy --bes_backend=grpcs://remote.buildbuddy.io
build:buildbuddy --remote_cache=grpcs://remote.buildbuddy.io
Expand Down Expand Up @@ -74,6 +75,8 @@ build:rbe-26_1 --platforms=//bazel/platforms:erlang_linux_26_1_platform
# no-op config so that --config=local does not error
build:local --color=auto

=======
>>>>>>> 2c62185317 (Turn off BuildBuddy integration (#11343))
# Try importing a user specific .bazelrc
# You can create your own by copying and editing the template-user.bazelrc template:
# cp template-user.bazelrc user.bazelrc
Expand Down
64 changes: 60 additions & 4 deletions .github/workflows/rabbitmq_peer_discovery_aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,100 @@ jobs:
peer-discovery-aws-integration-test:
name: Integration Test
runs-on: ubuntu-22.04
<<<<<<< HEAD
strategy:
matrix:
otp_version_id:
- 26
=======
>>>>>>> 2c62185317 (Turn off BuildBuddy integration (#11343))
timeout-minutes: 45
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v3
- name: WAIT FOR OCI IMAGE WORKFLOW
uses: lewagon/wait-on-check-action@v1.2.0
with:
<<<<<<< HEAD
ref: ${{ github.ref }}
check-name: build-publish-dev-bazel
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 30 # seconds
=======
images: pivotalrabbitmq/rabbitmq
tags: |
type=sha,format=long
- uses: int128/wait-for-docker-image-action@v1
if: steps.authorized.outputs.authorized == 'true'
with:
tags: ${{ steps.metadata.outputs.tags }}
timeout-seconds: 3600
polling-seconds: 60
- name: COMPUTE REPO CACHE KEY
if: steps.authorized.outputs.authorized == 'true'
id: repo-cache-key
run: |
echo "value=bazel-repo-cache-${{ hashFiles('MODULE.bazel') }}" | tee -a $GITHUB_OUTPUT
- name: LOAD REPO CACHE
if: steps.authorized.outputs.authorized == 'true'
uses: actions/cache/restore@v4
with:
key: ${{ steps.repo-cache-key.outputs.value }}
path: /home/runner/repo-cache/
- name: CONFIGURE OTP & ELIXIR
if: steps.authorized.outputs.authorized == 'true'
uses: erlef/setup-beam@v1.17
with:
otp-version: 26
elixir-version: 1.15
- name: SETUP ecs-cli
if: steps.authorized.outputs.authorized == 'true'
env:
ECS_CLI_VERSION: 1.21.0
run: |
curl -Lo /usr/local/bin/ecs-cli https://amazon-ecs-cli.s3.amazonaws.com/ecs-cli-linux-amd64-v${ECS_CLI_VERSION} && \
chmod +x /usr/local/bin/ecs-cli && \
ecs-cli --version
- name: AUTHENTICATE TO GOOGLE CLOUD
if: steps.authorized.outputs.authorized == 'true'
uses: google-github-actions/auth@v2.1.2
with:
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
>>>>>>> 2c62185317 (Turn off BuildBuddy integration (#11343))
- name: CONFIGURE BAZEL
run: |
<<<<<<< HEAD
cat << EOF >> user.bazelrc
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}

build:buildbuddy --build_metadata=ROLE=CI
build:buildbuddy --build_metadata=VISIBILITY=PRIVATE
build:buildbuddy --color=yes
=======
if [ -n "${{ secrets.REMOTE_CACHE_BUCKET_NAME }}" ]; then
cat << EOF >> user.bazelrc
build --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME }}
build --google_default_credentials
EOF
fi
cat << EOF >> user.bazelrc
build --repository_cache=/home/runner/repo-cache/
build --color=yes
>>>>>>> 2c62185317 (Turn off BuildBuddy integration (#11343))
EOF

bazelisk info release
#! - name: Setup tmate session
#! uses: mxschmitt/action-tmate@v3
- name: RUN INTEGRATION TESTS
run: |
sudo sysctl -w net.ipv4.tcp_keepalive_time=60
sudo ethtool -K eth0 tso off gso off gro off tx off rx off lro off
branch_or_tag="${GITHUB_REF##*/}"
bazelisk test //deps/rabbitmq_peer_discovery_aws:integration_SUITE \
--config=rbe-${{ matrix.otp_version_id }} \
--test_tag_filters=aws \
--build_tests_only \
--test_env AWS_ACCESS_KEY_ID=${{ secrets.CONCOURSE_AWS_ACCESS_KEY_ID }} \
--test_env AWS_SECRET_ACCESS_KEY=${{ secrets.CONCOURSE_AWS_SECRET_ACCESS_KEY }} \
--test_env RABBITMQ_IMAGE="pivotalrabbitmq/rabbitmq:${{ github.sha }}" \
--test_env AWS_ECS_CLUSTER_NAME="rabbitmq-peer-discovery-aws-actions-${branch_or_tag//[._]/-}" \
--test_output=streamed \
--verbose_failures
7 changes: 7 additions & 0 deletions .github/workflows/templates/test-mixed-versions.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ jobs:
secrets: inherit
#@ end

<<<<<<< HEAD
test-rabbitmq_cli:
needs: check-workflow
uses: ./.github/workflows/test-plugin.yaml
Expand All @@ -186,6 +187,8 @@ jobs:
plugin: rabbitmq_cli
secrets: inherit

=======
>>>>>>> 2c62185317 (Turn off BuildBuddy integration (#11343))
#@ for plugin in data.values.tier1_plugins:
test-(@= plugin @):
needs: #@ ["check-workflow"] + sharded_job_names("rabbit", rabbit_shard_count)
Expand All @@ -197,7 +200,11 @@ jobs:
#@ end

summary-test:
<<<<<<< HEAD
needs: #@ job_names(data.values.internal_deps + data.values.tier1_plugins) + sharded_job_names("rabbit", rabbit_shard_count) + ["test-rabbitmq_cli"]
=======
needs: #@ job_names(data.values.internal_deps + data.values.tier1_plugins) + sharded_job_names("rabbit", rabbit_shard_count)
>>>>>>> 2c62185317 (Turn off BuildBuddy integration (#11343))
runs-on: ubuntu-latest
steps:
- name: SUMMARY
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/templates/test.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ jobs:
secrets: inherit
#@ end

<<<<<<< HEAD
test-rabbitmq_cli:
needs: check-workflow
uses: ./.github/workflows/test-plugin.yaml
Expand All @@ -127,6 +128,8 @@ jobs:
plugin: rabbitmq_cli
secrets: inherit

=======
>>>>>>> 2c62185317 (Turn off BuildBuddy integration (#11343))
#@ for plugin in data.values.tier1_plugins:
test-(@= plugin @):
needs: #@ ["check-workflow"] + sharded_job_names("rabbit", rabbit_shard_count)
Expand All @@ -138,7 +141,11 @@ jobs:
#@ end

summary-test:
<<<<<<< HEAD
needs: #@ job_names(data.values.internal_deps + data.values.tier1_plugins) + sharded_job_names("rabbit", rabbit_shard_count) + ["test-rabbitmq_cli"]
=======
needs: #@ job_names(data.values.internal_deps + data.values.tier1_plugins) + sharded_job_names("rabbit", rabbit_shard_count)
>>>>>>> 2c62185317 (Turn off BuildBuddy integration (#11343))
runs-on: ubuntu-latest
steps:
- name: SUMMARY
Expand Down
Loading

0 comments on commit 50d0cba

Please sign in to comment.