File tree Expand file tree Collapse file tree 5 files changed +470
-5
lines changed
Expand file tree Collapse file tree 5 files changed +470
-5
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ FROM golang:1.14-alpine as builder
22
33WORKDIR /workspace
44
5+ # copy api submodule
6+ COPY api/ api/
7+
58# copy modules manifests
69COPY go.mod go.mod
710COPY go.sum go.sum
@@ -11,7 +14,6 @@ RUN go mod download
1114
1215# copy source code
1316COPY main.go main.go
14- COPY api/ api/
1517COPY controllers/ controllers/
1618COPY internal/ internal/
1719
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ all: manager
1414
1515# Run tests
1616test : generate fmt vet manifests api-docs
17- go test ./... -coverprofile cover.out
17+ find . -maxdepth 2 -type f -name ' go.mod ' -execdir go test ./... -coverprofile cover.out \;
1818
1919# Build manager binary
2020manager : generate fmt vet
@@ -53,19 +53,20 @@ dev-cleanup: manifests
5353
5454# Generate manifests e.g. CRD, RBAC etc.
5555manifests : controller-gen
56- $(CONTROLLER_GEN ) $(CRD_OPTIONS ) rbac:roleName=manager-role paths=" ./..." output:crd:artifacts:config=config/crd/bases
56+ $(CONTROLLER_GEN ) $(CRD_OPTIONS ) rbac:roleName=manager-role paths=" ./..." output:crd:artifacts:config=" config/crd/bases"
57+ cd api; $(CONTROLLER_GEN ) $(CRD_OPTIONS ) rbac:roleName=manager-role paths=" ./..." output:crd:artifacts:config=" ../config/crd/bases"
5758
5859# Generate API reference documentation
5960api-docs : gen-crd-api-reference-docs
6061 $(API_REF_GEN ) -api-dir=./api/v1alpha1 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/notification.md
6162
6263# Run go fmt against code
6364fmt :
64- go fmt ./...
65+ find . -maxdepth 2 -type f -name ' go.mod ' -execdir go fmt ./... \;
6566
6667# Run go vet against code
6768vet :
68- go vet ./...
69+ find . -maxdepth 2 -type f -name ' go.mod ' -execdir go vet ./... \;
6970
7071# Generate code
7172generate : controller-gen
Original file line number Diff line number Diff line change 1+ module github.com/fluxcd/notification-controller/api
2+
3+ go 1.14
4+
5+ require (
6+ k8s.io/api v0.18.8
7+ k8s.io/apimachinery v0.18.8
8+ sigs.k8s.io/controller-runtime v0.6.2
9+ )
You can’t perform that action at this time.
0 commit comments