cloudflare/cloudflared

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2024.4.1

Branches

Tags

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

Clone

HTTPS

Download ZIP

cfsetup.yaml

253lines · modeblame

12dd91adChung-Ting2 years ago1pinned_go: &pinned_go go-boring=1.21.5-1
88b53eb8Areg Harutyunyan5 years ago2
e5335b6cNick Vollmar6 years ago3build_dir: &build_dir /cfsetup_build
7a9207a6Opeyemi Onikute3 years ago4default-flavor: bullseye
c7f343a3Devin Carr3 years ago5buster: &buster
cefcb79bChung-Ting Huang7 years ago6build:
7build_dir: *build_dir
515ad7cbDevin Carr3 years ago8builddeps: &build_deps
70e675f4Nuno Diegues4 years ago9- *pinned_go
cefcb79bChung-Ting Huang7 years ago10- build-essential
515ad7cbDevin Carr3 years ago11- gotest-to-teamcity
cf5be91dchungthuang2 years ago12- fakeroot
13- rubygem-fpm
14- rpm
15- libffi-dev
16- reprepro
17- createrepo
515ad7cbDevin Carr3 years ago18pre-cache: &build_pre_cache
19- export GOCACHE=/cfsetup_build/.cache/go-build
20- go install golang.org/x/tools/cmd/goimports@latest
cefcb79bChung-Ting Huang7 years ago21post-cache:
cf5be91dchungthuang2 years ago22# TODO: TUN-8126 this is temporary to make sure packages can be built before release
23- ./build-packages.sh
24# Build binary for component test
25- GOOS=linux GOARCH=amd64 make cloudflared
70e675f4Nuno Diegues4 years ago26build-fips:
c51879b1Nuno Diegues4 years ago27build_dir: *build_dir
12dd91adChung-Ting2 years ago28builddeps: *build_deps
515ad7cbDevin Carr3 years ago29pre-cache: *build_pre_cache
c51879b1Nuno Diegues4 years ago30post-cache:
12dd91adChung-Ting2 years ago31- export FIPS=true
cf5be91dchungthuang2 years ago32# TODO: TUN-8126 this is temporary to make sure packages can be built before release
33- ./build-packages-fips.sh
34# Build binary for component test
35- GOOS=linux GOARCH=amd64 make cloudflared
58b27a1cSudarsan Reddy3 years ago36cover:
37build_dir: *build_dir
38builddeps: *build_deps
39pre-cache: *build_pre_cache
40post-cache:
41- make cover
70e675f4Nuno Diegues4 years ago42# except FIPS (handled in github-fips-release-pkgs) and macos (handled in github-release-macos-amd64)
43github-release-pkgs:
dff694b2Sudarsan Reddy4 years ago44build_dir: *build_dir
45builddeps:
70e675f4Nuno Diegues4 years ago46- *pinned_go
dff694b2Sudarsan Reddy4 years ago47- build-essential
48- fakeroot
49- rubygem-fpm
50- rpm
51- wget
52# libmsi and libgcab are libraries the wixl binary depends on.
53- libmsi-dev
54- libgcab-dev
70e675f4Nuno Diegues4 years ago55- python3-dev
56- libffi-dev
57- python3-setuptools
58- python3-pip
4b6437ccSudarsan Reddy4 years ago59- reprepro
60- createrepo
70e675f4Nuno Diegues4 years ago61pre-cache: &github_release_pkgs_pre_cache
dff694b2Sudarsan Reddy4 years ago62- wget https://github.com/sudarshan-reddy/msitools/releases/download/v0.101b/wixl -P /usr/local/bin
63- chmod a+x /usr/local/bin/wixl
0292727acthuang4 years ago64- pip3 install pynacl==1.4.0
65- pip3 install pygithub==1.55
4b6437ccSudarsan Reddy4 years ago66- pip3 install boto3==1.22.9
32739e9fSudarsan Reddy4 years ago67- pip3 install python-gnupg==0.4.9
dff694b2Sudarsan Reddy4 years ago68post-cache:
70e675f4Nuno Diegues4 years ago69# build all packages (except macos and FIPS) and move them to /cfsetup/built_artifacts
dff694b2Sudarsan Reddy4 years ago70- ./build-packages.sh
70e675f4Nuno Diegues4 years ago71# release the packages built and moved to /cfsetup/built_artifacts
72- make github-release-built-pkgs
92f647d4Sudarsan Reddy4 years ago73# publish packages to linux repos
74- make release-pkgs-linux
70e675f4Nuno Diegues4 years ago75# handle FIPS separately so that we built with gofips compiler
76github-fips-release-pkgs:
bd8af7d8Sudarsan Reddy4 years ago77build_dir: *build_dir
78builddeps:
12dd91adChung-Ting2 years ago79- *pinned_go
bd8af7d8Sudarsan Reddy4 years ago80- build-essential
81- fakeroot
82- rubygem-fpm
83- rpm
84- wget
85# libmsi and libgcab are libraries the wixl binary depends on.
86- libmsi-dev
87- libgcab-dev
997f2cf6Nuno Diegues4 years ago88- python3-dev
89- libffi-dev
bd8af7d8Sudarsan Reddy4 years ago90- python3-setuptools
91- python3-pip
70e675f4Nuno Diegues4 years ago92pre-cache: *github_release_pkgs_pre_cache
bd8af7d8Sudarsan Reddy4 years ago93post-cache:
70e675f4Nuno Diegues4 years ago94# same logic as above, but for FIPS packages only
95- ./build-packages-fips.sh
bd8af7d8Sudarsan Reddy4 years ago96- make github-release-built-pkgs
e89bcecaSudarsan Reddy3 years ago97generate-versions-file:
98build_dir: *build_dir
99builddeps:
442af9eeSudarsan Reddy3 years ago100- *pinned_go
e89bcecaSudarsan Reddy3 years ago101- build-essential
102post-cache:
103- make generate-docker-version
0c414cebChung-Ting Huang7 years ago104build-deb:
105build_dir: *build_dir
6e45e0d5cthuang4 years ago106builddeps: &build_deb_deps
70e675f4Nuno Diegues4 years ago107- *pinned_go
108- build-essential
109- fakeroot
110- rubygem-fpm
111post-cache:
112- export GOOS=linux
113- export GOARCH=amd64
114- make cloudflared-deb
01ad2785Nuno Diegues4 years ago115build-fips-internal-deb:
70e675f4Nuno Diegues4 years ago116build_dir: *build_dir
01ad2785Nuno Diegues4 years ago117builddeps: &build_fips_deb_deps
12dd91adChung-Ting2 years ago118- *pinned_go
0c414cebChung-Ting Huang7 years ago119- build-essential
120- fakeroot
121- rubygem-fpm
122post-cache:
123- export GOOS=linux
124- export GOARCH=amd64
88b53eb8Areg Harutyunyan5 years ago125- export FIPS=true
ead93e9fNuno Diegues4 years ago126- export ORIGINAL_NAME=true
127- make cloudflared-deb
2084a123Devin Carr2 years ago128build-internal-deb-nightly-amd64:
6e45e0d5cthuang4 years ago129build_dir: *build_dir
01ad2785Nuno Diegues4 years ago130builddeps: *build_fips_deb_deps
6e45e0d5cthuang4 years ago131post-cache:
132- export GOOS=linux
133- export GOARCH=amd64
134- export NIGHTLY=true
01ad2785Nuno Diegues4 years ago135- export FIPS=true
ead93e9fNuno Diegues4 years ago136- export ORIGINAL_NAME=true
137- make cloudflared-deb
2084a123Devin Carr2 years ago138build-internal-deb-nightly-arm64:
139build_dir: *build_dir
140builddeps: *build_fips_deb_deps
141post-cache:
142- export GOOS=linux
143- export GOARCH=arm64
144- export NIGHTLY=true
145#- export FIPS=true # TUN-7595
146- export ORIGINAL_NAME=true
147- make cloudflared-deb
6274567eIvan Babrou5 years ago148build-deb-arm64:
149build_dir: *build_dir
6e45e0d5cthuang4 years ago150builddeps: *build_deb_deps
6274567eIvan Babrou5 years ago151post-cache:
152- export GOOS=linux
153- export GOARCH=arm64
154- make cloudflared-deb
b698fe5eDalton5 years ago155github-release-macos-amd64:
156build_dir: *build_dir
b0f0741aDevin Carr3 years ago157builddeps: &build_pygithub
b698fe5eDalton5 years ago158- *pinned_go
d9636c73Nuno Diegues4 years ago159- build-essential
160- python3-dev
161- libffi-dev
b698fe5eDalton5 years ago162- python3-setuptools
163- python3-pip
cd4af569Sudarsan Reddy4 years ago164pre-cache: &install_pygithub
0292727acthuang4 years ago165- pip3 install pynacl==1.4.0
166- pip3 install pygithub==1.55
b698fe5eDalton5 years ago167post-cache:
168- make github-mac-upload
b0f0741aDevin Carr3 years ago169github-release-windows:
170build_dir: *build_dir
171builddeps:
172- *pinned_go
173- build-essential
174- python3-dev
175- libffi-dev
176- python3-setuptools
177- python3-pip
178- wget
179# libmsi and libgcab are libraries the wixl binary depends on.
180- libmsi-dev
181- libgcab-dev
182pre-cache:
183- wget https://github.com/sudarshan-reddy/msitools/releases/download/v0.101b/wixl -P /usr/local/bin
184- chmod a+x /usr/local/bin/wixl
185- pip3 install pynacl==1.4.0
186- pip3 install pygithub==1.55
187post-cache:
188- .teamcity/package-windows.sh
189- make github-windows-upload
0c414cebChung-Ting Huang7 years ago190test:
191build_dir: *build_dir
515ad7cbDevin Carr3 years ago192builddeps: *build_deps
193pre-cache: *build_pre_cache
0c414cebChung-Ting Huang7 years ago194post-cache:
195- export GOOS=linux
196- export GOARCH=amd64
70e675f4Nuno Diegues4 years ago197- export PATH="$HOME/go/bin:$PATH"
198- ./fmt-check.sh
199- make test | gotest-to-teamcity
200test-fips:
201build_dir: *build_dir
12dd91adChung-Ting2 years ago202builddeps: *build_deps
515ad7cbDevin Carr3 years ago203pre-cache: *build_pre_cache
70e675f4Nuno Diegues4 years ago204post-cache:
205- export GOOS=linux
206- export GOARCH=amd64
88b53eb8Areg Harutyunyan5 years ago207- export FIPS=true
e5335b6cNick Vollmar6 years ago208- export PATH="$HOME/go/bin:$PATH"
da4d0b2bIgor Postelnik5 years ago209- ./fmt-check.sh
a278753bAdam Chalmers5 years ago210- make test | gotest-to-teamcity
4481b9e4cthuang5 years ago211component-test:
212build_dir: *build_dir
213builddeps:
d7fb18beDevin Carr3 years ago214- *pinned_go
4481b9e4cthuang5 years ago215- python3.7
216- python3-pip
217- python3-setuptools
9df60276cthuang5 years ago218# procps installs the ps command which is needed in test_sysv_service because the init script
219# uses ps pid to determine if the agent is running
220- procps
4481b9e4cthuang5 years ago221pre-cache-copy-paths:
222- component-tests/requirements.txt
d7fb18beDevin Carr3 years ago223pre-cache: &component_test_pre_cache
4481b9e4cthuang5 years ago224- sudo pip3 install --upgrade -r component-tests/requirements.txt
d7fb18beDevin Carr3 years ago225post-cache: &component_test_post_cache
9d3a7bd0Nuno Diegues5 years ago226# Creates and routes a Named Tunnel for this build. Also constructs config file from env vars.
227- python3 component-tests/setup.py --type create
794635fbNuno Diegues4 years ago228- pytest component-tests -o log_cli=true --log-cli-level=INFO
9d3a7bd0Nuno Diegues5 years ago229# The Named Tunnel is deleted and its route unprovisioned here.
230- python3 component-tests/setup.py --type cleanup
d7fb18beDevin Carr3 years ago231component-test-fips:
232build_dir: *build_dir
233builddeps:
12dd91adChung-Ting2 years ago234- *pinned_go
d7fb18beDevin Carr3 years ago235- python3.7
236- python3-pip
237- python3-setuptools
238# procps installs the ps command which is needed in test_sysv_service because the init script
239# uses ps pid to determine if the agent is running
240- procps
241pre-cache-copy-paths:
242- component-tests/requirements.txt
243pre-cache: *component_test_pre_cache
244post-cache: *component_test_post_cache
5b3b5921Dalton5 years ago245github-message-release:
246build_dir: *build_dir
b0f0741aDevin Carr3 years ago247builddeps: *build_pygithub
20623255Michael Borkenstein5 years ago248pre-cache: *install_pygithub
5b3b5921Dalton5 years ago249post-cache:
250- make github-message
72412db4Austin Cherry7 years ago251
c7f343a3Devin Carr3 years ago252bullseye: *buster
253bookworm: *buster