chore: add drone
continuous-integration/drone Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
valvin 2022-11-28 22:14:25 +01:00
parent 7e0f59736b
commit 497357308f
2 changed files with 34 additions and 2 deletions

32
.drone.yml Normal file
View File

@ -0,0 +1,32 @@
---
kind: pipeline
type: docker
name: default
environment:
CI_REGISTRY: "git.valvin.fr"
CI_REGISTRY_USER: "valvin"
CI_REGISTRY_IMAGE: "git.valvin.fr/valvin/hereva-renderer"
IMAGE_TAG: "latest"
steps:
- name: test_build_image
image: gcr.io/kaniko-project/executor:v1.7.0-debug
commands:
- echo "testing build image without push"
- /kaniko/executor --context $DRONE_WORKSPACE --dockerfile Dockerfile --destination $CI_REGISTRY_IMAGE:$IMAGE_TAG --no-push
when:
event:
- pull_request
- name: build_image_and_push
image: gcr.io/kaniko-project/executor:v1.7.0-debug
commands:
- echo "init registry credentials"
- echo $DRONE_WORKSPACE
- mkdir -p /kanico/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $DRONE_WORKSPACE --dockerfile Dockerfile --destination $CI_REGISTRY_IMAGE:$IMAGE_TAG
when:
branch:
- main
event:
- push

View File

@ -1,5 +1,5 @@
FROM alpine:3.14 FROM alpine:3.14
ENV RENDERLITE_URL https://framagit.org/peppercarrot/tools/raw/master/utils/renderfarm-lite.py?inline=false
RUN apk --no-cache add zip libressl python2 python3 py-pip git npm jq curl \ RUN apk --no-cache add zip libressl python2 python3 py-pip git npm jq curl \
ghostscript-fonts fontconfig inkscape imagemagick exiftool graphicsmagick \ ghostscript-fonts fontconfig inkscape imagemagick exiftool graphicsmagick \
&& apk add --no-cache --virtual .build-deps alpine-sdk \ && apk add --no-cache --virtual .build-deps alpine-sdk \
@ -10,7 +10,7 @@ RUN addgroup -g 1001 carrot \
&& adduser -G carrot -D -u 1001 carrot \ && adduser -G carrot -D -u 1001 carrot \
&& cd /home/carrot \ && cd /home/carrot \
&& mkdir /home/carrot/.fonts && chown -R carrot: /home/carrot/.fonts \ && mkdir /home/carrot/.fonts && chown -R carrot: /home/carrot/.fonts \
&& wget -O renderfarm-lite.py https://framagit.org/peppercarrot/tools/raw/feat/renderlite-multithread/utils/renderfarm-lite.py?inline=false \ && wget -O renderfarm-lite.py ${RENDERLITE_URL} \
&& chmod +x /home/carrot/renderfarm-lite.py && chmod +x /home/carrot/renderfarm-lite.py
USER 1001 USER 1001