Skip to content

Commit

Permalink
Add install SDK goal to make (#458)
Browse files Browse the repository at this point in the history
Add install SDK goal to make

Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay authored and jpkrohling committed Jun 5, 2019
1 parent 2f67fd4 commit df59446
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- OPERATOR_VERSION="JOB_${TRAVIS_JOB_NUMBER}"
name: "Build and unit test"
install:
- "./.travis/install.sh"
- make install-sdk install-tools
script:
- "./.travis/script.sh"
after_success:
Expand Down
11 changes: 0 additions & 11 deletions .travis/install.sh

This file was deleted.

23 changes: 1 addition & 22 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,7 @@ This project is a regular link:https://coreos.com/operators/[Kubernetes Operator

=== Installing the Operator SDK command line tool

At the time of this writing, the link:https://github.com/operator-framework/operator-sdk[Operator SDK GitHub page] listed the following commands as required to install the command line tool:

[source,bash]
----
mkdir -p $GOPATH/src/github.com/operator-framework
cd $GOPATH/src/github.com/operator-framework
git clone https://github.com/operator-framework/operator-sdk
cd operator-sdk
git checkout v0.5.0
make dep
make install
----

Alternatively, a released binary can be used instead:

[source,bash]
----
curl https://github.com/operator-framework/operator-sdk/releases/download/v0.5.0/operator-sdk-v0.5.0-x86_64-linux-gnu -sLo $GOPATH/bin/operator-sdk
chmod +x $GOPATH/bin/operator-sdk
----

NOTE: Make sure your `$GOPATH/bin` is part of your regular `$PATH`.
Follow the installation guidelines from link::https://github.com/operator-framework/operator-sdk[Operator SDK GitHub page] or run `make install-sdk`.

=== Developing

Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ OPERATOR_VERSION ?= "$(shell git describe --tags)"
STORAGE_NAMESPACE ?= "${shell kubectl get sa default -o jsonpath='{.metadata.namespace}' || oc project -q}"
KAFKA_NAMESPACE ?= "kafka"
ES_OPERATOR_NAMESPACE = openshift-logging
SDK_VERSION=v0.8.1

LD_FLAGS ?= "-X $(VERSION_PKG).version=$(OPERATOR_VERSION) -X $(VERSION_PKG).buildDate=$(VERSION_DATE) -X $(VERSION_PKG).defaultJaeger=$(JAEGER_VERSION)"
PACKAGES := $(shell go list ./cmd/... ./pkg/... | grep -v elasticsearch/v1)
Expand Down Expand Up @@ -190,3 +191,14 @@ ci: ensure-generate-is-noop check format lint security build unit-tests
.PHONY: scorecard
scorecard:
@operator-sdk scorecard --cr-manifest deploy/examples/simplest.yaml --csv-path deploy/olm-catalog/jaeger.clusterserviceversion.yaml --init-timeout 30

.PHONY: install-sdk
install-sdk:
@echo Installing SDK ${SDK_VERSION}
@curl https://github.com/operator-framework/operator-sdk/releases/download/${SDK_VERSION}/operator-sdk-${SDK_VERSION}-x86_64-linux-gnu -sLo ${GOPATH}/bin/operator-sdk
@chmod +x ${GOPATH}/bin/operator-sdk

.PHONY: install-tools
install-tools:
@go get -u golang.org/x/lint/golint
@go get github.com/securego/gosec/cmd/gosec/...

0 comments on commit df59446

Please sign in to comment.