-
Notifications
You must be signed in to change notification settings - Fork 14
209 lines (195 loc) · 9.54 KB
/
dev_builds.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
name: Dev builds
on:
push:
branches:
- main
- 'release-v[0-9]+.[0-9]+'
env:
SIDECAR_IMAGE: "ghcr.io/sumologic/tailing-sidecar"
OPERATOR_IMAGE: "ghcr.io/sumologic/tailing-sidecar-operator"
ECR_URL: public.ecr.aws/sumologic
SIDECAR_IMAGE_ECR: "public.ecr.aws/sumologic/tailing-sidecar-dev"
OPERATOR_IMAGE_ECR: "public.ecr.aws/sumologic/tailing-sidecar-operator-dev"
SIDECAR_IMAGE_DOCKERHUB: "sumologic/tailing-sidecar-dev"
OPERATOR_IMAGE_DOCKERHUB: "sumologic/tailing-sidecar-operator-dev"
LATEST_TAG: "main"
jobs:
build-fluentbit-sidecar:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Extract tag
id: extract_tag
run: echo "tag=$(echo $(git describe --tags --always))" >> $GITHUB_OUTPUT
- name: Print container tag
run: echo "Running dev build for ${{ steps.extract_tag.outputs.tag }}"
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: USERNAME
password: ${{ secrets.CR_PAT }}
- name: Build and push tailing sidecar multiplatform image
run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./sidecar/fluentbit
- name: Build and push tailing sidecar ubi image
run: make build-push-ubi TAG=${{ env.SIDECAR_IMAGE }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./sidecar/fluentbit
- name: Push tailing sidecar image with latest tag
run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE }}:${{ env.LATEST_TAG }}
working-directory: ./sidecar/fluentbit
- name: Push tailing sidecar ubi image with latest tag
run: make build-push-ubi TAG=${{ env.SIDECAR_IMAGE }}:${{ env.LATEST_TAG }}
working-directory: ./sidecar/fluentbit
- name: Log in to AWS Public ECR to publish tailing sidecar image
run: make login-ecr
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_TAILING_SIDECAR_DEV }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_TAILING_SIDECAR_DEV }}
- name: Build and push to ECR tailing sidecar multiplatform image
run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE_ECR }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./sidecar/fluentbit
- name: Build and push to ECR tailing sidecar ubi image
run: make build-push-ubi TAG=${{ env.SIDECAR_IMAGE_ECR }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./sidecar/fluentbit
- name: Push tailing sidecar image with latest tag to ECR
run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE_ECR }}:${{ env.LATEST_TAG }}
working-directory: ./sidecar/fluentbit
- name: Push tailing sidecar ubi image with latest tag to ECR
run: make build-push-ubi TAG=${{ env.SIDECAR_IMAGE_ECR }}:${{ env.LATEST_TAG }}
working-directory: ./sidecar/fluentbit
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_LOGIN_TAILING_SIDECAR_DEV }}
password: ${{ secrets.DOCKERHUB_PASSWORD_TAILING_SIDECAR_DEV }}
- name: Build and push tailing sidecar multiplatform image
run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE_DOCKERHUB }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./sidecar/fluentbit
- name: Build and push tailing sidecar ubi image
run: make build-push-ubi TAG=${{ env.SIDECAR_IMAGE_DOCKERHUB }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./sidecar/fluentbit
- name: Push tailing sidecar image with latest tag
run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE_DOCKERHUB }}:${{ env.LATEST_TAG }}
working-directory: ./sidecar/fluentbit
- name: Push tailing sidecar ubi image with latest tag
run: make build-push-ubi TAG=${{ env.SIDECAR_IMAGE_DOCKERHUB }}:${{ env.LATEST_TAG }}
working-directory: ./sidecar/fluentbit
build-otelcol-sidecar:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
filter: tree:0
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache-dependency-path: |
sidecar/otelcol/.otelcol-builder.yaml
sidecar/otelcol/.goreleaser.yaml
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: USERNAME
password: ${{ secrets.CR_PAT }}
- name: Log in to AWS Public ECR
run: make login-ecr
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_TAILING_SIDECAR_OTEL_DEV }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_TAILING_SIDECAR_OTEL_DEV }}
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_LOGIN_TAILING_SIDECAR_OTEL_DEV }}
password: ${{ secrets.DOCKERHUB_PASSWORD_TAILING_SIDECAR_OTEL_DEV }}
- name: Build and push otelcol sidecar image
run: |
make install-builder
make release-dev
working-directory: ./sidecar/otelcol
build-operator:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Extract tag
id: extract_tag
run: echo "tag=$(echo $(git describe --tags --always))" >> $GITHUB_OUTPUT
- name: Print container tag
run: echo "Running dev build for ${{ steps.extract_tag.outputs.tag }}"
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: USERNAME
password: ${{ secrets.CR_PAT }}
- name: Build and push tailing sidecar operator multiplatform image
run: make build-push-multiplatform IMG=${{ env.OPERATOR_IMAGE }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./operator
- name: Build and push tailing sidecar operator ubi image
run: make build-push-ubi IMG=${{ env.OPERATOR_IMAGE }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./operator
- name: Push tailing sidecar operator image with latest tag
run: make build-push-multiplatform IMG=${{ env.OPERATOR_IMAGE }}:${{ env.LATEST_TAG }}
working-directory: ./operator
- name: Push tailing sidecar operator ubi image with latest tag
run: make build-push-ubi IMG=${{ env.OPERATOR_IMAGE }}:${{ env.LATEST_TAG }}
working-directory: ./operator
- name: Log in to AWS Public ECR to publish tailing sidecar operator image
run: make login-ecr
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_TAILING_SIDECAR_OPERATOR_DEV }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_TAILING_SIDECAR_OPERATOR_DEV }}
- name: Build and push to ECR tailing sidecar operator multiplatform image
run: make build-push-multiplatform IMG=${{ env.OPERATOR_IMAGE_ECR }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./operator
- name: Build and push to ECR tailing sidecar operator ubi image
run: make build-push-ubi IMG=${{ env.OPERATOR_IMAGE_ECR }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./operator
- name: Push tailing sidecar operator image with latest tag to ECR
run: make build-push-multiplatform IMG=${{ env.OPERATOR_IMAGE_ECR }}:${{ env.LATEST_TAG }}
working-directory: ./operator
- name: Push tailing sidecar operator ubi image with latest tag to ECR
run: make build-push-ubi IMG=${{ env.OPERATOR_IMAGE_ECR }}:${{ env.LATEST_TAG }}
working-directory: ./operator
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_LOGIN_TAILING_SIDECAR_OPERATOR_DEV }}
password: ${{ secrets.DOCKERHUB_PASSWORD_TAILING_SIDECAR_OPERATOR_DEV }}
- name: Build and push tailing sidecar operator multiplatform image
run: make build-push-multiplatform IMG=${{ env.OPERATOR_IMAGE_DOCKERHUB }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./operator
- name: Build and push tailing sidecar operator ubi image
run: make build-push-ubi IMG=${{ env.OPERATOR_IMAGE_DOCKERHUB }}:${{ steps.extract_tag.outputs.tag }}
working-directory: ./operator
- name: Push tailing sidecar operator image with latest tag
run: make build-push-multiplatform IMG=${{ env.OPERATOR_IMAGE_DOCKERHUB }}:${{ env.LATEST_TAG }}
working-directory: ./operator
- name: Push tailing sidecar operator ubi image with latest tag
run: make build-push-ubi IMG=${{ env.OPERATOR_IMAGE_DOCKERHUB }}:${{ env.LATEST_TAG }}
working-directory: ./operator
push-helm-chart:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Push dev helm chart
run: make push-helm-chart