Skip to content

Commit 23acd16

Browse files
authored
Release V0.1.0 (#9)
1 parent 2e43282 commit 23acd16

File tree

4 files changed

+27
-16
lines changed

4 files changed

+27
-16
lines changed

Makefile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,28 @@ endif
4343
all: manager
4444

4545
# Run tests
46-
test: generate fmt vet manifests
46+
test: generate fmt vet manifests ## Run unit tests
4747
# TODO bring back
4848
go test ./... -coverprofile cover.out
4949

5050
# Build manager binary
51-
manager: generate fmt vet
51+
manager: generate fmt vet ## Build manager binary
5252
go build -o bin/manager main.go
5353

5454
# Run against the configured Kubernetes cluster in ~/.kube/config
5555
run: generate fmt vet manifests
5656
go run ./main.go
5757

5858
# Install CRDs into a cluster
59-
install: manifests
59+
install: manifests ## Install CRDs into a cluster
6060
kustomize build config/crd | kubectl apply -f -
6161

6262
# Uninstall CRDs from a cluster
63-
uninstall: manifests
63+
uninstall: manifests ## Uninstall CRDs from a cluster
6464
kustomize build config/crd | kubectl delete -f -
6565

6666
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
67-
deploy: manifests
67+
deploy: manifests ## Deploy controller in the configured Kubernetes cluster
6868
cd config/manager && kustomize edit set image controller=${IMG}
6969
kustomize build config/default | kubectl apply -f -
7070

@@ -104,19 +104,19 @@ dev-manifests:
104104
cp metadata.yaml $(DEV_DIR)/metadata.yaml
105105

106106
# Generate manifests e.g. CRD, RBAC etc.
107-
manifests: $(CONTROLLER_GEN) $(MANIFEST_DIR) $(KUSTOMIZE) $(BUILD_DIR)
107+
manifests: $(CONTROLLER_GEN) $(MANIFEST_DIR) $(KUSTOMIZE) $(BUILD_DIR) ## Generate manifests e.g. CRD, RBAC etc.
108108
rm -rf $(BUILD_DIR)/config
109109
cp -R config $(BUILD_DIR)/config
110110
sed -i'' -e 's@imagePullPolicy: .*@imagePullPolicy: '"$(PULL_POLICY)"'@' $(BUILD_DIR)/config/default/manager_pull_policy.yaml
111111
sed -i'' -e 's@image: .*@image: '"$(IMAGE)"'@' $(BUILD_DIR)/config/default/manager_image_patch.yaml
112112
"$(KUSTOMIZE)" build $(BUILD_DIR)/config/default > $(MANIFEST_DIR)/infrastructure-components.yaml
113113

114114
# Run go fmt against code
115-
fmt:
115+
fmt: ## Run go fmt against code
116116
go fmt ./...
117117

118118
# Run go vet against code
119-
vet:
119+
vet: ## Run go vet against code
120120
go vet ./...
121121

122122
# Generate code
@@ -127,7 +127,7 @@ generate: $(CONTROLLER_GEN)
127127
generate-go:
128128
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
129129

130-
generate-manifests:
130+
generate-manifests: ## Generate manifests
131131
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
132132

133133

@@ -136,10 +136,10 @@ docker-build: test
136136
docker build . -t ${IMG}
137137

138138
# Push the docker image
139-
docker-push:
139+
docker-push: ## Push the docker image to gcr
140140
docker push ${IMG}
141141

142-
docker-rmi:
142+
docker-rmi: ## Remove the docker image locally
143143
docker rmi ${IMG}
144144

145145
mock: $(MOCKGEN)
@@ -149,5 +149,8 @@ clean-release:
149149
rm -rf $(RELEASE_DIR)
150150

151151
release: release-manifests
152-
$(MAKE) docker-build IMG=$(RELEASE_CONTROLLER_IMG):$(VERSION)
152+
# $(MAKE) docker-build IMG=$(RELEASE_CONTROLLER_IMG):$(VERSION)
153153
$(MAKE) docker-push IMG=$(RELEASE_CONTROLLER_IMG):$(VERSION)
154+
155+
version: ## Prints version of current make
156+
@echo $(VERSION)

clusterctl-settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "infrastructure-maas",
33
"config": {
44
"componentsFile": "infrastructure-components.yaml",
5-
"nextVersion": "v0.0.1"
5+
"nextVersion": "v0.1.0"
66
}
77
}

prow/functions.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ build_code() {
6666
fi
6767
}
6868

69+
make_release() {
70+
print_step "Release Build"
71+
make release
72+
73+
print_step "Copy manifests to artifacts"
74+
if [[ -d _build/release ]]; then
75+
gsutil cp -r _build/release ${ARTIFACTS}/manifests/release
76+
fi
77+
}
78+
6979
run_tests() {
7080
print_step "Running Tests"
7181
make test

prow/release_build.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ set -x
1818
check_pre_released
1919
build_code
2020

21-
create_images
22-
create_manifest ${REPO_NAME}
23-
create_release_manifest
21+
make_release
2422

2523
delete_images
2624
exit 0

0 commit comments

Comments
 (0)