Skip to content

Commit

Permalink
Fix catalogd-crd-diff CI check
Browse files Browse the repository at this point in the history
The check fails because the CRD does not exist in the new repo.
    We are improving the CI and makefile target to skip when the orginal
    does not exist.
  • Loading branch information
camilamacedo86 committed Jan 3, 2025
1 parent 82e1013 commit 8adea72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion catalogd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ CRD_DIFF_ORIGINAL_REF := main
CRD_DIFF_UPDATED_SOURCE := file://config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml
CRD_DIFF_CONFIG := crd-diff-config.yaml
verify-crd-compatibility: $(CRD_DIFF)
$(CRD_DIFF) --config="${CRD_DIFF_CONFIG}" "git://${CRD_DIFF_ORIGINAL_REF}?path=config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml" ${CRD_DIFF_UPDATED_SOURCE}
@if git show ${CRD_DIFF_ORIGINAL_REF}:config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml > /dev/null 2>&1; then \
echo "Running CRD diff..."; \
$(CRD_DIFF) --config="${CRD_DIFF_CONFIG}" "git://${CRD_DIFF_ORIGINAL_REF}?path=config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml" ${CRD_DIFF_UPDATED_SOURCE}; \
else \
echo "Skipping CRD diff: CRD does not exist in ${CRD_DIFF_ORIGINAL_REF}"; \
fi

.PHONY: lint
lint: $(GOLANGCI_LINT) ## Run golangci linter.
Expand Down

0 comments on commit 8adea72

Please sign in to comment.