This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
97 lines (91 loc) · 1.96 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
---
kind: pipeline
name: default
steps:
- name: build
image: docker
when:
branch:
exclude:
- skip-ci*
event:
exclude:
- pull_request
- tag
environment:
SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
commands:
- export DOCKER_HOST=unix:///var/run/host.sock
- docker login -u 'robot$drone' -p $DOCKER_PASSWORD harbor.dsrd.libraries.psu.edu
- docker build -t harbor.dsrd.libraries.psu.edu/library/ss-shrine:$DRONE_BUILD_NUMBER .
- docker push harbor.dsrd.libraries.psu.edu/library/ss-shrine:$DRONE_BUILD_NUMBER
volumes:
- name: docker-sock
path: /var/run/host.sock
- name: update ArgoCD (prod)
image: alpine/git
environment:
CONFIG_ENV: prod
when:
branch:
include:
- master
event:
exclude:
- pull_request
- tag
commands:
- git clone https://github.com/psu-stewardship/ss-shrine-config.git
- cd ss-shrine-config
- ./generate_application.sh
- name: update ArgoCD (qa)
image: alpine/git
environment:
CONFIG_ENV: qa
when:
event:
include:
- tag
commands:
- git clone https://github.com/psu-stewardship/ss-shrine-config.git
- cd ss-shrine-config
- ./generate_application.sh
- name: update ArgoCD (dev)
image: alpine/git
environment:
CONFIG_ENV: dev
when:
branch:
include:
- preview/*
- develop
event:
exclude:
- pull_request
- tag
commands:
- git clone https://github.com/psu-stewardship/ss-shrine-config.git
- cd ss-shrine-config
- ./generate_application.sh
services:
- name: postgres
image: postgres:10
when:
branch:
exclude:
- skip-ci*
event:
exclude:
- pull_request
- tag
environment:
POSTGRES_PASSWORD: ss-shrine-test
POSTGRES_USER: ss-shrine
POSTGRES_DB: ss-shrine
volumes:
- name: docker-sock
host:
path: /var/run/docker.sock