cfsetup.yaml 6.9 KB

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