carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1{{define "pipeline_settings"}}{{template "top" .}}
2{{if .Flash}}<p class="banner">{{.Flash}}</p>{{end}}
3{{if .FlashErr}}<p class="banner error">{{.FlashErr}}</p>{{end}}
4{{template "appnav" .}}
5
6<div class="settings-layout">
7<nav class="settings-nav" aria-label="Settings sections">
8 {{range .SettingsNav}}<a href="{{.Href}}"{{if .Current}} aria-current="page"{{end}}>{{.Label}}</a>{{end}}
9</nav>
10<div class="settings-content">
11<h2>Release pipeline</h2>
12<p class="small">The ordered list of channels a release moves through — the first is where
13<code>carlos deploy</code> lands. Each channel can ask for a passkey and a number of members
14to confirm before a promotion onto it, or an edit to it, lands. One channel needs none of
15this at all — the vocabulary only shows up once you add a second.</p>
16
17{{if .PipelineIsDefault}}
18<div class="tiles">
19 <form method="post" action="{{.Base}}/apps/{{.AppName}}/pipeline" class="inline">
20 <input type="hidden" name="csrf" value="{{.CSRF}}">
21 <button type="submit" name="action" value="template-edge-production" class="btn-sm">Edge → Production</button>
22 </form>
23 <form method="post" action="{{.Base}}/apps/{{.AppName}}/pipeline" class="inline">
24 <input type="hidden" name="csrf" value="{{.CSRF}}">
25 <button type="submit" name="action" value="template-full-ladder" class="btn-sm">Full ladder</button>
26 </form>
27</div>
28<p class="small">Pick a starting point, then save it or edit it further below — or build your own
29from scratch with the row below. Nothing is written until you press Save.</p>
30{{end}}
31
32<form method="post" action="{{.Base}}/apps/{{.AppName}}/pipeline">
33 <input type="hidden" name="csrf" value="{{.CSRF}}">
34 {{/* First submit button in tree order, so pressing Enter in a row's text
35 field submits Save — implicit form submission uses the first submit
36 button, and without this a row's own "Remove" button would be it. */}}
37 <button type="submit" name="action" value="save" class="visually-hidden" tabindex="-1" aria-hidden="true"></button>
38 <div class="tablewrap">
39 <table>
40 <tr><th>Channel</th><th>Bake</th><th>Passkey</th><th>Promote approvals</th><th>Change approvals</th><th></th></tr>
41 {{range $i, $row := .PipelineRows}}
42 <tr>
43 <td><input type="text" name="ch.{{$i}}.name" value="{{$row.Name}}" placeholder="channel-name"
44 aria-label="Channel {{$i}} name"></td>
45 <td><input type="text" name="ch.{{$i}}.bake" value="{{$row.Bake}}" placeholder="24h"
46 aria-label="Channel {{$i}} bake window"></td>
47 <td><input type="checkbox" name="ch.{{$i}}.passkey" value="1"{{if $row.Passkey}} checked{{end}}
48 aria-label="Channel {{$i}} needs a passkey"></td>
49 <td><input type="number" min="0" name="ch.{{$i}}.promote_approvals" value="{{$row.PromoteApprovals}}"
50 aria-label="Channel {{$i}} promote approvals"></td>
51 <td><input type="number" min="0" name="ch.{{$i}}.change_approvals" value="{{$row.ChangeApprovals}}"
52 aria-label="Channel {{$i}} change approvals"></td>
53 <td><button type="submit" name="action" value="remove-{{$i}}" class="btn-sm btn-danger">Remove</button></td>
54 </tr>
55 {{end}}
56 </table>
57 </div>
58 <button type="submit" name="action" value="add" class="btn-sm">Add channel</button>
59 <button type="submit" name="action" value="save" class="btn">Save</button>
60</form>
61<p class="small">Promoting into a channel with rules follows the order above; <code>-hotfix</code>
62bypasses the order but never the rules. An edit that touches a channel the SAVED pipeline
63already guards with change approvals becomes a proposal here too, at the quorum that channel
64already demands.</p>
65</div>
66</div>
67{{template "bottom" .}}{{end}}
68