From 56f7f907df1512efb6c5f446a1c6e9bf017c4d72 Mon Sep 17 00:00:00 2001 From: William Peebles Date: Fri, 25 Nov 2022 15:12:34 -0500 Subject: [PATCH] modify drone to brand commits before docker build --- .drone.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 68035f6..0a701c3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,6 +9,10 @@ globals: password: from_secret: REGISTRY_PASSWORD steps: + - name: brand commit before build + image: bash + commands: + - echo ${DRONE_COMMIT_SHA:0:7} > app/__commit__ - name: build app-testing image: plugins/docker settings: @@ -35,6 +39,10 @@ globals: password: from_secret: REGISTRY_PASSWORD steps: + - name: brand commit before build + image: bash + commands: + - echo ${DRONE_COMMIT_SHA:0:7} > app/__commit__ - name: build-app-prod image: plugins/docker settings: @@ -43,7 +51,6 @@ steps: dockerfile: ./Dockerfile tags: ["${DRONE_COMMIT_SHA:0:7}", "latest-prod"] <<: *docker_creds - trigger: branch: - master