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
4 changes: 2 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '>=1.21.3'
go-version: '>=1.25.0'
- name: build
run: make build
testing:
Expand All @@ -49,7 +49,7 @@ jobs:
key: ${{ runner.os }}-binaries-${{ hashFiles('**/go.sum') }}
- uses: actions/setup-go@v4
with:
go-version: '>=1.21.3'
go-version: '>=1.25.0'
- name: run tests
run: make test

9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ IMG ?= controller:latest
BUILDER_IMAGE ?= ""

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.26.0
ENVTEST_K8S_VERSION = 1.29.0

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -77,7 +77,7 @@ lint: golangci-lint ## Run linters
.PHONY: test
test: ginkgo manifests generate lint envtest generate-mocks ## Run all tests.
go test ./pkg/...
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -r --output-interceptor-mode=none
KUBEBUILDER_ASSETS="$$($(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -r --output-interceptor-mode=none

.PHONY: test-unit
test-unit: ginkgo manifests generate lint generate-mocks ## Run unit tests.
Expand All @@ -86,7 +86,7 @@ test-unit: ginkgo manifests generate lint generate-mocks ## Run unit tests.

.PHONY: test-integration ## Run integration tests.
test-integration: ginkgo manifests generate lint envtest generate-mocks ## Run integration tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -r --label-filter "integration" --output-interceptor-mode=none
KUBEBUILDER_ASSETS="$$($(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -r --label-filter "integration" --output-interceptor-mode=none

.PHONY: kind-create
kind-create: kind ## Create kind cluster
Expand Down Expand Up @@ -214,11 +214,10 @@ gopls:
# $(shell go version)
GOBIN=$(LOCALBIN) go install golang.org/x/tools/gopls@latest


.PHONY: envtest
envtest: $(ENVTEST) ## Download setup-envtest locally if necessary.
$(ENVTEST): $(LOCALBIN)
test -s $(ENVTEST) || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest
test -s $(ENVTEST) || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

.PHONY: golangci-lint
golangci-lint: ## Download golangci-lint locally if necessary.
Expand Down
6 changes: 3 additions & 3 deletions pkg/ocp/sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ type SourceConfig struct {
// GitConfig represents the git source control configuration for a source.
type GitConfig struct {
Repo string `json:"repo"`
Reference string `json:"reference"`
Reference string `json:"reference,omitempty"`
Commit string `json:"commit,omitempty"`
Path string `json:"path"`
Path string `json:"path,omitempty"`
IncludedFiles []string `json:"included_files,omitempty"`
ExcludedFiles []string `json:"excluded_files,omitempty"`
CredentialID string `json:"credentials,omitempty"`
Expand All @@ -89,7 +89,7 @@ type GitConfig struct {
// Datasource represents a datasource for a source.
type Datasource struct {
Name string `json:"name" yaml:"name"`
Path string `json:"path" yaml:"path"`
Path string `json:"path,omitempty" yaml:"path,omitempty"`
Type string `json:"type" yaml:"type"`
TransformQuery string `json:"transform_query,omitempty" yaml:"transform_query,omitempty"`
Config map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"`
Expand Down
Loading