Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #239 from cloudfoundry-incubator/rohit/make
Browse files Browse the repository at this point in the history
fixing make targets
  • Loading branch information
Vlad Iovanov authored May 15, 2019
2 parents 2cab651 + 93e4ffa commit 871a7a3
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 102 deletions.
5 changes: 0 additions & 5 deletions Dockerfile-nobuild

This file was deleted.

67 changes: 30 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,65 +1,58 @@
all: test-unit build image
#!/usr/bin/env make

.PHONY: build
build:
bin/build
all: tools test-unit test-integration test-e2e build

image:
bin/build-image
up:
bin/up

image-nobuild:
bin/build-nobuild-image
vet:
bin/vet

.PHONY: helm
helm:
bin/build-helm
lint:
bin/lint

export CF_OPERATOR_NAMESPACE ?= default
up:
bin/up
tools:
bin/tools

up-nobuild:
bin/up-nobuild
check-scripts:
bin/check-scripts

gen-kube:
bin/gen-kube
############ BUILD TARGETS ############

gen-fakes:
bin/gen-fakes
build:
bin/build

verify-gen-kube:
bin/verify-gen-kube
build-image:
bin/build-image

generate: gen-kube gen-fakes
build-helm:
bin/build-helm

vet:
bin/vet
############ TEST TARGETS ############

lint:
bin/lint
test: vet lint test-unit test-integration test-e2e

test-unit:
bin/test-unit

test-integration:
bin/test-integration

test-integration-nobuild: build image-nobuild
bin/test-integration

test-e2e:
bin/test-e2e

test: vet lint test-unit test-integration test-e2e
############ GENERATE TARGETS ############

tools:
bin/tools
generate: gen-kube gen-fakes

check-scripts:
bin/check-scripts
gen-kube:
bin/gen-kube

coverage:
bin/coverage
gen-fakes:
bin/gen-fakes

gen-command-docs:
go run cmd/gen-command-docs.go

verify-gen-kube:
bin/verify-gen-kube
19 changes: 0 additions & 19 deletions bin/build-nobuild-image

This file was deleted.

1 change: 0 additions & 1 deletion bin/test-unit
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ if [ -n "$COVERAGE" ]; then COV_ARG="-cover -outputdir=./code-coverage -coverpr

mkdir -p code-coverage
ginkgo -p -r --randomizeAllSpecs -failOnPending --trace $COV_ARG -skipPackage integration,e2e

20 changes: 0 additions & 20 deletions bin/up-nobuild

This file was deleted.

2 changes: 1 addition & 1 deletion docs/commands/cf-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ cf-operator [flags]
* [cf-operator util](cf-operator_util.md) - Calls a utility subcommand
* [cf-operator version](cf-operator_version.md) - Print the version number

###### Auto generated by spf13/cobra on 23-Apr-2019
###### Auto generated by spf13/cobra on 13-May-2019
5 changes: 2 additions & 3 deletions docs/commands/cf-operator_util.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ Calls a utility subcommand.
-n, --cf-operator-namespace string (CF_OPERATOR_NAMESPACE) Namespace to watch for BOSH deployments (default "default")
-o, --docker-image-org string (DOCKER_IMAGE_ORG) Dockerhub organization that provides the operator docker image (default "cfcontainerization")
-r, --docker-image-repository string (DOCKER_IMAGE_REPOSITORY) Dockerhub repository that provides the operator docker image (default "cf-operator")
-t, --docker-image-tag string (DOCKER_IMAGE_TAG) Tag of the operator docker image (default "v0.2.0-dirty+19.gfaca017")
-h, --help help for cf-operator
-t, --docker-image-tag string (DOCKER_IMAGE_TAG) Tag of the operator docker image (default "0.0.1")
-c, --kubeconfig string (KUBECONFIG) Path to a kubeconfig, not required in-cluster
-w, --operator-webhook-service-host string (CF_OPERATOR_WEBHOOK_SERVICE_HOST) Hostname/IP under which the webhook server can be reached from the cluster
-p, --operator-webhook-service-port string (CF_OPERATOR_WEBHOOK_SERVICE_PORT) Port the webhook server listens on (default "2999")
Expand All @@ -34,4 +33,4 @@ Calls a utility subcommand.
* [cf-operator util template-render](cf-operator_util_template-render.md) - Renders a bosh manifest
* [cf-operator util variable-interpolation](cf-operator_util_variable-interpolation.md) - Interpolate variables

###### Auto generated by spf13/cobra on 23-Apr-2019
###### Auto generated by spf13/cobra on 13-May-2019
8 changes: 4 additions & 4 deletions docs/commands/cf-operator_util_data-gather.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Gathers data of a bosh manifest

### Synopsis

Gathers data of a manifest.
Gathers data of a manifest.

This will retrieve information of an instance-group
inside a bosh manifest file.
Expand All @@ -18,8 +18,8 @@ cf-operator util data-gather [flags]
### Options

```
-b, --base-dir string (BASE_DIR) a path to the base directory
-h, --help help for data-gather
-b, --base-dir string (BASE_DIR) a path to the base directory
-h, --help help for data-gather
```

### Options inherited from parent commands
Expand All @@ -40,4 +40,4 @@ cf-operator util data-gather [flags]

* [cf-operator util](cf-operator_util.md) - Calls a utility subcommand

###### Auto generated by spf13/cobra on 23-Apr-2019
###### Auto generated by spf13/cobra on 13-May-2019
15 changes: 8 additions & 7 deletions docs/commands/cf-operator_util_template-render.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ cf-operator util template-render [flags]
### Options

```
--az-index int (AZ_INDEX) az index (default -1)
-h, --help help for template-render
-j, --jobs-dir string (JOBS_DIR) path to the jobs dir.
--pod-ordinal int (POD_ORDINAL) pod ordinal (default -1)
--replicas int (REPLICAS) number of replicas (default -1)
--spec-index int (SPEC_INDEX) index of the instance spec (default -1)
--az-index int (AZ_INDEX) az index (default -1)
-h, --help help for template-render
-j, --jobs-dir string (JOBS_DIR) path to the jobs dir.
-d, --output-dir string (OUTPUT_DIR) path to output dir. (default "/var/vcap/jobs")
--pod-ordinal int (POD_ORDINAL) pod ordinal (default -1)
--replicas int (REPLICAS) number of replicas (default -1)
--spec-index int (SPEC_INDEX) index of the instance spec (default -1)
```

### Options inherited from parent commands
Expand All @@ -42,4 +43,4 @@ cf-operator util template-render [flags]

* [cf-operator util](cf-operator_util.md) - Calls a utility subcommand

###### Auto generated by spf13/cobra on 23-Apr-2019
###### Auto generated by spf13/cobra on 13-May-2019
2 changes: 1 addition & 1 deletion docs/commands/cf-operator_util_variable-interpolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ cf-operator util variable-interpolation [flags]

* [cf-operator util](cf-operator_util.md) - Calls a utility subcommand

###### Auto generated by spf13/cobra on 23-Apr-2019
###### Auto generated by spf13/cobra on 13-May-2019
2 changes: 1 addition & 1 deletion docs/commands/cf-operator_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ cf-operator version [flags]

* [cf-operator](cf-operator.md) - cf-operator manages BOSH deployments on Kubernetes

###### Auto generated by spf13/cobra on 23-Apr-2019
###### Auto generated by spf13/cobra on 13-May-2019
42 changes: 41 additions & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,47 @@

## Makefile

Before starting, run `make tools` to install the required dependencies.
The following are the make targets available and their actions.

### General Targets

Name | Action |
--------------- | ---- |
`all` | install dependencies, run tests and builds `cf-operator` binary. |
`up` | starts the operator using the binary created by `build` make target. |
`vet` | runs the code analyzing tool `vet` to identify problems in the source code. |
`lint` | runs `go lint`to identify style mistakes. |
`tools` | installs go dependencies required to `cf-operator`. |
`check-scripts` | runs `shellcheck` to identify syntax, semmantic and subtle caveats in shell scripts. |


### Build Targets

Name | Action |
--------------- | ---- |
`build` | builds the `cf-operator` binary. |
`build-image` | builds the `cf-operator` docker image. |
`build-helm` | builds the `cf-operator` helm tar file. |

### Test Targets

Name | Action |
--------------- | ---- |
`test` | runs unit,integration and e2e tests. |
`test-unit` | runs unit tests only. |
`test-integration` | runs integration tests only. |
`test-e2e` | runs end to end tests only. |

### Generate Targets

Name | Action |
--------------- | ---- |
`generate` | runs `gen-kube` and `gen-fakes`. |
`gen-kube` | generates kube client,informers, lister code. |
`gen-fakes` | generates fake objects for unit testing. |
`gen-command-docs` | generates docs for all commands. |
`verify-gen-kube` | informs if you need to run `gen-kube` make target. |


## CI

Expand Down
5 changes: 3 additions & 2 deletions integration/extended_statefulset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ var _ = Describe("ExtendedStatefulSet", func() {
err = env.WaitForExtendedStatefulSetAvailable(env.Namespace, ess.GetName(), 2)
Expect(err).NotTo(HaveOccurred())

By("Waiting for first version to be deleteed")
Expect(env.WaitForLogMsg(env.ObservedLogs, "Deleting StatefulSet")).To(Succeed())
By("Checking for the first version statefulset is deleted")
err = env.WaitForStatefulSetDelete(env.Namespace, ess.GetName())
Expect(err).NotTo(HaveOccurred())

By("Checking extendedStatefulSet versions")
ess, err = env.GetExtendedStatefulSet(env.Namespace, ess.GetName())
Expand Down

0 comments on commit 871a7a3

Please sign in to comment.