Skip to content

Commit 75f4426

Browse files
authored
feat!: migrate to Go (#818)
1 parent c4dfeb2 commit 75f4426

File tree

136 files changed

+280
-25101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+280
-25101
lines changed

.github/workflows/build-plugin.yaml

Lines changed: 0 additions & 198 deletions
This file was deleted.

.github/workflows/docker-scan.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- master
77
tags:
8-
- 'v*'
8+
- "v*"
99
pull_request:
1010

1111
permissions: {}
@@ -19,10 +19,9 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
file: [Dockerfile, go.Dockerfile]
2322
runs-on: [ubuntu-x64, ubuntu-arm64]
2423

25-
name: grype scanning (${{ matrix.runs-on }}, ${{ matrix.file }})
24+
name: grype scanning (${{ matrix.runs-on }})
2625
runs-on: ${{ matrix.runs-on }}
2726
permissions:
2827
contents: read # clone the repository
@@ -41,8 +40,7 @@ jobs:
4140
DOCKER_BUILDKIT: 1
4241
BUILDKIT_STEP_LOG_MAX_SIZE: -1
4342
BUILDKIT_STEP_LOG_MAX_SPEED: -1
44-
FILE: ${{ matrix.file }}
45-
run: docker build . -t image-renderer -f "$FILE"
43+
run: docker build . -t image-renderer
4644

4745
- name: Scan with Grype
4846
id: scan
@@ -60,10 +58,9 @@ jobs:
6058
strategy:
6159
fail-fast: false
6260
matrix:
63-
file: [Dockerfile, go.Dockerfile]
6461
runs-on: [ubuntu-x64, ubuntu-arm64]
6562

66-
name: trivy scanning (${{ matrix.runs-on }}, ${{ matrix.file }})
63+
name: trivy scanning (${{ matrix.runs-on }})
6764
runs-on: ${{ matrix.runs-on }}
6865
permissions:
6966
contents: read # clone the repository
@@ -82,8 +79,7 @@ jobs:
8279
DOCKER_BUILDKIT: 1
8380
BUILDKIT_STEP_LOG_MAX_SIZE: -1
8481
BUILDKIT_STEP_LOG_MAX_SPEED: -1
85-
FILE: ${{ matrix.file }}
86-
run: docker build . -t image-renderer -f "$FILE"
82+
run: docker build . -t image-renderer
8783

8884
- name: Scan with Trivy
8985
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.33.1

.github/workflows/docker-test.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
file: [Dockerfile, go.Dockerfile]
2322
runs-on: [ubuntu-x64, ubuntu-arm64]
2423

25-
name: acceptance tests (${{ matrix.runs-on }}, ${{ matrix.file }})
24+
name: acceptance tests (${{ matrix.runs-on }})
2625
runs-on: ${{ matrix.runs-on }}
2726
permissions:
2827
contents: read # clone the repository
@@ -41,8 +40,7 @@ jobs:
4140
DOCKER_BUILDKIT: 1
4241
BUILDKIT_STEP_LOG_MAX_SIZE: -1
4342
BUILDKIT_STEP_LOG_MAX_SPEED: -1
44-
FILE: ${{ matrix.file }}
45-
run: docker build . -t image-renderer -f "$FILE"
43+
run: docker build . -t image-renderer
4644

4745
- name: Read license
4846
if: ${{ github.event.repository.fork == false }}
@@ -91,7 +89,7 @@ jobs:
9189
if: ${{ steps.tar.outputs.upload == 'true' && (success() || failure()) }}
9290
uses: actions/upload-artifact@v4
9391
with:
94-
name: changed-files-${{ matrix.file }}-${{ matrix.runs-on }}
92+
name: changed-files-${{ matrix.runs-on }}
9593
path: changed-files.tar.xz
9694

9795
# This is the job that is actually required by rulesets.

.github/workflows/docker.yaml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,11 @@ jobs:
6969
include:
7070
- runs-on: ubuntu-x64
7171
arch: amd64
72-
dockerfile: Dockerfile
73-
suffix: ''
7472
- runs-on: ubuntu-arm64
7573
arch: arm64
76-
dockerfile: Dockerfile
77-
suffix: ''
78-
- runs-on: ubuntu-x64
79-
arch: amd64
80-
dockerfile: go.Dockerfile
81-
suffix: '-golang'
82-
- runs-on: ubuntu-arm64
83-
arch: arm64
84-
dockerfile: go.Dockerfile
85-
suffix: '-golang'
8674

8775
needs: tag
88-
name: Build ${{ matrix.dockerfile }} image for ${{ matrix.arch }}
76+
name: Build image for ${{ matrix.arch }}
8977
runs-on: ${{ matrix.runs-on }}
9078
permissions:
9179
contents: read # required to read the repository contents
@@ -113,16 +101,16 @@ jobs:
113101
DOCKER_BUILDKIT: 1
114102
BUILDKIT_STEP_LOG_MAX_SIZE: -1
115103
BUILDKIT_STEP_LOG_MAX_SPEED: -1
116-
TAG: ${{ needs.tag.outputs.tag }}${{ matrix.suffix }}-${{ matrix.arch }}
117-
run: docker build . -t "$TAG" -f ${{ matrix.dockerfile }}
104+
TAG: ${{ needs.tag.outputs.tag }}-${{ matrix.arch }}
105+
run: docker build . -t "$TAG"
118106
- name: docker push
119107
env:
120-
TAG: ${{ needs.tag.outputs.tag }}${{ matrix.suffix }}-${{ matrix.arch }}
108+
TAG: ${{ needs.tag.outputs.tag }}-${{ matrix.arch }}
121109
run: docker push "$TAG"
122110
- name: Get digest
123111
id: digest
124112
env:
125-
TAG: ${{ needs.tag.outputs.tag }}${{ matrix.suffix }}-${{ matrix.arch }}
113+
TAG: ${{ needs.tag.outputs.tag }}-${{ matrix.arch }}
126114
run: |
127115
set -euo pipefail
128116
DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' "$TAG" | cut -d@ -f2)
@@ -159,9 +147,7 @@ jobs:
159147
run: |
160148
set -euo pipefail
161149
docker manifest create "$TAG" "$TAG"-amd64 "$TAG"-arm64
162-
docker manifest create "$TAG"-golang "$TAG"-golang-amd64 "$TAG"-golang-arm64
163150
docker manifest push "$TAG"
164-
docker manifest push "$TAG"-golang
165151
- name: Create and push :latest manifest
166152
if: github.event_name == 'push' && github.ref_type == 'tag'
167153
env:
@@ -183,10 +169,7 @@ jobs:
183169
You can pull it using:
184170
185171
```bash
186-
# For the Node.js server:
187172
docker pull ${{ needs.tag.outputs.tag }}
188-
# For the Go server:
189-
docker pull ${{ needs.tag.outputs.tag }}-golang
190173
```
191174
192175
> [!WARNING]
@@ -196,8 +179,7 @@ jobs:
196179
# Workflow: https://argo-workflows.grafana.net/workflow-templates/render-service-cd/auto-deploy-dev
197180
cd-auto-deploy-dev:
198181
name: Deploy to dev
199-
# disabled while we test the golang image
200-
if: false && startsWith(github.ref, 'refs/tags/v')
182+
if: startsWith(github.ref, 'refs/tags/v')
201183
needs: [tag, build]
202184
runs-on: ubuntu-latest
203185
permissions:

0 commit comments

Comments
 (0)