From 8cc74d9cf4671d109ae88bd1c5832e2621dd5775 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Wed, 8 Jan 2020 15:53:08 +0100 Subject: [PATCH] inject offen account id at build time --- .circleci/config.yml | 1 + Makefile | 2 +- build/Dockerfile | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a64c594..beda556 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,6 +25,7 @@ jobs: export BUCKET="offen-dev-staging" export DISTRIBUTION="E13I20LK8ASYFH" export ROBOTS_FILE="robots.txt.staging" + export OFFEN_ACCOUNT_ID="8f7ee44a-4cd8-47f2-a77e-8c7c98d46b89" fi make build aws s3 sync --delete ./output/. s3://$BUCKET diff --git a/Makefile b/Makefile index ff62038..d1512c5 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ ROBOTS_FILE ?= robots.txt.staging SITEURL ?= http://localhost:8000 build: - @docker build --build-arg siteurl=${SITEURL} -t offen/website -f build/Dockerfile . + @docker build --build-arg siteurl=${SITEURL} --build-arg offen-account-id=${OFFEN_ACCOUNT_ID} -t offen/website -f build/Dockerfile . @rm -rf output && mkdir output @docker create --entrypoint=bash -it --name assets offen/website @docker cp assets:/code/homepage/output/. ./output/ diff --git a/build/Dockerfile b/build/Dockerfile index 518c59e..5bd3952 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -5,6 +5,8 @@ ENV NODE_PATH="/usr/lib/node_modules" ARG siteurl ENV SITEURL=$siteurl +ARG offen-account-id +ENV OFFEN_ACCOUNT_ID=$offen-account-id RUN npm install -g postcss-cli@^6.1.3 autoprefixer@^9.7.0 svgo@^1.3.0 RUN apt-get update \