diff --git a/Makefile b/Makefile index eb7ca06a..c82fe03c 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,12 @@ GIT_REMOTE_URL := $(shell echo "$(GIT_REMOTE_URL)" | sed 's/\.git//') GIT_REMOTE_URL := $(shell echo "$(GIT_REMOTE_URL)" | sed 's/git@/https:\/\//') GIT_REMOTE_URL := $(shell echo "$(GIT_REMOTE_URL)" | sed 's/com:/com\//') PR_OR_COMMIT_URL ?= "$(GIT_REMOTE_URL)/commits/$(shell git rev-parse --short=8 HEAD)" - +ifndef GIT_TOKEN +ifeq ($(wildcard .git_token),) +$(error No Git token found. Please provide it either via the GIT_TOKEN variable or the .git_token file) +endif +GIT_TOKEN ?= $(shell cat .git_token) +endif LINUX_IMAGE ?= quay.io/orchestrator/ubi9-pipeline:latest JDK_IMAGE ?= registry.access.redhat.com/ubi9/openjdk-17:1.17 diff --git a/scripts/push_manifests.sh b/scripts/push_manifests.sh index aeb53ac6..239dac98 100755 --- a/scripts/push_manifests.sh +++ b/scripts/push_manifests.sh @@ -20,7 +20,7 @@ git switch -c autopr-${RANDOM} origin/"${DEPLOYMENT_BRANCH}" # We assume the kustomize project already exists, this is not part of the PR cp ../"${WORKFLOW_ID}"/manifests/* kustomize/"${WORKFLOW_ID}"/base # Applying image kustomization -cd kustomize/"${WORKFLOW_ID}"/overlays/prod || exit +cd kustomize/"${WORKFLOW_ID}"/base || exit if [ -n "$APPLICATION_ID" ] && [ "$APPLICATION_ID" != "UNDEFINED" ]; then kustomize edit set image serverless-workflow-"${APPLICATION_ID}"="${IMAGE_NAME}":"${IMAGE_TAG}" else