Created
November 29, 2018 11:25
-
-
Save odra/4567a5a48ca78d3fe178131be12b22ee to your computer and use it in GitHub Desktop.
makefiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL = /bin/bash | |
setup/dep: | |
@dep ensure -v | |
code/check: | |
@diff -u <(echo -n) <(gofmt -d `find . -type f -name '*.go' -not -path "./vendor/*"`) | |
code/fix: | |
@gofmt -w `find . -type f -name '*.go' -not -path "./vendor/*"` | |
test/unit: | |
@go test -v -race -cover ./pkg/... | |
test/smoke: code/check test/unit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL = /bin/bash | |
REG = docker.io | |
ORG = odranoel | |
IMAGE = deployment-operator | |
TAG = latest | |
SA = deployment-operator | |
NS = deployment-operator | |
TEST_FOLDER = ./test/e2e | |
setup/dep: | |
@dep ensure -v | |
code/gen: | |
@operator-sdk generate k8s | |
code/check: | |
@diff -u <(echo -n) <(gofmt -d `find . -type f -name '*.go' -not -path "./vendor/*"`) | |
code/fix: | |
@gofmt -w `find . -type f -name '*.go' -not -path "./vendor/*"` | |
image/build: | |
@operator-sdk build ${REG}/${ORG}/${IMAGE}:${TAG} | |
image/build-with-tests: | |
@operator-sdk build --enable-tests ${REG}/${ORG}/${IMAGE}:${TAG} | |
image/push: | |
@docker push ${REG}/${ORG}/${IMAGE}:${TAG} | |
test/unit: | |
@go test -v -race -cover ./pkg/... | |
test/smoke: code/check test/unit | |
test/e2e/local: image/build-with-tests image/push | |
@operator-sdk test local ${TEST_FOLDER} --go-test-flags "-v" | |
test/e2e/cluster: image/build-with-tests image/push | |
@kubectl apply -f deploy/test-pod.yaml -n ${NS} | |
${SHELL} ./scripts/stream-pod ${TEST_POD_NAME} ${NS} | |
cluster/prepare: | |
@kubectl create ns ${NS} || true | |
@kubectl apply -f deploy/role.yaml -n ${NS} | |
@kubectl apply -f deploy/service_account.yaml -n ${NS} | |
@kubectl apply -f deploy/role_binding.yaml -n ${NS} | |
@kubectl apply -f deploy/crds/integreatly_v1alpha1_deployment_crd.yaml | |
cluster/deploy: | |
@kubectl apply -f deploy/crds/integreatly_v1alpha1_deployment_cr.yaml -n ${NS} | |
@kubectl apply -f deploy/operator.yaml -n ${NS} | |
cluster/clean: | |
@kubectl delete all --all -n ${NS} | |
kubectl delete tdeployment/example-deployment -n ${NS} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment