This commit is contained in:
parent
0cf8992e8a
commit
cf412f7f53
2 changed files with 38 additions and 2 deletions
27
.drone.yml
Normal file
27
.drone.yml
Normal file
|
|
@ -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/*
|
||||||
13
Dockerfile
13
Dockerfile
|
|
@ -1,11 +1,11 @@
|
||||||
FROM python:3.10-alpine
|
FROM python:3.10-alpine
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
curl \
|
curl \
|
||||||
gcc \
|
gcc \
|
||||||
libressl-dev \
|
libressl-dev \
|
||||||
musl-dev \
|
musl-dev \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
|
tzdata \
|
||||||
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal \
|
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal \
|
||||||
&& source $HOME/.cargo/env \
|
&& source $HOME/.cargo/env \
|
||||||
&& curl -sSL https://install.python-poetry.org | python3 - --preview \
|
&& curl -sSL https://install.python-poetry.org | python3 - --preview \
|
||||||
|
|
@ -16,4 +16,13 @@ RUN apk add --no-cache \
|
||||||
gcc \
|
gcc \
|
||||||
libressl-dev \
|
libressl-dev \
|
||||||
musl-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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue