Skip to content

Commit 0a64633

Browse files
committed
use common task definitions
1 parent 44ccc82 commit 0a64633

File tree

4 files changed

+61
-165
lines changed

4 files changed

+61
-165
lines changed

.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

Makefile

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

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./hack/common/Makefile

Taskfile.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
version: 3
2+
3+
# vars: # cannot be specified here due to https://github.com/go-task/task/issues/2108
4+
# NESTED_MODULES: api
5+
# API_DIRS: '{{.ROOT_DIR}}/api/core/v1alpha1/...'
6+
# MANIFEST_OUT: '{{.ROOT_DIR}}/api/crds/manifests'
7+
# CODE_DIRS: '{{.ROOT_DIR}}/cmd/... {{.ROOT_DIR}}/internal/... {{.ROOT_DIR}}/test/... {{.ROOT_DIR}}/api/constants/... {{.ROOT_DIR}}/api/errors/... {{.ROOT_DIR}}/api/install/... {{.ROOT_DIR}}/api/v1alpha1/... {{.ROOT_DIR}}/api/core/v1alpha1/...'
8+
# COMPONENTS: 'mcp-operator'
9+
# REPO_URL: 'https://github.com/openmcp-project/mcp-operator'
10+
# GENERATE_DOCS_INDEX: "true"
11+
12+
includes:
13+
shared:
14+
taskfile: hack/common/Taskfile_controller.yaml
15+
flatten: true
16+
excludes: # put task names in here which are overwritten in this file
17+
- generate:code
18+
vars:
19+
NESTED_MODULES: api
20+
API_DIRS: '{{.ROOT_DIR}}/api/core/v1alpha1/...'
21+
MANIFEST_OUT: '{{.ROOT_DIR}}/api/crds/manifests'
22+
CODE_DIRS: '{{.ROOT_DIR}}/cmd/... {{.ROOT_DIR}}/internal/... {{.ROOT_DIR}}/test/... {{.ROOT_DIR}}/api/constants/... {{.ROOT_DIR}}/api/errors/... {{.ROOT_DIR}}/api/install/... {{.ROOT_DIR}}/api/v1alpha1/... {{.ROOT_DIR}}/api/core/v1alpha1/...'
23+
COMPONENTS: 'mcp-operator'
24+
REPO_URL: 'https://github.com/openmcp-project/mcp-operator'
25+
GENERATE_DOCS_INDEX: "true"
26+
common: # imported a second time so that overwriting task definitions can call the overwritten task with a 'c:' prefix
27+
taskfile: hack/common/Taskfile_controller.yaml
28+
internal: true
29+
aliases:
30+
- c
31+
vars:
32+
NESTED_MODULES: api
33+
API_DIRS: '{{.ROOT_DIR}}/api/core/v1alpha1/...'
34+
MANIFEST_OUT: '{{.ROOT_DIR}}/api/crds/manifests'
35+
CODE_DIRS: '{{.ROOT_DIR}}/cmd/... {{.ROOT_DIR}}/internal/... {{.ROOT_DIR}}/test/... {{.ROOT_DIR}}/api/constants/... {{.ROOT_DIR}}/api/errors/... {{.ROOT_DIR}}/api/install/... {{.ROOT_DIR}}/api/v1alpha1/... {{.ROOT_DIR}}/api/core/v1alpha1/...'
36+
COMPONENTS: 'mcp-operator'
37+
REPO_URL: 'https://github.com/openmcp-project/mcp-operator'
38+
GENERATE_DOCS_INDEX: "true"
39+
40+
tasks:
41+
generate:code: # overwrites shared code task to add external API fetching
42+
desc: " Generate code (mainly DeepCopy functions) and fetches external APIs."
43+
run: once
44+
cmds:
45+
- task: external-apis
46+
- task: c:generate:code
47+
48+
external-apis:
49+
desc: " Fetch external APIs."
50+
run: once
51+
method: checksum
52+
sources:
53+
- hack/external-apis/*
54+
cmds:
55+
- 'go run {{.ROOT_DIR}}/hack/external-apis/main.go'
56+
internal: true

hack/common

Submodule common added at e983ac5

0 commit comments

Comments
 (0)