-
Notifications
You must be signed in to change notification settings - Fork 250
/
release-pipeline.yml
112 lines (112 loc) · 2.99 KB
/
release-pipeline.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
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: cli-release-pipeline
spec:
workspaces:
- name: shared-workspace
params:
- name: url
description: git url to clone
- name: revision
description: revision branch to checkout
- name: package
description: package to release
default: github.com/tektoncd/cli
- name: github-token-secret
description: name of the secret holding the github-token
default: bot-token-github
- name: github-token-secret-key
description: name of the key for the secret holding the github-token
default: bot-token
- name: golangci-lint-version
description: version of the golangci-lint tool
- name: go-version
description: version of the go language
tasks:
- name: fetch-repository
taskRef:
name: git-clone
workspaces:
- name: output
workspace: shared-workspace
params:
- name: url
value: $(params.url)
- name: revision
value: $(params.revision)
- name: deleteExisting
value: "true"
- name: get-versions
runAfter: [fetch-repository]
workspaces:
- name: source
workspace: shared-workspace
params:
- name: package
value: $(params.package)
taskRef:
name: get-versions
- name: lint
runAfter: [get-versions]
taskRef:
name: golangci-lint
params:
- name: package
value: $(params.package)
- name: flags
value: "-v --timeout 20m"
- name: version
value: $(params.golangci-lint-version)
workspaces:
- name: source
workspace: shared-workspace
- name: unit-tests
runAfter: [lint]
taskRef:
name: golang-test
params:
- name: package
value: $(params.package)
- name: packages
value: ./pkg/... ./cmd/...
- name: version
value: $(params.go-version)
- name: flags
value: -v -mod=vendor
workspaces:
- name: source
workspace: shared-workspace
- name: build
runAfter: [lint]
taskRef:
name: golang-build
params:
- name: package
value: $(params.package)
- name: version
value: $(params.go-version)
- name: flags
value: -v -mod=vendor
workspaces:
- name: source
workspace: shared-workspace
- name: release
runAfter: [build, unit-tests]
taskRef:
name: goreleaser
params:
- name: package
value: $(params.package)
- name: github-token-secret
value: $(params.github-token-secret)
- name: github-token-secret-key
value: $(params.github-token-secret-key)
- name: image
value: goreleaser/goreleaser:v2.1.0
- name: flags
value: --timeout=60m
workspaces:
- name: source
workspace: shared-workspace