Skip to content

Commit

Permalink
Polish release make targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Kovacs committed Apr 23, 2024
1 parent 9ca7c9d commit 89f5091
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 181 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.idea
.vscode
bin/*
kind-logs-*
cover.out*
Expand Down
2 changes: 1 addition & 1 deletion .husky/hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if git status --short | grep -qv "??"; then
trap unstash EXIT
fi

make generate manifests
make generate
git diff --exit-code --quiet || (git status && exit 1)

make lint gosec nilcheck test
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ TAG ?= dev
ENVTEST_K8S_VERSION := 1.28.0
VERSION ?= $(shell git describe --always --tag --dirty=-dev)
GIT_REF ?= $(shell git rev-parse --short HEAD)
GIT_TAG ?= $(shell git describe --tags --abbrev=0)
BUILD_ARGS := --build-arg VERSION=$(VERSION)
SHELL = /usr/bin/env bash -o pipefail
.SHELLFLAGS = -ec
Expand Down Expand Up @@ -212,7 +213,7 @@ tilt-cluster: ctlptl tilt kind clusterctl

##@ Release:

RELEASE_DIR ?= infrastructure-linode
RELEASE_DIR ?= infrastructure-linode/$(GIT_TAG)

.PHONY: release
release: kustomize clean-release set-manifest-image release-manifests generate-flavors release-templates release-metadata clean-release-git
Expand All @@ -231,15 +232,15 @@ release-templates: $(RELEASE_DIR)

.PHONY: set-manifest-image
set-manifest-image: ## Update kustomize image patch file for default resource.
sed -i'' -e 's@image: .*@image: '"$(REGISTRY)/$(IMAGE_NAME):$(VERSION)"'@' ./config/default/manager_image_patch.yaml
sed -i'' -e 's@image: .*@image: '"$(REGISTRY)/$(IMAGE_NAME):$(GIT_TAG)"'@' ./config/default/manager_image_patch.yaml

.PHONY: release-manifests
release-manifests: $(KUSTOMIZE) $(RELEASE_DIR)
$(KUSTOMIZE) build config/default > $(RELEASE_DIR)/infrastructure-components.yaml

.PHONY: local-release
local-release:
RELEASE_DIR=infrastructure-linode/v0.0.0 $(MAKE) release
RELEASE_DIR=infrastructure-linode/v0.0.0 GIT_TAG=latest $(MAKE) release
$(MAKE) clean-release-git

## --------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_image_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ spec:
template:
spec:
containers:
- image: docker.io/linode/cluster-api-provider-linode:main
- image: docker.io/linode/cluster-api-provider-linode:v0.1.0
name: manager
176 changes: 0 additions & 176 deletions devbox.lock
Original file line number Diff line number Diff line change
Expand Up @@ -108,43 +108,15 @@
"version": "1.57.1",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/rbkz66qnxvnla1rms6bd6zky1bi62jwc-golangci-lint-1.57.1",
"default": true
}
],
"store_path": "/nix/store/rbkz66qnxvnla1rms6bd6zky1bi62jwc-golangci-lint-1.57.1"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/r5xyf90x7c91j3r34sg6k9wbf4dm1v4q-golangci-lint-1.57.1",
"default": true
}
],
"store_path": "/nix/store/r5xyf90x7c91j3r34sg6k9wbf4dm1v4q-golangci-lint-1.57.1"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/8yd7j7jcg0sihbrbxnz7drqd6lwlcz6r-golangci-lint-1.57.1",
"default": true
}
],
"store_path": "/nix/store/8yd7j7jcg0sihbrbxnz7drqd6lwlcz6r-golangci-lint-1.57.1"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/7vvwm8q3zx6xiln6rmdh21mqjccbrd9x-golangci-lint-1.57.1",
"default": true
}
],
"store_path": "/nix/store/7vvwm8q3zx6xiln6rmdh21mqjccbrd9x-golangci-lint-1.57.1"
}
}
Expand Down Expand Up @@ -216,79 +188,15 @@
"version": "1.29.3",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/la4hrwhgy434f3y3qrapffjsc330gi9g-kubectl-1.29.3",
"default": true
},
{
"name": "man",
"path": "/nix/store/z27px1zgfy0iyca6iiv4x7jmqw1mqmqs-kubectl-1.29.3-man",
"default": true
},
{
"name": "convert",
"path": "/nix/store/ns4wcsjkzzidiimxiv5si5mhqhxksqp7-kubectl-1.29.3-convert"
}
],
"store_path": "/nix/store/la4hrwhgy434f3y3qrapffjsc330gi9g-kubectl-1.29.3"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/j138rcn5m64qd4qvnnrnk0qbkc67w95b-kubectl-1.29.3",
"default": true
},
{
"name": "man",
"path": "/nix/store/rbcalzmyvkhgwf2zxjw6j0al1vciccrh-kubectl-1.29.3-man",
"default": true
},
{
"name": "convert",
"path": "/nix/store/acbp07cn2wy7xrsir402bqx71hrvb9w9-kubectl-1.29.3-convert"
}
],
"store_path": "/nix/store/j138rcn5m64qd4qvnnrnk0qbkc67w95b-kubectl-1.29.3"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/jclvx3km8dr03cikgm4n1rx5ai5zvy5n-kubectl-1.29.3",
"default": true
},
{
"name": "man",
"path": "/nix/store/w0x2wbvimf9s46i9hqbh61dz0kf5a1cg-kubectl-1.29.3-man",
"default": true
},
{
"name": "convert",
"path": "/nix/store/190m16nhp9jm4rkpy15i6d9khf3ibdb9-kubectl-1.29.3-convert"
}
],
"store_path": "/nix/store/jclvx3km8dr03cikgm4n1rx5ai5zvy5n-kubectl-1.29.3"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/q01ksybv8bynfk2rwjiqpbqxasjnj3rw-kubectl-1.29.3",
"default": true
},
{
"name": "man",
"path": "/nix/store/hfv8hjg3ymrr3fv1z4ffm6kbxc7r53bl-kubectl-1.29.3-man",
"default": true
},
{
"name": "convert",
"path": "/nix/store/jwwf2lqbrm099fs5v153y9cjvba13kb0-kubectl-1.29.3-convert"
}
],
"store_path": "/nix/store/q01ksybv8bynfk2rwjiqpbqxasjnj3rw-kubectl-1.29.3"
}
}
Expand All @@ -300,43 +208,15 @@
"version": "0.14.0",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/jblk86f5bi2dwg2w8g42xl9mpw1yrbi4-controller-tools-0.14.0",
"default": true
}
],
"store_path": "/nix/store/jblk86f5bi2dwg2w8g42xl9mpw1yrbi4-controller-tools-0.14.0"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/sq48wn8yyqkya8as690h61d1dlxwlkbi-controller-tools-0.14.0",
"default": true
}
],
"store_path": "/nix/store/sq48wn8yyqkya8as690h61d1dlxwlkbi-controller-tools-0.14.0"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/nm2vx0f6ajmqpbi2c6z8wani5f1fdqb4-controller-tools-0.14.0",
"default": true
}
],
"store_path": "/nix/store/nm2vx0f6ajmqpbi2c6z8wani5f1fdqb4-controller-tools-0.14.0"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/f8h9pj08ksm49v980yb0slzrbpqqc98r-controller-tools-0.14.0",
"default": true
}
],
"store_path": "/nix/store/f8h9pj08ksm49v980yb0slzrbpqqc98r-controller-tools-0.14.0"
}
}
Expand All @@ -348,43 +228,15 @@
"version": "3.14.3",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/nbz58p0ak92q3hqp39mfrvhj33svh3k4-kubernetes-helm-3.14.3",
"default": true
}
],
"store_path": "/nix/store/nbz58p0ak92q3hqp39mfrvhj33svh3k4-kubernetes-helm-3.14.3"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/1f9184lbcv55mj1sqrrf022r8ln49kpz-kubernetes-helm-3.14.3",
"default": true
}
],
"store_path": "/nix/store/1f9184lbcv55mj1sqrrf022r8ln49kpz-kubernetes-helm-3.14.3"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/f2v22pzmbfypqlrniragqbkxmrkk3j4h-kubernetes-helm-3.14.3",
"default": true
}
],
"store_path": "/nix/store/f2v22pzmbfypqlrniragqbkxmrkk3j4h-kubernetes-helm-3.14.3"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/0vf3gsyjrkxrkwygi3igidd4hzab8iq9-kubernetes-helm-3.14.3",
"default": true
}
],
"store_path": "/nix/store/0vf3gsyjrkxrkwygi3igidd4hzab8iq9-kubernetes-helm-3.14.3"
}
}
Expand Down Expand Up @@ -436,43 +288,15 @@
"version": "0.1.9",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/fnm4za9fnq10q8l535bhg0gfx2ixws7m-kyverno-chainsaw-0.1.9",
"default": true
}
],
"store_path": "/nix/store/fnm4za9fnq10q8l535bhg0gfx2ixws7m-kyverno-chainsaw-0.1.9"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/qy0dpkapp6yw92kxhkixmz7crwgmm23p-kyverno-chainsaw-0.1.9",
"default": true
}
],
"store_path": "/nix/store/qy0dpkapp6yw92kxhkixmz7crwgmm23p-kyverno-chainsaw-0.1.9"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/660ps3ll008jfmvb5zx8lnq785wlqi4q-kyverno-chainsaw-0.1.9",
"default": true
}
],
"store_path": "/nix/store/660ps3ll008jfmvb5zx8lnq785wlqi4q-kyverno-chainsaw-0.1.9"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/ar8sgxvjvdsb0vy6l00ld2sm6r1yyzrx-kyverno-chainsaw-0.1.9",
"default": true
}
],
"store_path": "/nix/store/ar8sgxvjvdsb0vy6l00ld2sm6r1yyzrx-kyverno-chainsaw-0.1.9"
}
}
Expand Down

0 comments on commit 89f5091

Please sign in to comment.