Skip to content
Snippets Groups Projects
Commit 31cc7e10 authored by Jeremy M Fee's avatar Jeremy M Fee
Browse files

Simplify build

parent b131e133
No related branches found
No related tags found
2 merge requests!146Release CMO metadata to production,!56Update how container builds (remove conda)
...@@ -78,6 +78,7 @@ variables: ...@@ -78,6 +78,7 @@ variables:
- pipenv run which python - pipenv run which python
image: ${DEVOPS_REGISTRY}usgs/obspy:latest image: ${DEVOPS_REGISTRY}usgs/obspy:latest
script: script:
# run checks
- pipenv run black --check . - pipenv run black --check .
- pipenv run pytest --cov-report xml:cov.xml --cov=geomagio - pipenv run pytest --cov-report xml:cov.xml --cov=geomagio
- pipenv run safety check - pipenv run safety check
......
...@@ -5,7 +5,7 @@ LABEL maintainer="Jeremy Fee <jmfee@usgs.gov>" ...@@ -5,7 +5,7 @@ LABEL maintainer="Jeremy Fee <jmfee@usgs.gov>"
ARG GIT_BRANCH_NAME=none ARG GIT_BRANCH_NAME=none
ARG GIT_COMMIT_SHA=none ARG GIT_COMMIT_SHA=none
ARG WEBSERVICE="true" ARG WEBSERVICE="false"
# set environment variables # set environment variables
ENV GIT_BRANCH_NAME=${GIT_BRANCH_NAME} \ ENV GIT_BRANCH_NAME=${GIT_BRANCH_NAME} \
...@@ -27,13 +27,7 @@ USER geomag_user ...@@ -27,13 +27,7 @@ USER geomag_user
# install dependencies via pipenv # install dependencies via pipenv
WORKDIR /data WORKDIR /data
COPY Pipfile /data/ COPY Pipfile /data/
RUN if [ "${WEBSERVICE}" = "true" ]; then \ RUN pipenv --site-packages install --dev --skip-lock
# only install production packages for webservice
pipenv --site-packages install --skip-lock; \
else \
# install everything
pipenv --site-packages install --dev --skip-lock; \
fi
# copy library (ignores set in .dockerignore) # copy library (ignores set in .dockerignore)
COPY . /geomag-algorithms COPY . /geomag-algorithms
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment