-
Notifications
You must be signed in to change notification settings - Fork 19
/
.drone.yml
100 lines (91 loc) · 2.26 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
kind: pipeline
name: default
steps:
- name: Test
image: python:3.9
environment:
POSTGRES_HOST: database
commands:
- apt update && apt-get install -y postgresql-client
- cat datafiles/schema.sql | PGPASSWORD="w1gWIn7NDGXjXMguiI2Qe05X" psql -U opennsa -h database -d opennsatest
- python3 -m pip install -r requirements.txt
- cp util/integration-config.json .opennsa-test.json
- cp config/opennsa.conf.template config/opennsa.conf
- PYTHONPATH=. trial test
services:
- name: database
image: postgres:12-alpine
environment:
POSTGRES_USER: opennsa
POSTGRES_PASSWORD: w1gWIn7NDGXjXMguiI2Qe05X
POSTGRES_DB: opennsatest
trigger:
event:
- push
- pull_request
---
kind: pipeline
name: docker
steps:
- name: docker
image: plugins/docker
pull: if-not-exists
settings:
repo: jghnordunet/opennsa
squash: true
auto_tag: true
dockerfile: docker/Dockerfile
username:
from_secret: DOCKER_USER
password:
from_secret: DOCKER_PASS
trigger:
branch:
- master
event:
- tag
- push
---
kind: pipeline
name: documentation
steps:
- name: Submodule sync
image: alpine/git
commands:
- "git submodule update --init --recursive"
- name: build
image: plugins/hugo:latest
settings:
extended: true
commands:
- cd website
- "apk add --update nghttp2-dev npm wget"
- npm install -D --save autoprefixer postcss-cli postcss
- wget "https://github.com/gohugoio/hugo/releases/download/v0.91.0/hugo_extended_0.91.0_Linux-64bit.tar.gz"
- tar xvfz hugo_extended_0.91.0_Linux-64bit.tar.gz
- npm install
- "./hugo version"
- "./hugo --destination public --baseURL https://NORDUnet.github.io/opennsa/"
- name: publish
image: plugins/gh-pages
settings:
pages_directory: website/public
upstream_name: origin
remote_url: https://github.com/NORDUnet/opennsa.git
target_branch: gh-pages
force_push: true
delete: true
username:
from_secret: gh_username
password:
from_secret: gh_password
when:
branch:
- master
event: push
trigger:
branch:
- master
event:
- tag
- push