This repository was archived by the owner on Feb 17, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-and-publish.yml
More file actions
133 lines (120 loc) · 2.79 KB
/
Copy pathbuild-and-publish.yml
File metadata and controls
133 lines (120 loc) · 2.79 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# This is a generic pipeline used for all repos that publish and deploy images.
# The name of the repo needs to be provided as a variable.
resource_types:
- name: ansible-playbook
type: docker-image
source:
repository: troykinsella/concourse-ansible-playbook-resource
tag: latest
resources:
- name: ((repo-name))-main
type: git
icon: github
source:
uri: ssh://git@github.com/seabird-chat/((repo-name)).git
branch: main
private_key: ((github-ssh-key))
- name: ((repo-name))-dev
type: git
icon: github
source:
uri: ssh://git@github.com/seabird-chat/((repo-name)).git
branch: develop
private_key: ((github-ssh-key))
- name: seabird-infra-repo
type: git
icon: github
source:
uri: ssh://git@github.com/seabird-chat/seabird-infra.git
branch: main
private_key: ((github-ssh-key))
- name: site-playbook
type: ansible-playbook
icon: ansible
source:
ssh_private_key: ((ansible-ssh-key))
vault_password: ((ansible-vault-password))
- name: ((repo-name))-image-latest
type: registry-image
icon: docker
source:
repository: seabirdchat/((repo-name))
tag: latest
username: ((registry-username))
password: ((registry-password))
- name: ((repo-name))-image-next
type: registry-image
icon: docker
source:
repository: seabirdchat/((repo-name))
tag: next
username: ((registry-username))
password: ((registry-password))
build-image-task: &build-image-task
task: build-image
privileged: true
config:
platform: linux
image_resource:
type: registry-image
source:
repository: concourse/oci-build-task
inputs:
- name: ((repo-name))
outputs:
- name: image
params:
CONTEXT: ((repo-name))
run:
path: build
deploy-params: &deploy-params
path: seabird-infra
inventory: ./hosts
tags:
- ((repo-name))
vars:
update_seabird: 'true'
jobs:
# Beta jobs
- name: build-and-push-beta
plan:
- get: ((repo-name))
resource: ((repo-name))-dev
trigger: true
- <<: *build-image-task
- put: ((repo-name))-image-next
params:
image: image/image.tar
- name: deploy-beta
plan:
- get: ((repo-name))-image-next
trigger: true
params:
skip_download: true
- get: seabird-infra
resource: seabird-infra-repo
- put: site-playbook
params:
<<: *deploy-params
limit: beta
# Prod jobs
- name: build-and-push-prod
plan:
- get: ((repo-name))
resource: ((repo-name))-main
trigger: true
- <<: *build-image-task
- put: ((repo-name))-image-latest
params:
image: image/image.tar
- name: deploy-prod
plan:
- get: ((repo-name))-image-latest
params:
skip_download: true
- get: seabird-infra
resource: seabird-infra-repo
- put: site-playbook
params:
<<: *deploy-params
limit: prod