Repository navigation
Expand file tree
/
Copy pathpipeline-only.yml
More file actions
55 lines (50 loc) · 2 KB
/
Copy pathpipeline-only.yml
File metadata and controls
55 lines (50 loc) · 2 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
# ---------------------------------------------------------------------------
# Example: a repository that needs NOTHING BUT a CI chain.
# ---------------------------------------------------------------------------
# The service is deployed some other way, but it needs a CI that builds the
# image and validates what gets committed.
#
# forge generate -s examples/pipeline-only.yml -o /tmp/gateway
#
# Produces `.github/workflows/ci.yml` at the root — a CI file only exists where
# its tool reads it — and nothing else.
#
# The pipeline is the only domain whose output **depends on the other
# sections**. Here there are none: it therefore emits the only job it can emit,
# the one validating its own output, plus the image build that was asked for. It
# does not invent jobs for absent domains.
#
# Add a `helm:` section to this file, and a "Validate Helm" job appears, with
# the commands the Helm domain declares itself and the installation of the tools
# they require. Without a single template line changing.
# ---------------------------------------------------------------------------
forge_version: 1
service:
name: gateway
description: "Application gateway"
owner: "Platform Team"
owner_email: platform@example.net
environments:
- name: prod
domain: example.net
production: true
pipeline:
# github | gitlab. The choice changes the file format, never its content: the
# same jobs are written in both dialects.
provider: github
trigger:
branches: [main]
# A check only really prevents something before the merge.
on_pull_request: true
build:
context: .
dockerfile: Dockerfile
# The token GitHub provides out of the box only opens ghcr.io; publishing
# anywhere else needs a secret, and forge reports the case rather than
# writing it.
registry: ghcr.io
image: platform/gateway
push: true
# No `deploy:` section: this pipeline validates and builds, it does not
# deploy. That is a legitimate choice, and the safest one until the chain is
# proven.