Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
domdinicola committed Jul 22, 2022
1 parent 0f3cf22 commit c130de7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
export PATH=/home/circleci/.local/bin:$PATH
export PYTHONHASHSEED=${RANDOM}
pip install tox
# tox
tox
- save_cache:
key: source-{{ .Branch }}--{{ checksum "Pipfile.lock" }}-{{ checksum ".circleci/config.yml" }}
paths:
Expand All @@ -63,29 +63,29 @@ jobs:
if (echo "$DEPLOY_BRANCHES" | grep -q "$CIRCLE_BRANCH"); then
curl --user ${CIRCLE_TOKEN}: \
--data build_parameters[CIRCLE_JOB]=build_and_upload \
--data build_parameters[BASE_TAG]=$BASE_TAG \
--data revision=$CIRCLE_SHA1 \
https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/tree/$CIRCLE_BRANCH
else
echo "not triggered - '$CIRCLE_BRANCH' is not a deployable branch: '$DEPLOY_BRANCHES'"
fi
build_and_upload:
machine: true
steps:
- checkout
- run:
name: Building the image
command: |
docker login -u $DOCKER_USER -p $DOCKER_PASS
TAG=${CIRCLE_BRANCH}
docker pull unicef/donor-reporting-portal-backend:$BASE_TAG)
docker build --build-arg -t unicef/donor-reporting-portal-backend:$TAG .
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
docker pull unicef/donor-reporting-portal-backend:2.0-base
docker build -t unicef/donor-reporting-portal-backend:${CIRCLE_BRANCH} .
- run:
name: Pushing to Docker Hub
command: |
TAG=${CIRCLE_BRANCH}
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push unicef/donor-reporting-portal-backend:$TAG
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
docker push unicef/donor-reporting-portal-backend:${TAG}
workflows:
version: 2
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ ENV CPLUS_INCLUDE_PATH /usr/include/libxml2/
ENV C_INCLUDE_PATH /usr/include/libxml2/
ENV LD_PRELOAD=/lib/libssl.so.1.1


RUN apk add --no-cache --virtual .fetch-deps \
curl \
ca-certificates \
openssl \
tar
tar \
gcc

RUN apk add --no-cache --virtual .build-deps \
autoconf \
Expand Down Expand Up @@ -83,7 +83,7 @@ RUN cd /code \
&& pipenv install --verbose --system --deploy --ignore-pipfile $PIPENV_ARGS \
&& sha1sum Pipfile.lock > /CHECKSUM

RUN apk del .fetch-deps .build-deps .build-deps-edge .donor_reporting_portal-build-deps \
RUN apk del .build-deps .build-deps-edge .donor_reporting_portal-build-deps \
&& rm -rf /var/cache/apk/* \
&& rm -fr /root/.cache/ \
&& rm -fr /usr/include/
Expand Down

0 comments on commit c130de7

Please sign in to comment.