Skip to content

Commit 0585195

Browse files
committed
use fixed upstream tasks
1 parent 490961d commit 0585195

File tree

2 files changed

+3
-58
lines changed

2 files changed

+3
-58
lines changed

Taskfile.yaml

Lines changed: 2 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -13,68 +13,13 @@ includes:
1313
shared:
1414
taskfile: hack/common/Taskfile_controller.yaml
1515
flatten: true
16-
excludes:
17-
- test
18-
- test-envtest-dep
19-
- build:bin:val:test
20-
- build-raw
21-
- build:bin:build-raw
22-
# put task names in here which are overwritten in this file
23-
vars:
24-
NESTED_MODULES: api
25-
API_DIRS: '{{.ROOT_DIR}}/api/v1beta1/...'
26-
MANIFEST_OUT: '{{.ROOT_DIR}}/api/crds/manifests'
27-
CODE_DIRS: '{{.ROOT_DIR}}/cmd/... {{.ROOT_DIR}}/internal/... {{.ROOT_DIR}}/test/... {{.ROOT_DIR}}/api/v1beta1/...'
28-
COMPONENTS: 'control-plane-operator'
29-
REPO_URL: 'https://github.com/openmcp-project/control-plane-operator'
30-
ENVTEST_REQUIRED: "true"
31-
ENVTEST_K8S_VERSION: "1.30.0"
32-
33-
tasks:
34-
test:
35-
desc: " Run all tests."
36-
run: once
37-
aliases:
38-
- build:bin:val:test
16+
excludes: []
3917
vars:
4018
NESTED_MODULES: api
4119
API_DIRS: '{{.ROOT_DIR}}/api/v1beta1/...'
4220
MANIFEST_OUT: '{{.ROOT_DIR}}/api/crds/manifests'
4321
CODE_DIRS: '{{.ROOT_DIR}}/... {{.ROOT_DIR}}/cmd/... {{.ROOT_DIR}}/internal/... {{.ROOT_DIR}}/test/... {{.ROOT_DIR}}/api/v1beta1/...'
4422
COMPONENTS: 'control-plane-operator'
4523
REPO_URL: 'https://github.com/openmcp-project/control-plane-operator'
46-
GENERATE_DOCS_INDEX: "true"
47-
ENVTEST_REQUIRED: "true"
48-
ENVTEST_K8S_VERSION: "1.30.0"
49-
deps:
50-
- test-envtest-dep
51-
# Very hacky way to run the test. We need to have KUBEBUILDER_ASSETS set. If we configure this as a dynamic task variable,
52-
# it fails if the setup-envtest binary is not installed. Unfortunately setting test-envtest-dep as a dependency here doesn't
53-
# work because variables are evaluated before dependencies.
54-
cmds:
55-
- export KUBEBUILDER_ASSETS=$({{.ROOT_DIR}}/bin/setup-envtest use {{.ENVTEST_K8S_VERSION}} -p path); sh -c 'PROJECT_ROOT="{{.ROOT_DIR}}" NESTED_MODULES="{{.NESTED_MODULES}}" ENVTEST_K8S_VERSION="{{.ENVTEST_K8S_VERSION}}" {{.TASKFILE_DIR2}}/run-tests.sh {{.CODE_DIRS}}'
56-
57-
test-envtest-dep:
58-
desc: " Install the envtest dependency, if marked as required."
59-
run: once
60-
status:
61-
- '[ "{{.ENVTEST_REQUIRED | default "false"}}" != "true" ]'
62-
cmds:
63-
- task: tools:envtest
64-
vars:
6524
ENVTEST_REQUIRED: "true"
66-
internal: true
67-
68-
build-raw:
69-
desc: " Build the binary. Opposed to the regular build, this one just builds and skips code generation/validation tasks."
70-
summary: |
71-
This task builds the binary for the current operating system and architecture.
72-
To overwrite this, set the 'OS' and 'ARCH' environment variables.
73-
The binary is saved in the 'bin' folder, as $COMPONENT.$OS-$ARCH.
74-
aliases:
75-
- build:bin:build-raw
76-
cmds:
77-
- for:
78-
var: COMPONENTS
79-
as: COMPONENT
80-
cmd: 'CGO_ENABLED=0 GOOS={{.OS}} GOARCH={{.ARCH}} go build -a -o {{.ROOT_DIR2}}/bin/{{.COMPONENT}}.{{.OS}}-{{.ARCH}} {{.ROOT_DIR2}}/cmd/main.go'
25+
ENVTEST_K8S_VERSION: "1.30.0"

0 commit comments

Comments
 (0)