-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathaction.yml
More file actions
69 lines (60 loc) · 2.19 KB
/
action.yml
File metadata and controls
69 lines (60 loc) · 2.19 KB
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
name: Build and Push Java-Agent Image after CPUtility Test
description: |
cpUtility Testing
This action assumes that Repo was checked out and Java was set correctly
inputs:
aws-region:
required: true
description: "AWS Region"
image_uri_with_tag:
required: true
description: "Image URI with Tag"
image_registry:
required: true
description: "Image Registry"
adot-java-version:
required: true
description: "ADOT Java Version"
snapshot-ecr-role:
require: true
description: "IAM Role used for pushing to snapshot ecr"
runs:
using: "composite"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #3.6.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3.11.1
with:
driver-opts: image=moby/buildkit:v0.15.1
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
with:
role-to-assume: ${{ inputs.snapshot-ecr-role }}
aws-region: ${{ inputs.aws-region }}
- name: Login to private staging ecr
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0
with:
registry: ${{ inputs.image_registry }}
env:
AWS_REGION: ${{ inputs.aws-region }}
- name: Build image for testing
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
with:
push: false
build-args: "ADOT_JAVA_VERSION=${{ inputs.adot-java-version }}"
context: .
platforms: linux/amd64
tags: ${{ inputs.image_uri_with_tag }}
load: true
- name: Test docker image
shell: bash
run: .github/scripts/test-adot-javaagent-image.sh "${{ inputs.image_uri_with_tag }}" "${{ inputs.adot-java-version }}"
- name: Build and push image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
with:
push: true
build-args: "ADOT_JAVA_VERSION=${{ inputs.adot-java-version }}"
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ inputs.image_uri_with_tag }}