From a0a99b34c2bacf77f6a28ba20c19d41a75d1f0be Mon Sep 17 00:00:00 2001 From: Jesus Federico Date: Fri, 21 Jun 2019 10:15:10 -0400 Subject: [PATCH] GRN2-159: Changed the inception of the version tag (#574) * GRN2-159: Changed the inception of the version tag * GRN2-159: Restored TRAVIS_BRANCH * Relocated ARG aNV for version in Dockerfile --- .travis.yml | 2 +- Dockerfile | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 90a007a8..e9abbed8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ jobs: - stage: build name: build docker image - script: bash scripts/image_build.sh $TRAVIS_REPO_SLUG + script: bash scripts/image_build.sh $TRAVIS_REPO_SLUG $TRAVIS_BRANCH if: env(CD_BUILD_IGNORE) IS NOT present AND type NOT IN (pull_request) AND env(CD_DOCKER_USERNAME) IS present AND env(CD_DOCKER_PASSWORD) IS present notifications: diff --git a/Dockerfile b/Dockerfile index bd23775d..33a873c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,13 +6,15 @@ RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs # Set an environment variable for the install location. ENV RAILS_ROOT /usr/src/app +# Sets the footer of greenlight application with current build version +ARG version_code +ENV VERSION_CODE=$version_code + # Make the directory and set as working. RUN mkdir -p $RAILS_ROOT WORKDIR $RAILS_ROOT -# Set environment variables. -ARG version_code -ENV VERSION_CODE=$version_code +# Set Rails environment. ENV RAILS_ENV production # Adding project files.