From cf412f7f531bf94a76e4cab6f66559fee3735a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Wed, 10 Aug 2022 19:07:31 +0200 Subject: [PATCH] ci: debug --- .drone.yml | 27 +++++++++++++++++++++++++++ Dockerfile | 13 +++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..318666e --- /dev/null +++ b/.drone.yml @@ -0,0 +1,27 @@ +--- +kind: pipeline +type: docker +name: default + +steps: +- name: build_base + environment: + REGISTRY_HOST: https://git.roboces.dev + DESTINATION_PREFIX: git.roboces.dev/catalin/halig + REGISTRY_USERNAME: + from_secret: REGISTRY_USERNAME + REGISTRY_PASSWORD: + from_secret: REGISTRY_PASSWORD + commands: + - set -euo pipefail + - mkdir -p /kaniko/.docker + - echo "{\"auths\":{\"$REGISTRY_HOST\":{\"username\":\"$REGISTRY_USERNAME\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json + - export DESTINATION="$${DESTINATION}:$${$DRONE_TAG:-DRONE_COMMIT_BRANCH}" + - "pushing to $DESTINATION" + when: + branch: + - main + ref: + - refs/heads/main + - refs/heads/ci + - refs/tags/* diff --git a/Dockerfile b/Dockerfile index 2bdfe89..cf72564 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ FROM python:3.10-alpine - RUN apk add --no-cache \ curl \ gcc \ libressl-dev \ musl-dev \ libffi-dev \ + tzdata \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal \ && source $HOME/.cargo/env \ && curl -sSL https://install.python-poetry.org | python3 - --preview \ @@ -16,4 +16,13 @@ RUN apk add --no-cache \ gcc \ libressl-dev \ musl-dev \ - libffi-dev + libffi-dev \ + && mkdir /app + +ENV TZ Europe/Madrid + +COPY poetry.lock /app +COPY pyproject.toml /app +WORKDIR /app +RUN poetry config virtualenvs.create false \ + && poetry install