[CI] Added DroneCI config file
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Simon Cornet 2022-11-01 13:03:03 +01:00
parent 27f339c1ba
commit 0251e930fc
4 changed files with 53 additions and 28 deletions

View File

@ -1,17 +0,0 @@
---
domains:
- domain: start.simoncor.net
type: PRIMARY
name: speed-dial
region: ams
static_sites:
- build_command: hugo -d public
environment_slug: hugo
gitlab:
branch: master
deploy_on_push: true
repo: embark_caboose/start-simoncor-net
name: start-simoncor-net
routes:
- path: /
source_dir: /

View File

@ -1,11 +0,0 @@
---
spec:
name: speed-dial
region: ams
static_sites:
- build_command: hugo -d public
environment_slug: hugo
gitlab:
branch: master
repo: embark_caboose/start-simoncor-net
name: start-simoncor-net

31
.drone.yml Normal file
View File

@ -0,0 +1,31 @@
---
kind: 'pipeline'
name: 'build'
type: 'docker'
steps:
# build and publish
- image: 'plugins/docker'
name: 'publish'
pull: 'always'
settings:
# registery and repos
registry: 'docker.io'
cache_from: 'rakepanorama/start-simoncor-net'
repo: 'rakepanorama/start-simoncor-net'
# build stuff
dockerfile: 'Dockerfile.linux.amd64'
daemon_off: 'false'
# authentication
username:
from_secret: 'docker_username'
password:
from_secret: 'docker_password'
# tags
tags:
- 'latest'

22
Dockerfile.linux.amd64 Normal file
View File

@ -0,0 +1,22 @@
FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
RUN set -e && ln -sf bash /bin/sh
RUN set -e \
&& apt -y update \
&& apt -y upgrade \
&& apt -y install --no-install-recommends --no-install-suggests ca-certificates git wget \
&& apt -y autoremove \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
RUN set -e \
&& wget -q -O /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.105.0/hugo_0.105.0_linux-amd64.deb \
&& apt -y install /tmp/hugo.deb \
&& rm -f /tmp/hugo.deb
RUN set -e \
&& git clone https://git.simoncor.net/siempie/start.simoncor.net.git /site/
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/hugo --bind 0.0.0.0 --contentDir /site/ --port 8080 --theme slate"]