Skip to content

Commit

Permalink
[DEVP-1741] Fix bugs in semver build (#6)
Browse files Browse the repository at this point in the history
(cherry picked from commit b025e6c56b6b45a56d61159034f442625d11a6ba)
  • Loading branch information
gleaver authored and bh-anton-k committed Jun 2, 2021
1 parent 458f836 commit 5567210
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions babylon/Dockerfile.semver
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
ARG SEMVER_VERSION=broken-semver
FROM quay.io/babylonhealth/azure-terraform:${SEMVER_VERSION}
ARG SHA_VERSION

FROM quay.io/babylonhealth/azure-terraform:${SHA_VERSION}

ARG SEMVER_VERSION

RUN \
cd /root/.terraform.d/plugins/babylonhealth.com/babylonhealth/azuredevops/ \
&& mv $(find . -type d) ${SEMVER_VERSION}
&& mv $(ls) ${SEMVER_VERSION}
5 changes: 3 additions & 2 deletions babylon/build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -exo pipefail
CONTAINER_NAME=quay.io/babylonhealth/azure-terraform
BINARY_NAME=terraform-provider-azuredevops

SHA_VERSION=${CIRCLE_SHA1:-unknown}
SHA_VERSION=${CIRCLE_SHA1:-latest}
SEMVER_VERSION="$(git describe --abbrev=0 --tags || echo unknown)"

PROVIDER_NAME=azuredevops
Expand Down Expand Up @@ -39,7 +39,8 @@ run_install() {

run_tag_semver() {
docker pull "${CONTAINER_NAME}:${SHA_VERSION}"
docker build . -f babylon/Dockerfile.semver
docker build . -f babylon/Dockerfile.semver \
--build-arg SHA_VERSION="${SHA_VERSION}" \
--build-arg SEMVER_VERSION="${SEMVER_VERSION}" \
-t "${CONTAINER_NAME}:${SEMVER_VERSION}"

Expand Down

0 comments on commit 5567210

Please sign in to comment.