diff --git a/e2e/Makefile b/e2e/Makefile index 7b0ab95..3d26a30 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -96,20 +96,20 @@ update-tools-version: login-gh NEW_VERSION=$$(echo $(latest_gh) | cut -b 2-); \ sed -i -e "s/YQ_VERSION := .*/YQ_VERSION := $${NEW_VERSION}/g" Makefile.versions - $(call get-latest-tag,pushgateway) + $(call get-latest-gh-package-tag,pushgateway) NEW_VERSION=$$(echo $(latest_tag)); \ sed -i -e "s/PUSHGATEWAY_IMAGE_VERSION := .*/PUSHGATEWAY_IMAGE_VERSION := $${NEW_VERSION}/g" Makefile.versions -# usage: get-latest-tag NAME -define get-latest-tag -$(eval latest_tag := $(shell wget -O - https://quay.io/api/v1/repository/cybozu/$1/tag/ | jq -r '.tags[] | .name' | awk '/.*\..*\./ {print $$1; exit}')) -endef - # usage get-latest-gh OWNER/REPO define get-latest-gh $(eval latest_gh := $(shell $(GH) release list --repo $1 | grep Latest | cut -f3)) endef +# usage: get-latest-gh-package-tag NAME +define get-latest-gh-package-tag +$(eval latest_tag := $(shell curl -sSf -H "Authorization: Bearer $(shell curl -sSf "https://ghcr.io/token?scope=repository%3Acybozu%2F$1%3Apull&service=ghcr.io" | jq -r .token)" https://ghcr.io/v2/cybozu/$1/tags/list | jq -r '.tags[]' | sort -Vr | head -n 1)) +endef + .PHONY: gh gh: $(GH) $(GH): $(BIN_DIR) diff --git a/e2e/Makefile.versions b/e2e/Makefile.versions index 5173e9c..283904b 100644 --- a/e2e/Makefile.versions +++ b/e2e/Makefile.versions @@ -1,7 +1,7 @@ E2ETEST_K8S_VERSION := 1.26.3 KIND_VERSION := 0.20.0 KUSTOMIZE_VERSION := 5.1.0 -PUSHGATEWAY_IMAGE_VERSION := 1.5.1.1 +PUSHGATEWAY_IMAGE_VERSION := 1.6.0.3 GH_VERSION := 2.30.0 ACTIONS_CACHE_VERSION := 3 ACTIONS_CHECKOUT_VERSION := 3 diff --git a/e2e/manifests/pushgateway/deployment.yaml b/e2e/manifests/pushgateway/deployment.yaml index 1cbbb5c..ed5cab9 100644 --- a/e2e/manifests/pushgateway/deployment.yaml +++ b/e2e/manifests/pushgateway/deployment.yaml @@ -19,7 +19,7 @@ spec: spec: containers: - name: pushgateway - image: quay.io/cybozu/pushgateway:1.5.1.1 + image: ghcr.io/cybozu/pushgateway:1.6.0.3 ports: - containerPort: 9091 livenessProbe: @@ -33,4 +33,4 @@ spec: path: /-/ready port: 9091 initialDelaySeconds: 10 - timeoutSeconds: 10 \ No newline at end of file + timeoutSeconds: 10 diff --git a/e2e/manifests/pushgateway/kustomization.yaml b/e2e/manifests/pushgateway/kustomization.yaml index 3139ed7..0e77ab7 100644 --- a/e2e/manifests/pushgateway/kustomization.yaml +++ b/e2e/manifests/pushgateway/kustomization.yaml @@ -3,5 +3,5 @@ resources: - deployment.yaml - service.yaml images: - - name: quay.io/cybozu/pushgateway - newTag: 1.5.1.1 \ No newline at end of file + - name: ghcr.io/cybozu/pushgateway + newTag: 1.6.0.3