From 0251e930fccc1e249a191e9c174c0994be3d8292 Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Tue, 1 Nov 2022 13:03:03 +0100 Subject: [PATCH] [CI] Added DroneCI config file --- .do/app.yaml | 17 ----------------- .do/deploy.template.yaml | 11 ----------- .drone.yml | 31 +++++++++++++++++++++++++++++++ Dockerfile.linux.amd64 | 22 ++++++++++++++++++++++ 4 files changed, 53 insertions(+), 28 deletions(-) delete mode 100644 .do/app.yaml delete mode 100644 .do/deploy.template.yaml create mode 100644 .drone.yml create mode 100644 Dockerfile.linux.amd64 diff --git a/.do/app.yaml b/.do/app.yaml deleted file mode 100644 index 23f588a..0000000 --- a/.do/app.yaml +++ /dev/null @@ -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: / diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml deleted file mode 100644 index d75b7b3..0000000 --- a/.do/deploy.template.yaml +++ /dev/null @@ -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 diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..7720ee4 --- /dev/null +++ b/.drone.yml @@ -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' diff --git a/Dockerfile.linux.amd64 b/Dockerfile.linux.amd64 new file mode 100644 index 0000000..5ac8fec --- /dev/null +++ b/Dockerfile.linux.amd64 @@ -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"]