cloudflare/cloudflared

Public

mirrored from https://github.com/cloudflare/cloudflaredAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
86f33005b98ec2a21534f82bdf76a9e2bf667dfd

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cfsetup.yaml

250lines · modecode

1pinned_go: &pinned_go go-boring=1.22.2-1
2
3build_dir: &build_dir /cfsetup_build
4default-flavor: bullseye
5buster: &buster
6 build-linux:
7 build_dir: *build_dir
8 builddeps: &build_deps
9 - *pinned_go
10 - build-essential
11 - fakeroot
12 - rubygem-fpm
13 - rpm
14 - libffi-dev
15 pre-cache: &build_pre_cache
16 - export GOCACHE=/cfsetup_build/.cache/go-build
17 - go install golang.org/x/tools/cmd/goimports@latest
18 post-cache:
19 # Build binary for component test
20 - GOOS=linux GOARCH=amd64 make cloudflared
21 build-linux-fips:
22 build_dir: *build_dir
23 builddeps: *build_deps
24 pre-cache: *build_pre_cache
25 post-cache:
26 - export FIPS=true
27 # Build binary for component test
28 - GOOS=linux GOARCH=amd64 make cloudflared
29 cover:
30 build_dir: *build_dir
31 builddeps: *build_deps
32 pre-cache: *build_pre_cache
33 post-cache:
34 - make cover
35 # except FIPS and macos
36 build-linux-release:
37 build_dir: *build_dir
38 builddeps: &build_deps_release
39 - *pinned_go
40 - build-essential
41 - fakeroot
42 - rubygem-fpm
43 - rpm
44 - libffi-dev
45 - python3-dev
46 - python3-pip
47 - python3-setuptools
48 - wget
49 pre-cache: &build_release_pre_cache
50 - pip3 install pynacl==1.4.0
51 - pip3 install pygithub==1.55
52 - pip3 install boto3==1.22.9
53 - pip3 install python-gnupg==0.4.9
54 post-cache:
55 # build all packages (except macos and FIPS) and move them to /cfsetup/built_artifacts
56 - ./build-packages.sh
57 # handle FIPS separately so that we built with gofips compiler
58 build-linux-fips-release:
59 build_dir: *build_dir
60 builddeps: *build_deps_release
61 pre-cache: *build_release_pre_cache
62 post-cache:
63 # same logic as above, but for FIPS packages only
64 - ./build-packages-fips.sh
65 generate-versions-file:
66 build_dir: *build_dir
67 builddeps:
68 - *pinned_go
69 - build-essential
70 post-cache:
71 - make generate-docker-version
72 build-deb:
73 build_dir: *build_dir
74 builddeps: &build_deb_deps
75 - *pinned_go
76 - build-essential
77 - fakeroot
78 - rubygem-fpm
79 post-cache:
80 - export GOOS=linux
81 - export GOARCH=amd64
82 - make cloudflared-deb
83 build-fips-internal-deb:
84 build_dir: *build_dir
85 builddeps: &build_fips_deb_deps
86 - *pinned_go
87 - build-essential
88 - fakeroot
89 - rubygem-fpm
90 post-cache:
91 - export GOOS=linux
92 - export GOARCH=amd64
93 - export FIPS=true
94 - export ORIGINAL_NAME=true
95 - make cloudflared-deb
96 build-internal-deb-nightly-amd64:
97 build_dir: *build_dir
98 builddeps: *build_fips_deb_deps
99 post-cache:
100 - export GOOS=linux
101 - export GOARCH=amd64
102 - export NIGHTLY=true
103 - export FIPS=true
104 - export ORIGINAL_NAME=true
105 - make cloudflared-deb
106 build-internal-deb-nightly-arm64:
107 build_dir: *build_dir
108 builddeps: *build_fips_deb_deps
109 post-cache:
110 - export GOOS=linux
111 - export GOARCH=arm64
112 - export NIGHTLY=true
113 #- export FIPS=true # TUN-7595
114 - export ORIGINAL_NAME=true
115 - make cloudflared-deb
116 build-deb-arm64:
117 build_dir: *build_dir
118 builddeps: *build_deb_deps
119 post-cache:
120 - export GOOS=linux
121 - export GOARCH=arm64
122 - make cloudflared-deb
123 package-windows:
124 build_dir: *build_dir
125 builddeps:
126 - *pinned_go
127 - build-essential
128 - python3-dev
129 - libffi-dev
130 - python3-setuptools
131 - python3-pip
132 - wget
133 # libmsi and libgcab are libraries the wixl binary depends on.
134 - libmsi-dev
135 - libgcab-dev
136 pre-cache:
137 - wget https://github.com/sudarshan-reddy/msitools/releases/download/v0.101b/wixl -P /usr/local/bin
138 - chmod a+x /usr/local/bin/wixl
139 - pip3 install pynacl==1.4.0
140 - pip3 install pygithub==1.55
141 post-cache:
142 - .teamcity/package-windows.sh
143 test:
144 build_dir: *build_dir
145 builddeps: &build_deps_tests
146 - *pinned_go
147 - build-essential
148 - fakeroot
149 - rubygem-fpm
150 - rpm
151 - libffi-dev
152 - gotest-to-teamcity
153 pre-cache: *build_pre_cache
154 post-cache:
155 - export GOOS=linux
156 - export GOARCH=amd64
157 - export PATH="$HOME/go/bin:$PATH"
158 - ./fmt-check.sh
159 - make test | gotest-to-teamcity
160 test-fips:
161 build_dir: *build_dir
162 builddeps: *build_deps_tests
163 pre-cache: *build_pre_cache
164 post-cache:
165 - export GOOS=linux
166 - export GOARCH=amd64
167 - export FIPS=true
168 - export PATH="$HOME/go/bin:$PATH"
169 - ./fmt-check.sh
170 - make test | gotest-to-teamcity
171 component-test:
172 build_dir: *build_dir
173 builddeps: &build_deps_component_test
174 - *pinned_go
175 - python3.7
176 - python3-pip
177 - python3-setuptools
178 # procps installs the ps command which is needed in test_sysv_service because the init script
179 # uses ps pid to determine if the agent is running
180 - procps
181 pre-cache-copy-paths:
182 - component-tests/requirements.txt
183 pre-cache: &component_test_pre_cache
184 - sudo pip3 install --upgrade -r component-tests/requirements.txt
185 post-cache: &component_test_post_cache
186 # Creates and routes a Named Tunnel for this build. Also constructs config file from env vars.
187 - python3 component-tests/setup.py --type create
188 - pytest component-tests -o log_cli=true --log-cli-level=INFO
189 # The Named Tunnel is deleted and its route unprovisioned here.
190 - python3 component-tests/setup.py --type cleanup
191 component-test-fips:
192 build_dir: *build_dir
193 builddeps: *build_deps_component_test
194 pre-cache-copy-paths:
195 - component-tests/requirements.txt
196 pre-cache: *component_test_pre_cache
197 post-cache: *component_test_post_cache
198 github-release-dryrun:
199 build_dir: *build_dir
200 builddeps:
201 - *pinned_go
202 - build-essential
203 - python3-dev
204 - libffi-dev
205 - python3-setuptools
206 - python3-pip
207 pre-cache:
208 - pip3 install pynacl==1.4.0
209 - pip3 install pygithub==1.55
210 post-cache:
211 - make github-release-dryrun
212 github-release:
213 build_dir: *build_dir
214 builddeps:
215 - *pinned_go
216 - build-essential
217 - python3-dev
218 - libffi-dev
219 - python3-setuptools
220 - python3-pip
221 pre-cache:
222 - pip3 install pynacl==1.4.0
223 - pip3 install pygithub==1.55
224 post-cache:
225 - make github-release
226 r2-linux-release:
227 build_dir: *build_dir
228 builddeps:
229 - *pinned_go
230 - build-essential
231 - fakeroot
232 - rubygem-fpm
233 - rpm
234 - wget
235 - python3-dev
236 - libffi-dev
237 - python3-setuptools
238 - python3-pip
239 - reprepro
240 - createrepo
241 pre-cache:
242 - pip3 install pynacl==1.4.0
243 - pip3 install pygithub==1.55
244 - pip3 install boto3==1.22.9
245 - pip3 install python-gnupg==0.4.9
246 post-cache:
247 - make r2-linux-release
248
249bullseye: *buster
250bookworm: *buster
251