Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure correct version of operator-sdk is always used #728

Merged
merged 3 commits into from
Feb 22, 2022
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: 0 additions & 4 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
- name: "install kustomize"
run: ./hack/install-kustomize.sh

- uses: jpkrohling/[email protected]
with:
operator-sdk-version: v1.17.0

- name: "basic checks"
run: make ci

Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ jobs:
- name: "install kustomize"
run: ./hack/install-kustomize.sh

- uses: jpkrohling/[email protected]
with:
operator-sdk-version: v1.17.0

- name: "generate release resources"
run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator"

Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,5 @@ jobs:
- name: "wait until cluster is ready"
run: kubectl wait --timeout=5m --for=condition=available deployment/coredns -n kube-system

- uses: jpkrohling/[email protected]
with:
operator-sdk-version: v1.17.0

- name: "run scorecard test"
run: make scorecard-tests
17 changes: 7 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ endif
KUBE_VERSION ?= 1.21
KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml

OPERATOR_SDK_VERSION ?= 1.17.0

CERTMANAGER_VERSION ?= 1.6.1

ifndef ignore-not-found
Expand Down Expand Up @@ -152,7 +154,7 @@ prepare-e2e: kuttl set-test-image-vars set-image-controller container start-kind
$(KUSTOMIZE) build config/crd -o tests/_build/crds/

.PHONY: scorecard-tests
scorecard-tests:
scorecard-tests: operator-sdk
$(OPERATOR_SDK) scorecard -w=5m bundle || (echo "scorecard test failed" && exit 1)

.PHONY: set-test-image-vars
Expand Down Expand Up @@ -263,20 +265,15 @@ else
KIND=$(shell which kind)
endif

OPERATOR_SDK = $(shell pwd)/bin/operator-sdk
.PHONY: operator-sdk
operator-sdk:
ifeq (, $(shell which operator-sdk))
@{ \
set -e ;\
echo "" ;\
echo "ERROR: operator-sdk not found." ;\
echo "Please check https://sdk.operatorframework.io for installation instructions and try again." ;\
echo "" ;\
exit 1 ;\
[ -d bin ] || mkdir bin ;\
curl -L -o $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/v${OPERATOR_SDK_VERSION}/operator-sdk_`go env GOOS`_`go env GOARCH`;\
chmod +x $(OPERATOR_SDK) ;\
}
else
OPERATOR_SDK=$(shell which operator-sdk)
endif

# Generate bundle manifests and metadata, then validate generated files.
.PHONY: bundle
Expand Down