-
Notifications
You must be signed in to change notification settings - Fork 1.7k
79 lines (76 loc) · 3.15 KB
/
integration-tests-publish.yml
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
name: Test Image Publish
# Publish the compiled integration tests
on:
push:
branches:
- develop
workflow_dispatch:
env:
ECR_TAG: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:develop
CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink
jobs:
publish-integration-test-image:
environment: integration
permissions:
id-token: write
contents: read
name: Publish Integration Test Image
runs-on: ubuntu22.04-8cores-32GB
steps:
- name: Checkout the repo
uses: actions/checkout@v4.2.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Other Tags If Not Workflow Dispatch
id: tags
if: github.event_name != 'workflow_dispatch'
run: |
echo "other_tags=${ECR_TAG}" >> $GITHUB_OUTPUT
- name: Build Image
uses: smartcontractkit/.github/actions/ctf-build-test-image@6781e048ecc1aadf7d605722c32e8068a5f829ce # ctf-build-test-image@0.2.0
with:
other_tags: ${{ steps.tags.outputs.other_tags }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
- name: Notify Slack
# Only run this notification for merge to develop failures
if: failure() && github.event_name != 'workflow_dispatch'
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
env:
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}
with:
channel-id: "#team-test-tooling-internal"
slack-message: ":x: :mild-panic-intensifies: Publish Integration Test Image failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}\nRepository: Chainlink\n${{ format('Notifying <!subteam^{0}|{0}>', secrets.GUARDIAN_SLACK_NOTIFICATION_HANDLE)}}"
build-chainlink-image:
environment: integration
# Only run this build for workflow_dispatch
if: github.event_name == 'workflow_dispatch'
permissions:
id-token: write
contents: read
strategy:
matrix:
image:
- name: ""
dockerfile: core/chainlink.Dockerfile
tag-suffix: ""
# uncomment in the future if we end up needing to soak test the plugins image
# - name: (plugins)
# dockerfile: plugins/chainlink.Dockerfile
# tag-suffix: -plugins
name: Build Chainlink Image ${{ matrix.image.name }}
runs-on: ubuntu22.04-8cores-32GB
steps:
- name: Checkout the repo
uses: actions/checkout@v4.2.1
with:
ref: ${{ github.sha }}
- name: Build Chainlink Image
uses: ./.github/actions/build-chainlink-image
with:
tag_suffix: ${{ matrix.image.tag-suffix }}
dockerfile: ${{ matrix.image.dockerfile }}
git_commit_sha: ${{ github.sha }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}