|
| 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 | + - validate:test |
| 19 | + vars: |
| 20 | + NESTED_MODULES: api |
| 21 | + API_DIRS: '{{.ROOT_DIR}}/api/core/v1alpha1/...' |
| 22 | + MANIFEST_OUT: '{{.ROOT_DIR}}/api/crds/manifests' |
| 23 | + 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/...' |
| 24 | + COMPONENTS: 'mcp-operator' |
| 25 | + REPO_URL: 'https://github.com/openmcp-project/mcp-operator' |
| 26 | + GENERATE_DOCS_INDEX: "true" |
| 27 | + common: # imported a second time so that overwriting task definitions can call the overwritten task with a 'c:' prefix |
| 28 | + taskfile: hack/common/Taskfile_controller.yaml |
| 29 | + internal: true |
| 30 | + aliases: |
| 31 | + - c |
| 32 | + vars: |
| 33 | + NESTED_MODULES: api |
| 34 | + API_DIRS: '{{.ROOT_DIR}}/api/core/v1alpha1/...' |
| 35 | + MANIFEST_OUT: '{{.ROOT_DIR}}/api/crds/manifests' |
| 36 | + 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/...' |
| 37 | + COMPONENTS: 'mcp-operator' |
| 38 | + REPO_URL: 'https://github.com/openmcp-project/mcp-operator' |
| 39 | + GENERATE_DOCS_INDEX: "true" |
| 40 | + |
| 41 | +tasks: |
| 42 | + generate:code: # overwrites shared code task to add external API fetching |
| 43 | + desc: " Generate code (mainly DeepCopy functions) and fetches external APIs." |
| 44 | + aliases: |
| 45 | + - gen:code |
| 46 | + - g:code |
| 47 | + run: once |
| 48 | + cmds: |
| 49 | + - task: external-apis |
| 50 | + - task: c:generate:code |
| 51 | + |
| 52 | + external-apis: |
| 53 | + desc: " Fetch external APIs." |
| 54 | + run: once |
| 55 | + method: checksum |
| 56 | + sources: |
| 57 | + - hack/external-apis/* |
| 58 | + cmds: |
| 59 | + - 'go run {{.ROOT_DIR}}/hack/external-apis/main.go' |
| 60 | + internal: true |
| 61 | + |
| 62 | + validate:test: # overwrites the test task to add a dependency towards envtest |
| 63 | + desc: " Run all tests." |
| 64 | + aliases: |
| 65 | + - val:test |
| 66 | + - v:test |
| 67 | + run: once |
| 68 | + deps: |
| 69 | + - tools:envtest |
| 70 | + cmds: |
| 71 | + - task: c:validate:test |
0 commit comments