Skip to content

Commit d331a36

Browse files
committed
ci: new build pipeline
1 parent fa92097 commit d331a36

File tree

14 files changed

+198
-151
lines changed

14 files changed

+198
-151
lines changed

.github/workflows/check-generated-artifacts.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020
- name: Setup Go
2121
uses: actions/setup-go@v5
2222
with:
23-
go-version: '1.24'
23+
go-version-file: go.mod
24+
cache: true
25+
cache-dependency-path: go.sum
2426

2527
- name: Run the automatic generation
2628
working-directory: ./

.github/workflows/codeql.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ jobs:
7474

7575
- uses: actions/setup-go@v5
7676
with:
77-
go-version: '1.24'
77+
go-version-file: go.mod
78+
cache: true
79+
cache-dependency-path: go.sum
7880

7981
# Initializes the CodeQL tools for scanning.
8082
- name: Initialize CodeQL

.github/workflows/integration.yml

Lines changed: 64 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- master
88
- release
99
- ipam
10+
- frc/buildpipeline
1011
repository_dispatch:
1112
types:
1213
- test-command
@@ -46,7 +47,7 @@ jobs:
4647
echo "commit-ref=${{ github.sha }}" >> $GITHUB_OUTPUT
4748
else
4849
echo "master=false" >> $GITHUB_OUTPUT
49-
echo "architectures=linux/amd64" >> $GITHUB_OUTPUT
50+
echo "architectures=linux/amd64,linux/arm64,linux/arm/v7" >> $GITHUB_OUTPUT
5051
echo "commit-ref=${{ github.sha }}" >> $GITHUB_OUTPUT
5152
fi
5253
@@ -74,27 +75,14 @@ jobs:
7475
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
7576
if: ${{ github.event_name == 'repository_dispatch' }}
7677

77-
build:
78+
build-old:
7879
runs-on: ubuntu-latest
7980
needs: configure
8081
strategy:
8182
fail-fast: false
8283
matrix:
8384
component:
8485
- cert-creator
85-
- crd-replicator
86-
- ipam
87-
- liqo-controller-manager
88-
- webhook
89-
- uninstaller
90-
- virtual-kubelet
91-
- metric-agent
92-
- telemetry
93-
- proxy
94-
- gateway
95-
- gateway/wireguard
96-
- gateway/geneve
97-
- fabric
9886
steps:
9987
- name: Set architectures
10088
id: set-architectures
@@ -164,10 +152,63 @@ jobs:
164152
rm -rf /tmp/.buildx-cache
165153
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
166154
155+
build:
156+
runs-on: ubuntu-latest
157+
needs: configure
158+
env:
159+
DOCKER_REGISTRY: ghcr.io
160+
DOCKER_ORGANIZATION: ${{ github.repository_owner }}
161+
DOCKER_TAG: ${{ needs.configure.outputs.commit-ref }}
162+
ARCHS: ${{ needs.configure.outputs.architectures }}
163+
strategy:
164+
fail-fast: false
165+
matrix:
166+
component:
167+
- crd-replicator
168+
- ipam
169+
- liqo-controller-manager
170+
- webhook
171+
- uninstaller
172+
- virtual-kubelet
173+
- metric-agent
174+
- telemetry
175+
- proxy
176+
- gateway
177+
- gateway/wireguard
178+
- gateway/geneve
179+
- fabric
180+
steps:
181+
- name: Check out code
182+
uses: actions/checkout@v4
183+
with:
184+
ref: "${{ needs.configure.outputs.commit-ref }}"
185+
repository: "${{ needs.configure.outputs.repo-name }}"
186+
persist-credentials: false
187+
188+
- name: Setup Go
189+
uses: actions/setup-go@v5
190+
with:
191+
go-version-file: go.mod
192+
cache: true
193+
cache-dependency-path: go.sum
194+
195+
- name: Set up Docker Buildx
196+
uses: docker/setup-buildx-action@v3
197+
198+
- name: Login to the Container registry
199+
uses: docker/login-action@v3
200+
with:
201+
registry: ghcr.io
202+
username: ${{ github.actor }}
203+
password: ${{ secrets.GITHUB_TOKEN }}
167204

205+
- name: Build and push the container image
206+
run: |
207+
chmod +x ./build/liqo/build.sh
208+
./build/liqo/build.sh -p ./cmd/${{ matrix.component }}
168209
post-build:
169210
runs-on: ubuntu-latest
170-
needs: [build, configure, liqoctl]
211+
needs: [build-old, build, configure, liqoctl]
171212
steps:
172213

173214
# Since we are using a repository-dispatch event, we have to explicitly set a run check. We update it to the actual status.
@@ -228,12 +269,18 @@ jobs:
228269
ref: "${{ needs.configure.outputs.commit-ref }}"
229270
repository: "${{ needs.configure.outputs.repo-name }}"
230271
persist-credentials: false
272+
273+
- name: Setup Go
274+
uses: actions/setup-go@v5
275+
with:
276+
go-version-file: go.mod
277+
cache: true
278+
cache-dependency-path: go.sum
231279

232280
- name: Build Liqoctl
233281
run: |
234282
./build/liqoctl/build.sh
235283
env:
236-
CGO_ENABLED: 0
237284
GOOS: ${{ matrix.goos }}
238285
GOARCH: ${{ matrix.goarch }}
239286
LIQOCTLVERSION: ${{ needs.configure.outputs.commit-ref }}

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup Go
1818
uses: actions/setup-go@v5
1919
with:
20-
go-version: '1.24'
20+
go-version-file: go.mod
2121
cache: false
2222

2323
- name: golangci-lint
@@ -42,7 +42,7 @@ jobs:
4242
- name: Setup Go
4343
uses: actions/setup-go@v5
4444
with:
45-
go-version: '1.24'
45+
go-version-file: go.mod
4646

4747
- name: Execute go mod tidy and check the outcome
4848
working-directory: ./

build/cert-creator/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM alpine:3.21.3
22

33
RUN apk update && \
4-
apk add --no-cache openssl && \
5-
rm -rf /var/cache/apk/*
4+
apk add --no-cache openssl && \
5+
rm -rf /var/cache/apk/*
66

77
ENTRYPOINT ["openssl"]

build/common/Dockerfile

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

build/fabric/Dockerfile

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

build/gateway/Dockerfile

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

build/gateway/geneve/Dockerfile

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

build/gateway/wireguard/Dockerfile

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

0 commit comments

Comments
 (0)