Skip to content

Commit

Permalink
Merge pull request #78 from vshn/fix/ci
Browse files Browse the repository at this point in the history
Fix various CI issues
  • Loading branch information
Kidswiss authored Jul 18, 2024
2 parents f7c7171 + 8a0b43f commit ec981d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/antora-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ docs_moduleroot_dir := docs/modules/ROOT

docker_opts ?= --rm --tty --user "$$(id -u)"

antora_build_version ?= 3.0.1
antora_cmd ?= $(DOCKER_CMD) run $(docker_opts) --volume "$${PWD}":/antora docker.io/vshn/antora:$(antora_build_version)
antora_build_version ?= 3.1.2.2
antora_cmd ?= $(DOCKER_CMD) run $(docker_opts) --volume "$${PWD}":/antora ghcr.io/vshn/antora:$(antora_build_version)
antora_opts ?= --cache-dir=.cache/antora

.PHONY: docs
Expand Down
11 changes: 5 additions & 6 deletions package/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
package_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))

crossplane_bin = $(go_bin)/kubectl-crossplane
up_bin = $(go_bin)/up

# Build kubectl-crossplane plugin
$(crossplane_bin):export GOBIN = $(go_bin)
Expand All @@ -20,20 +19,20 @@ package-provider-local: export CONTROLLER_IMG = $(CONTAINER_IMG)
package-provider-local: $(crossplane_bin) generate-go ## Build Crossplane package for local installation in kind-cluster
@rm -rf package/*.xpkg
@yq e '.spec.controller.image=strenv(CONTROLLER_IMG)' $(package_dir)/crossplane.yaml.template > $(package_dir)/crossplane.yaml
@$(crossplane_bin) build provider -f $(package_dir)
@$(crossplane_bin) xpkg build -f $(package_dir)
@echo Package file: $$(ls $(package_dir)/*.xpkg)

.PHONY: package-provider
package-provider: export CONTROLLER_IMG = $(CONTAINER_IMG)
package-provider: $(up_bin) generate-go build-docker ## Build Crossplane package for Upbound Marketplace
package-provider: generate-go build-docker ## Build Crossplane package for Upbound Marketplace
@rm -rf package/*.xpkg
@yq e 'del(.spec)' $(package_dir)/crossplane.yaml.template > $(package_dir)/crossplane.yaml
$(up_bin) xpkg build -f $(package_dir) -o $(package_dir)/provider-cloudscale.xpkg --controller=$(CONTROLLER_IMG)
$(crossplane_bin) xpkg build -f $(package_dir) -o $(package_dir)/provider-cloudscale.xpkg --controller=$(CONTROLLER_IMG)

.PHONY: .local-package-push
.local-package-push: pkg_file = $(shell ls $(package_dir)/*.xpkg)
.local-package-push: $(crossplane_bin) package-provider-local
$(crossplane_bin) push provider -f $(pkg_file) $(LOCAL_PACKAGE_IMG)
$(crossplane_bin) xpkg push -f $(pkg_file) $(LOCAL_PACKAGE_IMG)

.PHONY: .ghcr-package-push
.ghcr-package-push: pkg_file = $(package_dir)/provider-cloudscale.xpkg
Expand All @@ -51,4 +50,4 @@ package-push: .ghcr-package-push .upbound-package-push ## Push Crossplane packag

.PHONY: .package-clean
.package-clean:
rm -f $(crossplane_bin) $(up_bin) package/*.xpkg $(package_dir)/crossplane.yaml
rm -f $(crossplane_bin) package/*.xpkg $(package_dir)/crossplane.yaml

0 comments on commit ec981d8

Please sign in to comment.