ci: debug
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
cătălin 2022-08-10 20:01:57 +02:00
commit 31fbab0731
Signed by: catalin
GPG key ID: 0178DF42F43E5FD2
2 changed files with 22 additions and 6 deletions

View file

@ -1,19 +1,20 @@
---
kind: pipeline
type: docker
name: default
name: build
trigger:
ref:
- refs/heads/**
- refs/tags/v*
environment:
REGISTRY_HOST: https://git.roboces.dev
DESTINATION_PREFIX: git.roboces.dev/catalin/halig
steps:
- name: build_base
image: gcr.io/kaniko-project/executor:debug
environment:
REGISTRY_HOST: https://git.roboces.dev
DESTINATION_PREFIX: git.roboces.dev/catalin/halig
REGISTRY_USERNAME:
from_secret: REGISTRY_USERNAME
REGISTRY_PASSWORD:
@ -22,7 +23,6 @@ steps:
- set -euo pipefail
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$REGISTRY_HOST\":{\"username\":\"$REGISTRY_USERNAME\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- export DESTINATION="$${DESTINATION_PREFIX}:$${DRONE_TAG:-$DRONE_COMMIT_BRANCH}"
- echo "pushing to $DESTINATION"
- >
/kaniko/executor \
@ -30,9 +30,21 @@ steps:
--target base \
--context /drone/src \
--dockerfile Dockerfile \
--destination "$DESTINATION"
--destination "$${DESTINATION_PREFIX}:base-$${DRONE_TAG:-$DRONE_COMMIT_BRANCH}"
- /kaniko/executor \
--cache=true \
--target linters \
--context /drone/src \
--dockerfile Dockerfile \
--destination "$${DESTINATION_PREFIX}:linters-$${DRONE_TAG:-$DRONE_COMMIT_BRANCH}"
when:
ref:
- refs/heads/main
- refs/heads/ci
- refs/tags/v*
- name: lint
image: "$${DESTINATION_PREFIX}:linters-$${DRONE_TAG:-$DRONE_COMMIT_BRANCH}"
commands:
- pre-commit run --all-files --color always

View file

@ -24,5 +24,9 @@ ENV TZ Europe/Madrid
COPY poetry.lock /app
COPY pyproject.toml /app
WORKDIR /app
RUN poetry config virtualenvs.create false \
&& poetry install --only base
&& poetry install --without linters
FROM base AS linters
RUN poetry install --only linters