diff --git a/.drone.yml b/.drone.yml index 7332d15..20afa5b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,7 +17,11 @@ name: build steps: - name: publish image: plugins/kaniko + environment: + VERSION: 1.22.0 settings: + build_args: + - VERSION=${VERSION} repo: docker.io/jcollie/healthchecks repository: docker.io username: @@ -27,3 +31,4 @@ steps: tags: - latest - latest-${DRONE_BUILD_NUMBER} + - ${VERSION}-${DRONE_BUILD_NUMBER} diff --git a/Dockerfile b/Dockerfile index 08048a1..94e8148 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,13 @@ FROM python:3.9 +ARG VERSION + ENV PYTHONUNBUFFERED=1 + WORKDIR /opt/healthchecks RUN useradd --system hc && \ - git clone --depth 1 --branch v1.19.0 https://github.com/healthchecks/healthchecks.git /opt/healthchecks && \ + git clone --depth 1 --branch v${VERSION} https://github.com/healthchecks/healthchecks.git /opt/healthchecks && \ pip install --no-cache-dir -r /opt/healthchecks/requirements.txt && \ pip install --no-cache-dir uwsgi && \ rm -f /opt/healthchecks/hc/local_settings.py && \