This commit is contained in:
@@ -52,6 +52,7 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
ALLOWED_HOSTS='django-testing.tryton.geeraert.eu'
|
ALLOWED_HOSTS='django-testing.tryton.geeraert.eu'
|
||||||
DEBUG='True'
|
DEBUG='True'
|
||||||
|
CACHE_BUST=${{ env.next_version }}
|
||||||
tags: |
|
tags: |
|
||||||
gitea.tryton.geeraert.eu/pi-ux-ce/django-testing:latest
|
gitea.tryton.geeraert.eu/pi-ux-ce/django-testing:latest
|
||||||
gitea.tryton.geeraert.eu/pi-ux-ce/django-testing:${{ env.next_version }}
|
gitea.tryton.geeraert.eu/pi-ux-ce/django-testing:${{ env.next_version }}
|
||||||
|
|||||||
@@ -15,9 +15,12 @@ RUN apt-get update && \
|
|||||||
apt-get install -y git nano && \
|
apt-get install -y git nano && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# CACHE_BUST forces this layer (and everything after it) to re-run on every
|
||||||
# Copy only the requirements file first (Changes infrequently)
|
# build, otherwise Docker reuses a cached clone from a previous build and the
|
||||||
COPY requirements.txt ./
|
# image silently keeps stale code.
|
||||||
|
ARG CACHE_BUST=1
|
||||||
|
RUN echo "cache bust: ${CACHE_BUST}" && \
|
||||||
|
git clone --depth 1 -b testing https://gitea.tryton.geeraert.eu/pi-ux-ce/Django_kube.git .
|
||||||
|
|
||||||
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade pip
|
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade pip
|
||||||
RUN pip list --cache-dir=/opt/hostedtoolcache/pip --outdated
|
RUN pip list --cache-dir=/opt/hostedtoolcache/pip --outdated
|
||||||
@@ -25,9 +28,6 @@ RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade wheel
|
|||||||
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade setuptools
|
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade setuptools
|
||||||
RUN pip install --cache-dir=/opt/hostedtoolcache/pip -r requirements.txt
|
RUN pip install --cache-dir=/opt/hostedtoolcache/pip -r requirements.txt
|
||||||
|
|
||||||
# Copy the rest of your application code (Changes frequently, invalidates subsequent cache)
|
|
||||||
COPY . ./
|
|
||||||
|
|
||||||
COPY infra/testing/entrypoint.sh /code/entrypoint.sh
|
COPY infra/testing/entrypoint.sh /code/entrypoint.sh
|
||||||
RUN chmod +x /code/entrypoint.sh
|
RUN chmod +x /code/entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
cd Django_kube
|
git pull origin testing
|
||||||
|
|
||||||
#another methid but needs to rm -rf before
|
|
||||||
#git clone --depth 1 -b main https://gitea.tryton.geeraert.eu/pi-ux-ce/Django_kube.git
|
|
||||||
git stash
|
|
||||||
git pull
|
|
||||||
|
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user