forked from TykTechnologies/tyk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser-el7.yml
198 lines (175 loc) · 5.42 KB
/
.goreleaser-el7.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
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
# Generated by: tyk-ci/wf-gen
# Generated on: Tuesday 08 February 2022 12:00:28 PM UTC
# Generation commands:
# ./pr.zsh -repos tyk -base master -branch tt-4363-el7 -title Sync from templates- el7 changes -p
# m4 -E -DxEL7_SUFFIX=-el7 -DxREPO=tyk
# Check the documentation at http://goreleaser.com
# This project needs CGO_ENABLED=1 and the cross-compiler toolchains for
# - arm64
# - amd64
builds:
- id: std-linux
flags:
- -tags=goplugin
ldflags:
- -X github.com/TykTechnologies/tyk/gateway.VERSION={{.Version}} -X github.com/TykTechnologies/tyk/gateway.Commit={{.FullCommit}} -X github.com/TykTechnologies/tyk/gateway.buildDate={{.Date}} -X github.com/TykTechnologies/tyk/gateway.builtBy=goreleaser
goos:
- linux
goarch:
- amd64
- id: std-arm64
flags:
- -tags=goplugin
ldflags:
- -X github.com/TykTechnologies/tyk/gateway.VERSION={{.Version}} -X github.com/TykTechnologies/tyk/gateway.Commit={{.FullCommit}} -X github.com/TykTechnologies/tyk/gateway.buildDate={{.Date}} -X github.com/TykTechnologies/tyk/gateway.builtBy=goreleaser
env:
- CC=aarch64-linux-gnu-gcc
goos:
- linux
goarch:
- arm64
# static builds strip symbols and do not allow plugins
- id: static-amd64
ldflags:
- -s -w -X github.com/TykTechnologies/tyk/gateway.VERSION={{.Version}} -X github.com/TykTechnologies/tyk/gateway.Commit={{.FullCommit}} -X github.com/TykTechnologies/tyk/gateway.buildDate={{.Date}} -X github.com/TykTechnologies/tyk/gateway.builtBy=goreleaser
- -linkmode external -extldflags -static
goos:
- linux
goarch:
- amd64
nfpms:
- id: std
vendor: "Tyk Technologies Ltd"
homepage: "https://tyk.io"
maintainer: "Tyk <[email protected]>"
description: Tyk API Gateway
package_name: tyk-gateway
builds:
- std-linux
- std-arm64
formats:
- deb
- rpm
contents:
- src: "README.md"
dst: "/opt/share/docs/tyk-gateway/README.md"
- src: "install/*"
dst: "/opt/tyk-gateway/install"
- src: install/inits/systemd/system/tyk-gateway.service
dst: /lib/systemd/system/tyk-gateway.service
- src: install/inits/sysv/init.d/tyk-gateway
dst: /etc/init.d/tyk-gateway
- src: /opt/tyk-gateway
dst: /opt/tyk
type: "symlink"
- src: "LICENSE.md"
dst: "/opt/share/docs/tyk-gateway/LICENSE.md"
- src: "apps/app_sample.*"
dst: "/opt/tyk-gateway/apps"
- src: "templates/*.json"
dst: "/opt/tyk-gateway/templates"
- src: "templates/playground/*"
dst: "/opt/tyk-gateway/templates/playground"
- src: "middleware/*.js"
dst: "/opt/tyk-gateway/middleware"
- src: "event_handlers/sample/*.js"
dst: "/opt/tyk-gateway/event_handlers/sample"
- src: "policies/*.json"
dst: "/opt/tyk-gateway/policies"
- src: "coprocess/*"
dst: "/opt/tyk-gateway/coprocess"
- src: tyk.conf.example
dst: /opt/tyk-gateway/tyk.conf
type: "config|noreplace"
scripts:
preinstall: "install/before_install.sh"
postinstall: "install/post_install.sh"
postremove: "install/post_remove.sh"
bindir: "/opt/tyk-gateway"
overrides:
rpm:
file_name_template: '{{ .PackageName }}-{{ replace .Version "-" "~" }}-1.{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
replacements:
amd64: x86_64
arm: aarch64
arm64: aarch64
deb:
file_name_template: '{{ .PackageName }}_{{ replace .Version "-" "~" }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
replacements:
arm: arm64
rpm:
scripts:
posttrans: install/post_trans.sh
signature:
key_file: tyk.io.signing.key
deb:
signature:
key_file: tyk.io.signing.key
type: origin
publishers:
- name: tyk-gateway-unstable
env:
- PACKAGECLOUD_TOKEN={{ .Env.PACKAGECLOUD_TOKEN }}
- REPO=tyk/tyk-gateway-unstable
- RPMVERS={{ .Env.RPMVERS }}
- DEBVERS={{ .Env.DEBVERS }}
cmd: /pc.sh {{ .ArtifactPath }}
# This disables archives
archives:
- format: binary
allow_different_binary_count: true
dockers:
# Build plugin-compiler
- ids:
- std
image_templates:
- tykio/tyk-plugin-compiler:{{ .Tag }}-el7
- "tykio/tyk-plugin-compiler:v{{ .Major }}.{{ .Minor }}{{.Prerelease}}-el7"
build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=tyk-plugin-compiler"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--build-arg=TYK_GW_TAG={{ .Tag }}"
- "--build-arg=GOLANG_CROSS={{ .Env.GOLANG_CROSS }}"
goarch: amd64
goos: linux
dockerfile: images/plugin-compiler/Dockerfile
extra_files:
- images/plugin-compiler
- go.mod
- apidef
- certs
- checkup
- cli
- config
- coprocess
- ctx
- dlpython
- dnscache
- gateway
- goplugin
- headers
- integration
- log
- regexp
- request
- rpc
- signature_validator
- storage
- tcp
- templates
- test
- testdata
- trace
- user
checksum:
disable: true
release:
disable: true
github:
owner: TykTechnologies
name: tyk
prerelease: auto
draft: true
name_template: "{{.ProjectName}}-v{{.Version}}"