cloudflare/cloudflared

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
dfbccd917ca38933ed93012909fd544b8b1be006

Branches

Tags

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

Clone

HTTPS

Download ZIP

cfsetup.yaml

245lines · modecode

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