Skip to content

Commit d2c629f

Browse files
committed
add first docker test steps
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
1 parent 0951822 commit d2c629f

File tree

1 file changed

+54
-3
lines changed

1 file changed

+54
-3
lines changed

.github/workflows/base-ci-goreleaser.yaml

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ jobs:
4747
GOARCH: ppc64le
4848
runs-on: ubuntu-24.04
4949
outputs:
50-
artifacts: ${{ steps.build-snapshot.outputs.artifacts }}
51-
metadata: ${{ steps.build-snapshot.outputs.metadata }}
50+
version: ${{ steps.prep.outputs.version }}
5251

5352
steps:
5453
- name: Checkout
@@ -147,7 +146,6 @@ jobs:
147146
run: ls -laR distributions/otelcol-contrib/artifacts
148147

149148
- name: Run GoReleaser for ${{ inputs.distribution }}
150-
id: build-snapshot
151149
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
152150
with:
153151
distribution: goreleaser-pro
@@ -234,3 +232,56 @@ jobs:
234232
name: ${{ inputs.distribution }}-image-${{ steps.prep.outputs.version }}-${{ steps.prep.outputs.arch }}
235233
path: /tmp/${{ inputs.distribution }}.tar
236234
retention-days: 7
235+
236+
docker-tests:
237+
needs:
238+
- check-goreleaser
239+
strategy:
240+
matrix:
241+
GOOS: ${{ fromJSON( inputs.goos) }}
242+
GOARCH: ${{ fromJSON( inputs.goarch) }}
243+
exclude:
244+
- GOOS: darwin
245+
GOARCH: "386"
246+
- GOOS: darwin
247+
GOARCH: s390x
248+
- GOOS: darwin
249+
GOARCH: ppc64le
250+
- GOOS: darwin
251+
GOARCH: arm
252+
- GOOS: windows
253+
GOARCH: arm64
254+
- GOOS: windows
255+
GOARCH: arm
256+
- GOOS: windows
257+
GOARCH: s390x
258+
- GOOS: windows
259+
GOARCH: ppc64le
260+
runs-on: ubuntu-24.04
261+
steps:
262+
- name: Checkout
263+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
264+
with:
265+
fetch-depth: 0
266+
267+
- name: Setup QEMU
268+
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v3.4.0
269+
with:
270+
platforms: arm64,ppc64le,linux/arm/v7,s390x
271+
272+
- name: Setup Docker Buildx
273+
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
274+
275+
- name: Setup Go
276+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
277+
with:
278+
go-version: "~1.24"
279+
check-latest: true
280+
281+
- name: Download container image artifact
282+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 #v4.1.9
283+
with:
284+
name: ${{ inputs.distribution }}-image-${{ needs.check-goreleaser.outputs.version }}-${{ inputs.goos }}-${{ inputs.goarch }}
285+
286+
- name: Load image into docker
287+
run: docker image import ./${{ inputs.distribution }}-image-${{ needs.check-goreleaser.outputs.version }}-${{ inputs.goos }}-${{ inputs.goarch }} ${{ inputs.distribution }}:test

0 commit comments

Comments
 (0)