Skip to content

Commit

Permalink
Merge pull request #295 from AbsaOSS/bump-k3d-action-to-v1.2.0
Browse files Browse the repository at this point in the history
bump k3d-action to v 1.2.0
  • Loading branch information
kuritka authored Feb 16, 2021
2 parents 7c9e662 + 390ef88 commit 43cb476
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
destination-repo: absaoss/k8gb
destination-branch: gh-pages
- name: Create single node k3s cluster
uses: AbsaOSS/k3d-action@v1.1.0
uses: AbsaOSS/k3d-action@v1.2.0
with:
cluster-name: "test-gslb1"
use-default-registry: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/terratest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v1

- name: Create 1st k3s Cluster
uses: AbsaOSS/k3d-action@v1.1.0
uses: AbsaOSS/k3d-action@v1.2.0
with:
cluster-name: "test-gslb1"
use-default-registry: true
Expand All @@ -29,7 +29,7 @@ jobs:
--k3s-server-arg "--no-deploy=traefik,servicelb,metrics-server"
- name: Create 2nd k3s Cluster
uses: AbsaOSS/k3d-action@v1.1.0
uses: AbsaOSS/k3d-action@v1.2.0
with:
cluster-name: "test-gslb2"
use-default-registry: true
Expand Down
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ PWD ?= $(shell pwd)

VERSION ?= $(shell helm show chart chart/k8gb/|awk '/appVersion:/ {print $$2}')

COMMIT_HASH ?= $(shell git rev-parse --short HEAD)

SEMVER ?= $(VERSION)-$(COMMIT_HASH)
# image URL to use all building/pushing image targets
IMG ?= $(REPO):$(VERSION)

Expand All @@ -55,7 +58,6 @@ CONTROLLER_GEN_PATH ?= $(shell which controller-gen || echo $(NO_VALUE))

KUSTOMIZE_PATH ?= $(shell which kustomize || echo $(NO_VALUE))

COMMIT_HASH ?= $(shell git rev-parse --short HEAD)

###############################
# TARGETS
Expand Down Expand Up @@ -109,12 +111,11 @@ deploy-full-local-setup: ## Deploy full local multicluster setup
.PHONY: deploy-to-AbsaOSS-k3d-action
deploy-to-AbsaOSS-k3d-action:
@echo "\n$(YELLOW)build k8gb docker and push to registry $(NC)"
docker build . -t k8gb:$(COMMIT_HASH)
docker tag k8gb:$(COMMIT_HASH) $(GITACTION_IMAGE_REPO):$(COMMIT_HASH)
docker push $(GITACTION_IMAGE_REPO):$(COMMIT_HASH)
docker build . -t $(GITACTION_IMAGE_REPO):$(SEMVER)
docker push $(GITACTION_IMAGE_REPO):$(SEMVER)

@echo "\n$(YELLOW)Change version in Chart.yaml $(CYAN) $(VERSION) to $(COMMIT_HASH)$(NC)"
sed -i "s/$(VERSION)/$(COMMIT_HASH)/g" chart/k8gb/Chart.yaml
@echo "\n$(YELLOW)Change version in Chart.yaml $(CYAN) $(VERSION) to $(SEMVER)$(NC)"
sed -i "s/$(VERSION)/$(SEMVER)/g" chart/k8gb/Chart.yaml

$(call deploy-local-cluster,$(CLUSTER_GSLB1),$(CLUSTER_GSLB2),$(GITACTION_IMAGE_REPO),)
$(call deploy-local-cluster,$(CLUSTER_GSLB2),$(CLUSTER_GSLB1),$(GITACTION_IMAGE_REPO),$(CLUSTER_GSLB2_HELM_ARGS))
Expand Down

0 comments on commit 43cb476

Please sign in to comment.