Added some debug messages in shell.go. Added docker push and tag to makefile

This commit is contained in:
Chris Stuurman 2024-03-29 17:11:34 +02:00
parent 0606dfa663
commit 9748b34f19
7 changed files with 13 additions and 9 deletions

View File

@ -3,7 +3,7 @@ OS ?= $(shell $(GO) env GOOS)
ARCH ?= $(shell $(GO) env GOARCH) ARCH ?= $(shell $(GO) env GOARCH)
IMAGE_NAME := "cert-manager-webhook-sthome" IMAGE_NAME := "cert-manager-webhook-sthome"
IMAGE_TAG := "0.0.3-alpha.1" IMAGE_TAG := "0.0.3-alpha.2"
OUT := $(shell pwd)/_out OUT := $(shell pwd)/_out
@ -35,6 +35,8 @@ clean:
build: dependencies build: dependencies
go run cmd/buildnumber.go go run cmd/buildnumber.go
docker build -t "$(IMAGE_NAME):$(IMAGE_TAG)" . docker build -t "$(IMAGE_NAME):$(IMAGE_TAG)" .
docker tag $(IMAGE_NAME) "docker.io/stuurmcp/$(IMAGE_NAME):$(IMAGE_TAG)"
docker image push "stuurmcp/$(IMAGE_NAME):$(IMAGE_TAG)"
.PHONY: rendered-manifest.yaml .PHONY: rendered-manifest.yaml
rendered-manifest.yaml: $(OUT)/rendered-manifest.yaml rendered-manifest.yaml: $(OUT)/rendered-manifest.yaml

View File

@ -9,7 +9,7 @@ import (
) )
var ( var (
version = "0.0.3-alpha.1" version = "0.0.3-alpha.2"
buildTime string buildTime string
) )

View File

@ -1,6 +1,6 @@
apiVersion: v1 apiVersion: v1
appVersion: "v0.0.3-alpha.1" appVersion: "v0.0.3-alpha.2"
description: Cert-Manager webhook for sthome description: Cert-Manager webhook for sthome
name: sthome-webhook name: sthome-webhook
version: 0.0.3-alpha.1 version: 0.0.3-alpha.2

View File

@ -31,7 +31,7 @@ clusterIssuer:
image: image:
repository: stuurmcp/cert-manager-webhook-sthome repository: stuurmcp/cert-manager-webhook-sthome
#repository: wstat.sthome.net:5000/cert-manager-webhook-sthome #repository: wstat.sthome.net:5000/cert-manager-webhook-sthome
tag: 0.0.3-alpha.1 tag: 0.0.3-alpha.2
#pullPolicy should be IfNotPresent. Set to Always for testing purposes #pullPolicy should be IfNotPresent. Set to Always for testing purposes
pullPolicy: IfNotPresent pullPolicy: IfNotPresent

View File

@ -24,11 +24,13 @@ func Execute(script string, command []string) (bool, error) {
err = cmd.Start() err = cmd.Start()
if err != nil { if err != nil {
klog.Errorf("CZ: Script Start return error: %s\n", err)
return false, err return false, err
} }
err = cmd.Wait() err = cmd.Wait()
if err != nil { if err != nil {
klog.Errorf("CZ: Script Wait return error: %s\n", err)
return false, err return false, err
} }

View File

@ -7,7 +7,7 @@ import (
// These are set during build time via -ldflags // These are set during build time via -ldflags
var ( var (
version = "0.0.3+dev" version = "0.0.3-alpha.2"
gitCommit string gitCommit string
buildDate string buildDate string
) )

View File

@ -1,3 +1,3 @@
0.0.3+dev 0.0.3-alpha.2
20240328-2332 20240329-1707
19 27