From d8545a5500e2498140f55fb01f2e5e32429cc07f Mon Sep 17 00:00:00 2001 From: Nick Darrell Date: Wed, 4 Oct 2023 14:27:18 +0000 Subject: [PATCH] update build --- .docker-compose/Dockerfile | 16 +++++----------- Dockerfile | 1 + Jenkinsfile | 1 + 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.docker-compose/Dockerfile b/.docker-compose/Dockerfile index 224b14f..d92446f 100644 --- a/.docker-compose/Dockerfile +++ b/.docker-compose/Dockerfile @@ -1,25 +1,19 @@ FROM python:3.9.6 +ENV PIP_CONFIG_FILE pip.conf +ARG NEXUS_TOKEN + RUN apt-get update RUN apt-get -y install coinor-cbc -RUN python -m pip install pulp -RUN python -m pip install pydantic -RUN python -m pip install daemonize -RUN python -m pip install sqspy -RUN python -m pip install -U pytest -RUN python -m pip install pytest-cov -RUN python -m pip install pytest-stub -RUN python -m pip install pytest-mock -RUN python -m pip install girth --upgrade RUN mkdir /app WORKDIR /app -ENV LOCAL_DEV True - # Bundle app source COPY . /app +RUN python -m pip install -r requirements.txt + WORKDIR /app/app CMD [ "python", "main.py" ] diff --git a/Dockerfile b/Dockerfile index aa6f3f8..d92446f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM python:3.9.6 ENV PIP_CONFIG_FILE pip.conf +ARG NEXUS_TOKEN RUN apt-get update RUN apt-get -y install coinor-cbc diff --git a/Jenkinsfile b/Jenkinsfile index 75b2f2c..4eff7ca 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,6 +32,7 @@ pipeline { --insecure=true \ --insecure-registry=docker-registry.default:5000 \ --cache=true \ + --build-arg NEXUS_TOKEN=${NEXUS_TOKEN} \ --cache-repo=docker-registry.default:5000/${REPOSITORY} \ --destination ${env.REPOSITORY}:\$(echo ${BRANCH_NAME} | grep -Eo 'feature/([A-Za-z]+-[0-9]*)' | grep -Eo '[A-Za-z]+-[0-9]*' || \ echo ${BRANCH_NAME} | grep -Eo '(release|hotfix)/[[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+' | grep -Eo '[[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+' || \