Browse Source

Migrate to drone.

master
Robert Jacob 3 years ago
parent
commit
a79ab81b2d
  1. 36
      .drone.yml
  2. 1
      _ci/.gitignore
  3. 6
      _ci/build.sh
  4. 12
      _ci/build.yml
  5. 43
      _ci/pipeline.yml
  6. 10
      _ci/verify.yml

36
.drone.yml

@ -0,0 +1,36 @@
kind: pipeline
name: default
steps:
- name: submodules
image: alpine/git
commands:
- git submodule update --init --recursive
- name: build
image: xperimental/hugo:0.45
commands:
- hugo
- name: publish
image: alpine
volumes:
- name: output
path: /output
commands:
- apk add rsync
- rsync -av --del ./public/ /output/
- chown -R 33:33 /output
when:
branch:
- master
- name: verify
image: xperimental/linky:0.3.0
commands:
- linky https://www.tueftlinge.de
when:
branch:
- master
volumes:
- name: output
host:
path: /var/www/tueftlinge

1
_ci/.gitignore vendored

@ -1 +0,0 @@
credentials.yml

6
_ci/build.sh

@ -1,6 +0,0 @@
#!/bin/env sh
set -e -u -x
hugo -s ./source/
cp -r ./source/public/* ./website/

12
_ci/build.yml

@ -1,12 +0,0 @@
platform: linux
image_resource:
type: docker-image
source:
repository: xperimental/hugo
tag: 0.45
inputs:
- name: source
outputs:
- name: website
run:
path: source/_ci/build.sh

43
_ci/pipeline.yml

@ -1,43 +0,0 @@
resource_types:
- name: ftp
type: docker-image
source:
repository: xperimental/simple-ftp-resource
tag: 0.0.1
resources:
- name: repo
type: git
source:
uri: https://git.hacknology.de/hacknology/tueftlinge-webseite.git
branch: master
- name: server
type: ftp
source:
host: ftp.hacknology.de:21
user: {{ftp-user}}
password: {{ftp-password}}
tls: true
jobs:
- name: build
plan:
- get: source
resource: repo
trigger: true
- task: build
file: source/_ci/build.yml
- put: website
resource: server
params:
local: website/
remote: /
- name: verify
plan:
- get: source
resource: repo
trigger: true
passed:
- build
- task: verify
file: source/_ci/verify.yml

10
_ci/verify.yml

@ -1,10 +0,0 @@
platform: linux
image_resource:
type: docker-image
source:
repository: xperimental/linky
tag: 0.3.0
run:
path: /bin/linky
args:
- https://www.tueftlinge.de
Loading…
Cancel
Save