forked from chainloop-dev/chainloop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
119 lines (114 loc) · 3.61 KB
/
.goreleaser.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
project_name: Chainloop
env:
- CGO_ENABLED=0
- COMMON_LDFLAGS=-s -w
report_sizes: true
builds:
- binary: control-plane
id: control-plane
main: ./app/controlplane/cmd
ldflags:
- "{{ .Env.COMMON_LDFLAGS }}"
- -X github.com/chainloop-dev/chainloop/app/controlplane/internal/server.Version={{ .Version }}
- -X main.Version={{ .Version }}
targets:
- linux_amd64
- binary: artifact-cas
id: artifact-cas
main: ./app/artifact-cas/cmd
ldflags:
- "{{ .Env.COMMON_LDFLAGS }}"
- -X github.com/chainloop-dev/chainloop/app/artifact-cas/internal/server.Version={{ .Version }}
- -X main.Version={{ .Version }}
targets:
- linux_amd64
- binary: chainloop
id: cli
main: ./app/cli
ldflags:
- "{{ .Env.COMMON_LDFLAGS }}"
- -X github.com/chainloop-dev/chainloop/app/cli/cmd.Version={{ .Version }}
targets:
- darwin_amd64
- darwin_arm64
- linux_amd64
- linux_arm64
# Plugins build
# NOTE: On the event of a new plugin added to the project you need to
# 1 - Add the plugins binary to be built in this section
# 2 - Add the plugin ID to the allow-list in the dockers.IDs section
# 3 - Update the Dockerfile.goreleaser
- binary: chainloop-plugin-discord-webhook
id: chainloop-plugin-discord-webhook
main: ./app/controlplane/plugins/core/discord-webhook/v1/cmd
targets:
- linux_amd64
ldflags: ["{{ .Env.COMMON_LDFLAGS }}"]
- binary: chainloop-plugin-smtp
id: chainloop-plugin-smtp
main: ./app/controlplane/plugins/core/smtp/v1/cmd
targets:
- linux_amd64
ldflags: ["{{ .Env.COMMON_LDFLAGS }}"]
- binary: chainloop-plugin-dependency-track
id: chainloop-plugin-dependency-track
main: ./app/controlplane/plugins/core/dependency-track/v1/cmd
targets:
- linux_amd64
archives:
- builds:
- cli
name_template: "chainloop-cli-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
# Override default to not to include the readme nor license file
files:
- none*
checksum:
name_template: "checksums.txt"
signs:
# COSIGN_PASSWORD is also required to be present
- cmd: cosign
args:
[
"sign-blob",
"--key=env://COSIGN_KEY",
"--output-signature=${signature}",
"--yes",
"${artifact}",
]
artifacts: all
docker_signs:
# COSIGN_PASSWORD is also required to be present
- cmd: cosign
args: ["sign", "--key=env://COSIGN_KEY", "--yes", "${artifact}"]
artifacts: all
dockers:
- dockerfile: app/controlplane/Dockerfile.goreleaser
ids:
- control-plane
- chainloop-plugin-discord-webhook
- chainloop-plugin-smtp
- chainloop-plugin-dependency-track
image_templates:
- "ghcr.io/chainloop-dev/chainloop/control-plane:{{ .Tag }}"
- "ghcr.io/chainloop-dev/chainloop/control-plane:latest"
# Container image meant to perform migrations on the database at deployment time
- dockerfile: app/controlplane/Dockerfile.migrations
extra_files:
- app/controlplane/internal/data/ent/migrate/migrations
image_templates:
- "ghcr.io/chainloop-dev/chainloop/control-plane-migrations:{{ .Tag }}"
- dockerfile: app/artifact-cas/Dockerfile.goreleaser
ids:
- artifact-cas
image_templates:
- "ghcr.io/chainloop-dev/chainloop/artifact-cas:{{ .Tag }}"
- "ghcr.io/chainloop-dev/chainloop/artifact-cas:latest"
- dockerfile: app/cli/Dockerfile.goreleaser
ids:
- cli
image_templates:
- "ghcr.io/chainloop-dev/chainloop/cli:{{ .Tag }}"
- "ghcr.io/chainloop-dev/chainloop/cli:latest"
release:
extra_files:
- glob: ./.github/workflows/cosign.pub