Skip to content

Commit

Permalink
fix bundle target in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
tinyzimmer committed Jun 21, 2021
1 parent 61b8643 commit f737c6b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/controller-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ jobs:
run: echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
if: ${{ github.event_name != 'pull_request' }}

# - name: Patch buildx multiarch image
# run: |
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# docker buildx create --name multiarch --driver docker-container --use
# docker buildx inspect --bootstrap

# Build and push the image
- name: Build and Push Controller Image
uses: docker/build-push-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: version

- name: Build CLI Release
run: make dist-konfig
run: make LDFLAGS="-s -w -X github.com/pelotech/jsonnet-controller/pkg/cmd.Version=${{ steps.version.outputs.tag }}" dist-konfig

- name: Generate Release Manifests
run: |
Expand Down
31 changes: 17 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,6 @@ docker-build: test ## Build docker image with the manager.
docker-push: ## Push docker image with the manager.
docker push ${IMG}

REFDOCS = $(CURDIR)/bin/refdocs
$(REFDOCS):
cd hack/gen-crd-reference-docs && go build -o $(REFDOCS) .

api-docs: $(REFDOCS) ## Generate API documentation
go mod vendor
bash hack/update-api-docs.sh

BUNDLE_OUTPUT ?= pkg/cmd/manifest.yaml
bundle: ## Generate the bundle manifest
$(KUBECFG) show --tla-str version=$(VERSION) \
config/jsonnet/jsonnet-controller.jsonnet > $(BUNDLE_OUTPUT)

##@ Deployment

install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
Expand Down Expand Up @@ -150,6 +137,7 @@ $(FLUX):

KUBECFG ?= bin/kubecfg
KUBECFG_VERSION ?= v0.20.0

$(KUBECFG):
mkdir -p "$(BIN_DIR)"
curl -JL -o "$(KUBECFG)" https://github.com/bitnami/kubecfg/releases/download/$(KUBECFG_VERSION)/kubecfg-$(shell uname | tr A-Z a-z)-amd64
Expand Down Expand Up @@ -214,4 +202,19 @@ dist-konfig: $(GOX) ## Build release artifacts for the CLI
mkdir -p dist
cd cmd/konfig && \
CGO_ENABLED=0 $(GOX) -osarch=$(COMPILE_TARGETS) -output=$(COMPILE_OUTPUT) -ldflags="$(LDFLAGS)"
upx -9 $(DIST)/*
upx -9 $(DIST)/*

##@ Documentation and Bundles

REFDOCS = $(CURDIR)/bin/refdocs
$(REFDOCS):
cd hack/gen-crd-reference-docs && go build -o $(REFDOCS) .

api-docs: $(REFDOCS) ## Generate API documentation
go mod vendor
bash hack/update-api-docs.sh

BUNDLE_OUTPUT ?= pkg/cmd/manifest.yaml
bundle: $(KUBECFG) ## Generate the bundle manifest
$(KUBECFG) show --tla-str version=$(VERSION) \
config/jsonnet/jsonnet-controller.jsonnet > $(BUNDLE_OUTPUT)

0 comments on commit f737c6b

Please sign in to comment.