cfsetup.yaml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. pinned_go: &pinned_go go-boring=1.22.5-1
  2. build_dir: &build_dir /cfsetup_build
  3. default-flavor: bullseye
  4. buster: &buster
  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. pre-cache: &build_release_pre_cache
  49. - pip3 install pynacl==1.4.0
  50. - pip3 install pygithub==1.55
  51. - pip3 install boto3==1.22.9
  52. - pip3 install python-gnupg==0.4.9
  53. post-cache:
  54. # build all packages (except macos and FIPS) and move them to /cfsetup/built_artifacts
  55. - ./build-packages.sh
  56. # handle FIPS separately so that we built with gofips compiler
  57. build-linux-fips-release:
  58. build_dir: *build_dir
  59. builddeps: *build_deps_release
  60. pre-cache: *build_release_pre_cache
  61. post-cache:
  62. # same logic as above, but for FIPS packages only
  63. - ./build-packages-fips.sh
  64. generate-versions-file:
  65. build_dir: *build_dir
  66. builddeps:
  67. - *pinned_go
  68. - build-essential
  69. post-cache:
  70. - make generate-docker-version
  71. build-deb:
  72. build_dir: *build_dir
  73. builddeps: &build_deb_deps
  74. - *pinned_go
  75. - build-essential
  76. - fakeroot
  77. - rubygem-fpm
  78. post-cache:
  79. - export GOOS=linux
  80. - export GOARCH=amd64
  81. - make cloudflared-deb
  82. build-fips-internal-deb:
  83. build_dir: *build_dir
  84. builddeps: &build_fips_deb_deps
  85. - *pinned_go
  86. - build-essential
  87. - fakeroot
  88. - rubygem-fpm
  89. post-cache:
  90. - export GOOS=linux
  91. - export GOARCH=amd64
  92. - export FIPS=true
  93. - export ORIGINAL_NAME=true
  94. - make cloudflared-deb
  95. build-internal-deb-nightly-amd64:
  96. build_dir: *build_dir
  97. builddeps: *build_fips_deb_deps
  98. post-cache:
  99. - export GOOS=linux
  100. - export GOARCH=amd64
  101. - export NIGHTLY=true
  102. - export FIPS=true
  103. - export ORIGINAL_NAME=true
  104. - make cloudflared-deb
  105. build-internal-deb-nightly-arm64:
  106. build_dir: *build_dir
  107. builddeps: *build_fips_deb_deps
  108. post-cache:
  109. - export GOOS=linux
  110. - export GOARCH=arm64
  111. - export NIGHTLY=true
  112. #- export FIPS=true # TUN-7595
  113. - export ORIGINAL_NAME=true
  114. - make cloudflared-deb
  115. build-deb-arm64:
  116. build_dir: *build_dir
  117. builddeps: *build_deb_deps
  118. post-cache:
  119. - export GOOS=linux
  120. - export GOARCH=arm64
  121. - make cloudflared-deb
  122. package-windows:
  123. build_dir: *build_dir
  124. builddeps:
  125. - *pinned_go
  126. - build-essential
  127. - python3-dev
  128. - libffi-dev
  129. - python3-setuptools
  130. - python3-pip
  131. - wget
  132. # libmsi and libgcab are libraries the wixl binary depends on.
  133. - libmsi-dev
  134. - libgcab-dev
  135. pre-cache:
  136. - wget https://github.com/sudarshan-reddy/msitools/releases/download/v0.101b/wixl -P /usr/local/bin
  137. - chmod a+x /usr/local/bin/wixl
  138. - pip3 install pynacl==1.4.0
  139. - pip3 install pygithub==1.55
  140. post-cache:
  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.7
  175. - python3-pip
  176. - python3-setuptools
  177. # procps installs the ps command which is needed in test_sysv_service because the init script
  178. # uses ps pid to determine if the agent is running
  179. - procps
  180. pre-cache-copy-paths:
  181. - component-tests/requirements.txt
  182. pre-cache: &component_test_pre_cache
  183. - sudo pip3 install --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 config file from env vars.
  186. - python3 component-tests/setup.py --type create
  187. - pytest component-tests -o log_cli=true --log-cli-level=INFO
  188. # The Named Tunnel is deleted and its route unprovisioned here.
  189. - python3 component-tests/setup.py --type cleanup
  190. component-test-fips:
  191. build_dir: *build_dir
  192. builddeps: *build_deps_component_test
  193. pre-cache-copy-paths:
  194. - component-tests/requirements.txt
  195. pre-cache: *component_test_pre_cache
  196. post-cache: *component_test_post_cache
  197. github-release-dryrun:
  198. build_dir: *build_dir
  199. builddeps:
  200. - *pinned_go
  201. - build-essential
  202. - python3-dev
  203. - libffi-dev
  204. - python3-setuptools
  205. - python3-pip
  206. pre-cache:
  207. - pip3 install pynacl==1.4.0
  208. - pip3 install 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. - pip3 install pynacl==1.4.0
  222. - pip3 install pygithub==1.55
  223. post-cache:
  224. - make github-release
  225. r2-linux-release:
  226. build_dir: *build_dir
  227. builddeps:
  228. - *pinned_go
  229. - build-essential
  230. - fakeroot
  231. - rubygem-fpm
  232. - rpm
  233. - wget
  234. - python3-dev
  235. - libffi-dev
  236. - python3-setuptools
  237. - python3-pip
  238. - reprepro
  239. - createrepo
  240. pre-cache:
  241. - pip3 install pynacl==1.4.0
  242. - pip3 install pygithub==1.55
  243. - pip3 install boto3==1.22.9
  244. - pip3 install python-gnupg==0.4.9
  245. post-cache:
  246. - make r2-linux-release
  247. bullseye: *buster
  248. bookworm: *buster