diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 923024443..13e131006 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -815,6 +815,11 @@ blocks: jobs: - name: "\U0001F5BC️ Build test image" commands: + - git status + - echo $SEMAPHORE_GIT_PR_NUMBER + - git branch + - git rev-parse --abbrev-ref HEAD | sed 's/[^a-z]//g' | cut -c 1-40 + - git rev-parse - make build - make push - name: "Guard: \U0001F4CB Provision Prod Image" diff --git a/Makefile b/Makefile index 5e10019b4..44af29bd3 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,13 @@ TAG_NAME=$(shell git describe --exact-match --tags HEAD 2>/dev/null) # ifneq ($(TAG_NAME),) export BRANCH?=$(shell git branch --contains tags/$(TAG_NAME) | head -n 1 | sed '/HEAD/d' | sed 's/[^a-z]//g' | cut -c 1-40) +else ifneq ($(SEMAPHORE_GIT_PR_NUMBER),) + export BRANCH?=pr$(SEMAPHORE_GIT_PR_NUMBER) else export BRANCH?=$(shell git rev-parse --abbrev-ref HEAD | sed 's/[^a-z]//g' | cut -c 1-40) endif + export REGISTRY_HOST?=local export IMAGE?=$(APP_NAME)/$(BRANCH) export MAIN_IMAGE?=$(APP_NAME)/main diff --git a/guard/README.md b/guard/README.md index f45bde127..b3b2a51e2 100644 --- a/guard/README.md +++ b/guard/README.md @@ -1,5 +1,5 @@ # Guard - +test Service for handling user authentication, user lifecycle management, organizations and git aplication configuration. ### Development