-
Notifications
You must be signed in to change notification settings - Fork 1
/
jelease.yaml
219 lines (185 loc) · 7.19 KB
/
jelease.yaml
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# SPDX-FileCopyrightText: 2022 Risk.Ident GmbH <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0
## To make this portable, change the ./jelease.schema.json to:
## https://github.com/RiskIdent/jelease/raw/main/jelease.schema.json
# yaml-language-server: $schema=./jelease.schema.json
# This is the default config embedded into the program.
# Can be overridden with a different file at:
#
# /etc/jelease/jelease.yaml
# ~/.config/jelease.yaml
# ~/.jelease.yaml
# jelease.yaml (in current directory)
# If set to true, or if `--dryrun` flag is passed, then the program will not
# perform any persisting actions. I.e, it will not push any changes via Git,
# not create any GitHub pull requests, and not create any Jira tickets.
dryRun: false
# Definitons of how to update packages, based on package name.
packages:
- name: foobar
repos:
- url: tmp/upstream-test
patches:
- regex:
file: go.mod
match: '(github.com/joho/godotenv) v.*'
replace: '{{ index .Groups 1 }} {{ .Version }}'
- yaml:
file: charts/jelease/Chart.yaml
yamlPath: .appVersion
replace: '{{ .Version }}'
- helmDepUpdate:
chart: charts/jelease
# GitHub settings
github:
# Allows targeting a GitHub Enterprise (self-hosted or cloud) server.
# If set, it will add the /api/v3/ to the end of the path if missing.
# If unset, it will use https://api.github.com/v3/.
url: # https://github.example.com
# Temporary directory to store cloned repositories.
# On Unix systems, it returns $TMPDIR if non-empty, else /tmp.
# On Windows, it uses GetTempPath, returning the first non-empty
# value from %TMP%, %TEMP%, %USERPROFILE%, or the Windows directory.
# On Plan 9, it returns /tmp.
tempDir:
# Config for how to authenticate with GitHub
auth:
type: pat # pat | app
# The "token" config is only relevant if the auth type is set to "pat".
# Generate new token at: https://github.com/settings/tokens
token: # ghp_abc123xyz
# The "app" configs are only relevant if the auth type is set to "app"
app:
# Set "id" to the GitHub App's "App ID"
id: 0
# You must set either "privateKeyPath" or "privateKeyPem".
#
# The former, "privateKeyPath", points to a file containing the key,
# as downloaded from you GitHub App settings page:
# https://docs.github.com/en/[email protected]/developers/apps/building-github-apps/authenticating-with-github-apps#generating-a-private-key
#
# The latter, "privateKeyPem", is the content of that file embedded as a
# string inside the config file.
privateKeyPath: # /some/path/to/jelease.YYYY-MM-DD.private-key.pem
#privateKeyPem: |
# -----BEGIN RSA PRIVATE KEY-----
# bG9yZW0gaXBzdW0sIHNlY3JldCBrZXkgYmFzZTY0IGdvZXMgaGVyZS4u
# -----END RSA PRIVATE KEY-----
pr:
title: |-
{{ with .JiraIssue }}[{{ . }}] {{ end -}}
Update `{{ .Package }}` to {{ .Version }}
description: |
{{ with .JiraIssue -}}
Jira issue: {{ . }}
{{ end -}}
Changed version of `{{ .Package }}` to {{ .Version }}
<sub>
> Update PR generated by [Jelease](https://github.com/RiskIdent/jelease).
</sub>
branch: 'jelease/{{ .Package | sanitizePathSegment }}-{{ .Version | sanitizePathSegment }}'
commit: |-
{{ with .JiraIssue }}[{{ . }}] {{ end -}}
Update `{{ .Package }}` to {{ .Version }}
# Committer details used when creating the Git commit.
# To disable this override, set both fields to null or empty strings,
# and then Jelease would instead rely on the user.name and user.email
# configs from your .gitconfig file.
committer:
name: Jelease[bot]
email: [email protected]
# Jira settings
jira:
# Sets the Jira URL. If you host Jira under a different base path (e.g /jira)
# then you need to include that in the URL, like so:
# url: https://issues.apache.org/jira/
#
# If when browsing the Jira your URL says:
# https://jira.example.com/secure/Dashboard.jspa
# then you should set the URL to:
# url: https://jira.example.com
#
# However, if it says:
# https://jira.example.com/jira/secure/Dashboard.jspa
# then you should set the URL to:
# url: https://jira.example.com/jira
url: https://jira.example.com
# (INSECURE) Disables TLS/SSL certificate verification for HTTPS traffic.
# This can be VERY DANGEROUS, and should never be disabled
# (i.e this config set to true) on a production system.
skipCertVerify: false
# Config for how to authenticate with Jira
auth:
type: pat # pat | token
token: abc123xyz
user: '' # Unused if auth type is "pat"
# Jira issue/ticket creation config
issue:
labels:
- jelease
- update
status: Backlog
description: |
Acceptance criteria:
* Checked changelogs for breaking changes
* Updated the software to the specified new version and deployed to all clusters
??Update issue generated by [https://github.com/RiskIdent/jelease].??
type: Task # e.g Task, Bug, Story
project: ''
projectNameCustomField: 1084
# prDeferredCreation means Jelease will send a link to where user can
# manually trigger the PR creation, instead of creating it automatically.
# Note that http.publicUrl also has to be set for this.
prDeferredCreation: false
comments:
updatedIssue: |-
(i) This Jira issue was updated to *{{ .Version }}*.
prCreated: |-
New pull requests updating *{{ .Package }}* to *{{ .Version }}*:
{{ range .PullRequests }}
(+) [{{ .URL }}]
{{ end }}
prFailed: |-
(!) {color:#DE350B}Failed to apply patches for updating *{{ .Package }}* to *{{ .Version }}*.{color}
Error:
{code}
{{ .Error }}
{code}
prDeferredCreation: |-
Can create pull request for updating *{{ .Package }}* to *{{ .Version }}*: [Click to create|{{ .URL }}]
noConfig: >-
{color:#505F79}(i) _No config found for package *{{ .Package }}*.
You can add some to automatically create PRs with the update._{color}
noPatches: >-
{color:#505F79}(i) _Config found for package *{{ .Package }}*,
but no patches were applied._{color}
newReleases:
auth:
apiKey: "123"
defaults:
emailNotification: "none"
projects:
- name: RiskIdent/jelease
provider: github
emailNotification: none
excludePrereleases: true
# HTTP server settings. The HTTP server is used to accept webhooks from
# newreleases.io and GitHub.
http:
port: 8080
# URL to reach Jelease. Used when Jelease needs to link back to itself
# in Jira comments. Trailing slash is optional. Example:
# publicUrl: http://locahost:8080
# will resolve links such as:
# http://locahost:8080/packages/my-package/create-pr
#
# Base paths will be honored, such as:
# publicUrl: http://my-infra.example.com/jelease/
# will resolve links such as:
# http://my-infra.example.com/jelease/packages/my-package/create-pr
publicUrl: null
# Console logging settings.
log:
format: pretty # pretty | json
level: debug # trace | debug | info | warn | error | fatal | panic