-
Notifications
You must be signed in to change notification settings - Fork 594
/
Copy pathgithubPublishRelease.yaml
193 lines (190 loc) · 5.52 KB
/
githubPublishRelease.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
metadata:
name: githubPublishRelease
description: Publish a release in GitHub
longDescription: |
This step creates a tag in your GitHub repository together with a release.
The release can be filled with text plus additional information like:
* Closed pull request since last release
* Closed issues since last release
* Link to delta information showing all commits since last release
The result looks like
![Example release](../images/githubRelease.png)
spec:
inputs:
secrets:
- name: githubTokenCredentialsId
description: Jenkins 'Secret text' credentials ID containing token to authenticate to GitHub.
type: jenkins
params:
- name: addClosedIssues
description: "If set to `true`, closed issues and merged pull-requests since the last release will added below the `releaseBodyHeader`"
scope:
- PARAMETERS
- STAGES
- STEPS
type: bool
default: false
- name: addDeltaToLastRelease
description: "If set to `true`, a link will be added to the release information that brings up all commits since the last release."
scope:
- PARAMETERS
- STAGES
- STEPS
type: bool
default: false
- name: apiUrl
aliases:
- name: githubApiUrl
description: Set the GitHub API url.
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
type: string
default: https://api.github.com
mandatory: true
- name: assetPath
description: Path to a release asset which should be uploaded to the list of release assets.
scope:
- PARAMETERS
- STAGES
- STEPS
type: string
- name: assetPathList
description: List of paths to a release asset which should be uploaded to the list of release assets.
scope:
- PARAMETERS
- STAGES
- STEPS
type: "[]string"
- name: commitish
description: "Target git commitish for the release"
scope:
- PARAMETERS
- STAGES
- STEPS
type: string
default: "master"
resourceRef:
- name: commonPipelineEnvironment
param: git/headCommitId
- name: excludeLabels
description: "Allows to exclude issues with dedicated list of labels."
scope:
- PARAMETERS
- STAGES
- STEPS
type: "[]string"
- name: labels
description: "Labels to include in issue search."
scope:
- PARAMETERS
- STAGES
- STEPS
type: "[]string"
- name: owner
aliases:
- name: githubOrg
description: Name of the GitHub organization.
resourceRef:
- name: commonPipelineEnvironment
param: github/owner
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
type: string
mandatory: true
- name: preRelease
description: "If set to `true` the release will be marked as Pre-release."
scope:
- PARAMETERS
- STAGES
- STEPS
type: bool
default: false
- name: releaseBodyHeader
description: Content which will appear for the release.
scope:
- PARAMETERS
- STAGES
- STEPS
type: string
- name: repository
aliases:
- name: githubRepo
description: Name of the GitHub repository.
resourceRef:
- name: commonPipelineEnvironment
param: github/repository
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
type: string
mandatory: true
- name: serverUrl
aliases:
- name: githubServerUrl
description: "GitHub server url for end-user access."
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
type: string
default: https://github.com
mandatory: true
- name: tagPrefix
type: string
description: "Defines a prefix to be added to the tag."
scope:
- PARAMETERS
- STAGES
- STEPS
default: ""
- name: token
aliases:
- name: githubToken
- name: access_token
description: "GitHub personal access token as per https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line"
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
type: string
mandatory: true
secret: true
resourceRef:
- name: githubTokenCredentialsId
type: secret
- type: vaultSecret
default: github
name: githubVaultSecretName
- name: uploadUrl
aliases:
- name: githubUploadUrl
description: Set the GitHub API url.
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
type: string
default: https://uploads.github.com
mandatory: true
- name: version
description: "Define the version number which will be written as tag as well as release name."
resourceRef:
- name: commonPipelineEnvironment
param: artifactVersion
scope:
- PARAMETERS
- STAGES
- STEPS
type: string
mandatory: true