I can’t figure out how to pass circle environment variables to my Makefile using a machine executor.
PROJECT_NAME ?= studyclever
PROJECT ?= wundertax/$(PROJECT_NAME)
BUILD_TAG ?= build-local
DOCKER_USER ?= bogus
DOCKER_PASS ?= pogus
SERVER_IMAGE_TAG = $(PROJECT):$(BUILD_TAG)
TEST_IMAGE_TAG = $(SERVER_IMAGE_TAG)-tests
ASSETS_IMAGE_TAG = $(PROJECT)-assets:$(BUILD_TAG)
export TEST_IMAGE_TAG
export SERVER_IMAGE_TAG
export ASSET_IMAGE_TAG
build-server:
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
docker build \
--tag $(SERVER_IMAGE_TAG) \
--build-arg RAILS_ENV=${RAILS_ENV} \
--build-arg BUNDLE_WITHOUT="test development" \
--build-arg FOLDERS_TO_REMOVE="spec node_modules app/assets vendor/assets lib/assets tmp/cache vendor/yarn" \
--target Final \
--file Dockerfile \
.
The environment variable for BUILD_TAG, DOCKER_USER and DOCKER_PASS should be provided by circle. Do I need to set some specific shell or source some specific file inside make to make this work?