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

AEROGEAR-2850 New UPS annotations on mobile client #38

Merged
merged 6 commits into from
Jun 7, 2018
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: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ jobs:
- run:
name: Install Glide
command: curl https://glide.sh/get | sh
- run:
name: Install Mockery
command: go get github.com/vektra/mockery/.../
- run: make setup
- run: make test
- run: make build_linux

docker_push_master:
Expand Down
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
APP_NAME = ups-config-operator

PKG = github.com/aerogear/$(APP_NAME)
TOP_SRC_DIRS = pkg
PACKAGES ?= $(shell sh -c "find $(TOP_SRC_DIRS) -name \\*_test.go \
-exec dirname {} \\; | sort | uniq")

DOCKER_LATEST_TAG = docker.io/aerogear/$(APP_NAME):latest
DOCKER_MASTER_TAG = docker.io/aerogear/$(APP_NAME):master
RELEASE_TAG ?= $(CIRCLE_TAG)
Expand All @@ -10,11 +16,20 @@ generate:

.PHONY: setup
setup:
glide install --strip-vendor
glide install
mockery -all -inpkg -dir pkg

.PHONY: test
test:
@echo Running tests:
mockery -all -inpkg -dir pkg
GOCACHE=off go test -cover \
$(addprefix $(PKG)/,$(PACKAGES))

.PHONY: build_linux
build_linux:
env GOOS=linux GOARCH=amd64 go build cmd/server/main.go cmd/server/types.go cmd/server/upsClient.go
mockery -all -inpkg -dir pkg
env GOOS=linux GOARCH=amd64 go build cmd/server/main.go

.PHONY: docker_build
docker_build: build_linux
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Currently this needs to use a service account with admin permissions. Use:
$ kubectl create clusterrolebinding <your namespace>-admin-binding --clusterrole=admin --serviceaccount=<your namespace>:default
```

# Development:

* Install Mockery on your machine: <https://github.com/vektra/mockery>
* Run `make setup`
* Run tests: `make test`

## Usage

Make sure that you are logged in with `oc` and use the right namespace.
Expand Down
Loading