diff --git a/.circleci/config.yml b/.circleci/config.yml index 6578305..876821f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,8 +29,16 @@ builddeploy_steps: &builddeploy_steps - run: *install_dependency - run: *install_deploysuite - restore_cache: *restore_cache_settings_for_build - - run: ./build.sh ${APPNAME} - - save_cache: *save_cache_settings + - run: + command: | + ./awsconfiguration.sh $DEPLOY_ENV + source awsenvconf + ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar + - run: + command: | + source buildenvvar + ./build.sh ${APPNAME} + #- save_cache: *save_cache_settings - deploy: name: Running MasterScript. command: | diff --git a/build.sh b/build.sh index 0537fcc..2c0184f 100755 --- a/build.sh +++ b/build.sh @@ -3,7 +3,9 @@ set -eo pipefail APP_NAME=$1 UPDATE_CACHE="" -docker build -f docker/Dockerfile -t $APP_NAME:latest . +docker build -f docker/Dockerfile -t $APP_NAME:latest \ +--build-arg APPMODE=$APPMODE \ +--build-arg APPENV=$APPENV . docker create --name app $APP_NAME:latest diff --git a/docker/Dockerfile b/docker/Dockerfile index 2af5aec..1fd0a09 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,12 @@ # Use the base image with Node.js FROM node:latest +ARG APPMODE +ARG APPENV + +ENV APPMODE=$APPMODE +ENV APPENV=$APPENV + # Copy the current directory into the Docker image COPY . /micro-frontends-earn-app