Skip to content

Commit fe72d72

Browse files
chore: Use shared Task definitions (#40)
* remove old files * add submodule * add Taskfile * add generated files * fix .golangci.yaml * fix test * fmtd files * .gitignore coverage reports * update actions * cleanup * fix task * Update .github/workflows/release.yaml Co-authored-by: Johannes Aubart <[email protected]> * Update Taskfile.yaml Co-authored-by: Johannes Aubart <[email protected]> * update crd location * review comments * remove unused test code * add taskfile configuration to enable envtests * fix taskfile execution order * use fixed upstream tasks * linter/formater updates * update golangci-lint config * more fixes --------- Co-authored-by: Johannes Aubart <[email protected]>
1 parent 55c5581 commit fe72d72

File tree

102 files changed

+316
-810
lines changed

Some content is hidden

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

102 files changed

+316
-810
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,27 @@ jobs:
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@v4
18+
with:
19+
submodules: recursive
20+
1821

1922
- name: Set up Go
2023
uses: actions/setup-go@v5
2124
with:
2225
go-version-file: go.mod
2326

24-
- name: make tidy
27+
- name: Install Task
28+
uses: arduino/setup-task@v2
29+
with:
30+
version: 3.x
31+
32+
- name: make generate
2533
run: |
26-
make tidy
34+
task generate
2735
git diff --exit-code
28-
29-
- name: make verify
30-
run: make verify
3136
32-
- name: make test
33-
run: make test
37+
- name: task validate
38+
run: task validate
39+
40+
- name: task test
41+
run: task test

.github/workflows/publish.yaml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ on:
33
push:
44
tags:
55
- v*
6-
workflow_dispatch:
7-
6+
workflow_dispatch:
87

98
permissions:
109
packages: write
@@ -23,11 +22,17 @@ jobs:
2322
ssh-key: ${{ secrets.PUSH_KEY }}
2423
fetch-tags: true
2524
fetch-depth: 0
25+
submodules: recursive
26+
27+
- name: Install Task
28+
uses: arduino/setup-task@v2
29+
with:
30+
version: 3.x
2631

2732
- name: Read and validate VERSION
2833
id: version
2934
run: |
30-
VERSION=$(cat VERSION)
35+
VERSION=$(task version)
3136
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-dev)?$ ]]; then
3237
echo "Invalid version format in VERSION file: $VERSION"
3338
exit 1
@@ -43,7 +48,7 @@ jobs:
4348
exit 0
4449
4550
- name: Set up QEMU
46-
uses: docker/setup-qemu-action@v2
51+
uses: docker/setup-qemu-action@v3
4752

4853
- name: Set up Docker Context for Buildx
4954
id: buildx-context
@@ -59,7 +64,7 @@ jobs:
5964

6065
- name: Set up Docker Buildx
6166
timeout-minutes: 5
62-
uses: docker/setup-buildx-action@v2
67+
uses: docker/setup-buildx-action@v3
6368
with:
6469
version: latest
6570

@@ -68,24 +73,14 @@ jobs:
6873
with:
6974
go-version-file: go.mod
7075

71-
- name: Build the ${{ github.repository }}
76+
- name: Build and Push Images
7277
run: |
73-
make prepare-release
74-
make build
75-
76-
- name: Build Images
77-
run: |
78-
IMAGE_REGISTRY=ghcr.io/openmcp-project make image-build
79-
80-
- name: setup OCM
81-
uses: open-component-model/ocm-setup-action@main
78+
task build:img:all
8279
83-
- name: Create OCM CTF
80+
- name: Package and Push Helm Charts
8481
run: |
85-
ocm add componentversions --create \
86-
--file ctf component-constructor.yaml \
87-
--settings settings.yaml -- VERSION=${{ env.version }}
82+
task build:helm:all
8883
89-
- name: Push CTF
84+
- name: Build and Push OCM Component
9085
run: |
91-
ocm transfer ctf --overwrite ./ctf ${{ env.OCI_URL }}
86+
task build:ocm:all

.github/workflows/release.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ jobs:
1919
ssh-key: ${{ secrets.PUSH_KEY }}
2020
fetch-tags: true
2121
fetch-depth: 0
22+
submodules: recursive
23+
24+
- name: Install Task
25+
uses: arduino/setup-task@v2
26+
with:
27+
version: 3.x
2228

2329
- name: Read and validate VERSION
2430
id: version
2531
run: |
26-
VERSION=$(cat VERSION)
32+
VERSION=$(task version)
2733
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-dev)?$ ]]; then
2834
echo "Invalid version format in VERSION file: $VERSION"
2935
exit 1
@@ -63,7 +69,7 @@ jobs:
6369
6470
git tag -a "${{ env.version }}" -m "Release ${{ env.version }}"
6571
git push origin "${{ env.version }}"
66-
72+
6773
- name: Build Changelog
6874
id: github_release
6975
uses: mikepenz/release-changelog-builder-action@v5
@@ -97,7 +103,7 @@ jobs:
97103
}
98104
env:
99105
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100-
106+
101107
- name: Create GitHub release
102108
if: ${{ env.SKIP != 'true' }}
103109
uses: softprops/action-gh-release@v2
@@ -113,9 +119,9 @@ jobs:
113119
- name: Push dev VERSION
114120
if: ${{ env.SKIP != 'true' }}
115121
run: |
116-
echo "${{ env.version }}-dev" > VERSION
122+
task release:set-version -- "${{ env.version }}-dev"
117123
git config user.name "${{ env.AUTHOR_NAME }}"
118124
git config user.email "${{ env.AUTHOR_EMAIL }}"
119125
git add VERSION
120126
git commit -m "Update VERSION to ${{ env.version }}-dev"
121-
git push origin main
127+
git push origin main

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ secret.env
4242

4343
test/e2e/testdata/serect.yaml
4444
integration-tests.xml
45+
46+
cover.root.html
47+
api/cover.root.html

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "hack/common"]
2+
path = hack/common
3+
url = https://github.com/openmcp-project/build

.golangci.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: "2"
2+
run:
3+
concurrency: 4
4+
linters:
5+
exclusions:
6+
generated: lax
7+
presets:
8+
- comments
9+
- common-false-positives
10+
- legacy
11+
- std-error-handling
12+
paths:
13+
- zz_generated.*\.go$
14+
- tmp/.*
15+
- third_party$
16+
- builtin$
17+
- examples$
18+
formatters:
19+
exclusions:
20+
generated: lax
21+
paths:
22+
- third_party$
23+
- builtin$
24+
- examples$

.golangci.yml

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

0 commit comments

Comments
 (0)