Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,27 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: recursive


- name: Set up Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version-file: go.mod

- name: make tidy
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x

- name: make generate
run: |
make tidy
task generate
git diff --exit-code

- name: make verify
run: make verify

- name: make test
run: make test
- name: task validate
run: task validate

- name: task test
run: task test
33 changes: 14 additions & 19 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ on:
push:
tags:
- v*
workflow_dispatch:

workflow_dispatch:

permissions:
packages: write
Expand All @@ -23,11 +22,17 @@ jobs:
ssh-key: ${{ secrets.PUSH_KEY }}
fetch-tags: true
fetch-depth: 0
submodules: recursive

- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x

- name: Read and validate VERSION
id: version
run: |
VERSION=$(cat VERSION)
VERSION=$(task version)
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-dev)?$ ]]; then
echo "Invalid version format in VERSION file: $VERSION"
exit 1
Expand Down Expand Up @@ -68,24 +73,14 @@ jobs:
with:
go-version-file: go.mod

- name: Build the ${{ github.repository }}
- name: Build and Push Images
run: |
make prepare-release
make build

- name: Build Images
run: |
IMAGE_REGISTRY=ghcr.io/openmcp-project make image-build

- name: setup OCM
uses: open-component-model/ocm-setup-action@main
task build:img:all

- name: Create OCM CTF
- name: Package and Push Helm Charts
run: |
ocm add componentversions --create \
--file ctf component-constructor.yaml \
--settings settings.yaml -- VERSION=${{ env.version }}
task build:helm:all

- name: Push CTF
- name: Build and Push OCM Component
run: |
ocm transfer ctf --overwrite ./ctf ${{ env.OCI_URL }}
task build:ocm:all
28 changes: 25 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ jobs:
ssh-key: ${{ secrets.PUSH_KEY }}
fetch-tags: true
fetch-depth: 0
submodules: recursive

- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x

- name: Read and validate VERSION
id: version
run: |
VERSION=$(cat VERSION)
VERSION=$(task version)
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-dev)?$ ]]; then
echo "Invalid version format in VERSION file: $VERSION"
exit 1
Expand Down Expand Up @@ -63,7 +69,7 @@ jobs:

git tag -a "${{ env.version }}" -m "Release ${{ env.version }}"
git push origin "${{ env.version }}"

- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@e92187bd633e680ebfdd15961a7c30b2d097e7ad # v5
Expand Down Expand Up @@ -97,6 +103,22 @@ jobs:
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Git tag for api submodule
if: ${{ env.SKIP != 'true' }}
run: |
AUTHOR_NAME=$(git log -1 --pretty=format:'%an')
AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae')
echo "Tagging as $AUTHOR_NAME <$AUTHOR_EMAIL>"

echo "AUTHOR_NAME=$AUTHOR_NAME" >> $GITHUB_ENV
echo "AUTHOR_EMAIL=$AUTHOR_EMAIL" >> $GITHUB_ENV

git config user.name "$AUTHOR_NAME"
git config user.email "$AUTHOR_EMAIL"

git tag -a "api/${{ env.version }}" -m "Release ${{ env.version }}"
git push origin "api/${{ env.version }}"

- name: Create GitHub release
if: ${{ env.SKIP != 'true' }}
Expand All @@ -113,7 +135,7 @@ jobs:
- name: Push dev VERSION
if: ${{ env.SKIP != 'true' }}
run: |
echo "${{ env.version }}-dev" > VERSION
task release:set-version -- "${{ env.version }}-dev"
git config user.name "${{ env.AUTHOR_NAME }}"
git config user.email "${{ env.AUTHOR_EMAIL }}"
git add VERSION
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ components/

# add later again
blueprints/
components/
components/

api/cover.root.html
cover.root.html
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "hack/common"]
path = hack/common
url = https://github.com/openmcp-project/build
83 changes: 0 additions & 83 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions Makefile
24 changes: 24 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 3

# vars: # cannot be specified here due to https://github.com/go-task/task/issues/2108
# NESTED_MODULES: api
# API_DIRS: '{{.ROOT_DIR}}/api/core/v1alpha1/...'
# MANIFEST_OUT: '{{.ROOT_DIR}}/api/crds/manifests'
# CODE_DIRS: '{{.ROOT_DIR}}/cmd/... {{.ROOT_DIR}}/internal/... {{.ROOT_DIR}}/test/... {{.ROOT_DIR}}/api/core/v1alpha1/...'
# COMPONENTS: 'quota-operator'
# REPO_URL: 'https://github.com/openmcp-project/quota-operator'
# GENERATE_DOCS_INDEX: "true"

includes:
shared:
taskfile: hack/common/Taskfile_controller.yaml
flatten: true
excludes: [] # put task names in here which are overwritten in this file
vars:
NESTED_MODULES: api
API_DIRS: '{{.ROOT_DIR}}/api/v1alpha1/...'
MANIFEST_OUT: '{{.ROOT_DIR}}/api/crds/manifests'
CODE_DIRS: '{{.ROOT_DIR}}/cmd/... {{.ROOT_DIR}}/api/v1alpha1/... {{.ROOT_DIR}}/api/install/... {{.ROOT_DIR}}/api/crds/...'
COMPONENTS: 'quota-operator'
REPO_URL: 'https://github.com/openmcp-project/quota-operator'

2 changes: 1 addition & 1 deletion api/crds/manifests/openmcp.cloud_quotaincreases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
controller-gen.kubebuilder.io/version: v0.17.3
name: quotaincreases.openmcp.cloud
spec:
group: openmcp.cloud
Expand Down
1 change: 1 addition & 0 deletions hack/common
Submodule common added at b9bce1
12 changes: 0 additions & 12 deletions hack/common/Dockerfile

This file was deleted.

Loading