-
Notifications
You must be signed in to change notification settings - Fork 3.9k
103 lines (101 loc) · 3.82 KB
/
rabbitmq_peer_discovery_aws.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Peer Discovery AWS Integration Test
on:
push:
paths-ignore:
- '.github/workflows/secondary-umbrella.yaml'
- '.github/workflows/update-elixir-patches.yaml'
- '.github/workflows/update-otp-patches.yaml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
peer-discovery-aws-integration-test:
name: Integration Test
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: CHECK IF IMAGE WILL PUSH
id: authorized
run: |
if [ -n "${{ secrets.DOCKERHUB_PASSWORD }}" ]; then
echo "authorized=true" | tee -a $GITHUB_OUTPUT
else
echo "authorized=false" | tee -a $GITHUB_OUTPUT
fi
- name: CHECKOUT REPOSITORY
if: steps.authorized.outputs.authorized == 'true'
uses: actions/checkout@v4
- uses: docker/metadata-action@v5
if: steps.authorized.outputs.authorized == 'true'
id: metadata
with:
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/[email protected]
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/[email protected]
with:
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
- name: CONFIGURE BAZEL
if: steps.authorized.outputs.authorized == 'true'
run: |
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
build --experimental_guard_against_concurrent_changes
EOF
fi
cat << EOF >> user.bazelrc
build --repository_cache=/home/runner/repo-cache/
build --color=yes
EOF
bazelisk info release
#! - name: Setup tmate session
#! uses: mxschmitt/action-tmate@v3
- name: RUN INTEGRATION TESTS
if: steps.authorized.outputs.authorized == 'true'
run: |
branch_or_tag="${GITHUB_REF##*/}"
bazelisk test //deps/rabbitmq_peer_discovery_aws:integration_SUITE \
--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:sha-${{ github.sha }}" \
--test_env AWS_ECS_CLUSTER_NAME="rabbitmq-peer-discovery-aws-actions-${branch_or_tag//[._]/-}" \
--test_output=streamed \
--verbose_failures