cloudflare/cloudflared
Publicmirrored from https://github.com/cloudflare/cloudflaredAvailable
cfsetup.yaml
253lines · modeblame
12dd91adChung-Ting2 years ago | 1 | pinned_go: &pinned_go go-boring=1.21.5-1 |
88b53eb8Areg Harutyunyan5 years ago | 2 | |
e5335b6cNick Vollmar6 years ago | 3 | build_dir: &build_dir /cfsetup_build |
7a9207a6Opeyemi Onikute3 years ago | 4 | default-flavor: bullseye |
c7f343a3Devin Carr3 years ago | 5 | buster: &buster |
cefcb79bChung-Ting Huang7 years ago | 6 | build: |
| 7 | build_dir: *build_dir | |
515ad7cbDevin Carr3 years ago | 8 | builddeps: &build_deps |
70e675f4Nuno Diegues4 years ago | 9 | - *pinned_go |
cefcb79bChung-Ting Huang7 years ago | 10 | - build-essential |
515ad7cbDevin Carr3 years ago | 11 | - gotest-to-teamcity |
cf5be91dchungthuang2 years ago | 12 | - fakeroot |
| 13 | - rubygem-fpm | |
| 14 | - rpm | |
| 15 | - libffi-dev | |
| 16 | - reprepro | |
| 17 | - createrepo | |
515ad7cbDevin Carr3 years ago | 18 | pre-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 ago | 21 | post-cache: |
cf5be91dchungthuang2 years ago | 22 | # 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 ago | 26 | build-fips: |
c51879b1Nuno Diegues4 years ago | 27 | build_dir: *build_dir |
12dd91adChung-Ting2 years ago | 28 | builddeps: *build_deps |
515ad7cbDevin Carr3 years ago | 29 | pre-cache: *build_pre_cache |
c51879b1Nuno Diegues4 years ago | 30 | post-cache: |
12dd91adChung-Ting2 years ago | 31 | - export FIPS=true |
cf5be91dchungthuang2 years ago | 32 | # 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 ago | 36 | cover: |
| 37 | build_dir: *build_dir | |
| 38 | builddeps: *build_deps | |
| 39 | pre-cache: *build_pre_cache | |
| 40 | post-cache: | |
| 41 | - make cover | |
70e675f4Nuno Diegues4 years ago | 42 | # except FIPS (handled in github-fips-release-pkgs) and macos (handled in github-release-macos-amd64) |
| 43 | github-release-pkgs: | |
dff694b2Sudarsan Reddy4 years ago | 44 | build_dir: *build_dir |
| 45 | builddeps: | |
70e675f4Nuno Diegues4 years ago | 46 | - *pinned_go |
dff694b2Sudarsan Reddy4 years ago | 47 | - 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 ago | 55 | - python3-dev |
| 56 | - libffi-dev | |
| 57 | - python3-setuptools | |
| 58 | - python3-pip | |
4b6437ccSudarsan Reddy4 years ago | 59 | - reprepro |
| 60 | - createrepo | |
70e675f4Nuno Diegues4 years ago | 61 | pre-cache: &github_release_pkgs_pre_cache |
dff694b2Sudarsan Reddy4 years ago | 62 | - 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 ago | 64 | - pip3 install pynacl==1.4.0 |
| 65 | - pip3 install pygithub==1.55 | |
4b6437ccSudarsan Reddy4 years ago | 66 | - pip3 install boto3==1.22.9 |
32739e9fSudarsan Reddy4 years ago | 67 | - pip3 install python-gnupg==0.4.9 |
dff694b2Sudarsan Reddy4 years ago | 68 | post-cache: |
70e675f4Nuno Diegues4 years ago | 69 | # build all packages (except macos and FIPS) and move them to /cfsetup/built_artifacts |
dff694b2Sudarsan Reddy4 years ago | 70 | - ./build-packages.sh |
70e675f4Nuno Diegues4 years ago | 71 | # release the packages built and moved to /cfsetup/built_artifacts |
| 72 | - make github-release-built-pkgs | |
92f647d4Sudarsan Reddy4 years ago | 73 | # publish packages to linux repos |
| 74 | - make release-pkgs-linux | |
70e675f4Nuno Diegues4 years ago | 75 | # handle FIPS separately so that we built with gofips compiler |
| 76 | github-fips-release-pkgs: | |
bd8af7d8Sudarsan Reddy4 years ago | 77 | build_dir: *build_dir |
| 78 | builddeps: | |
12dd91adChung-Ting2 years ago | 79 | - *pinned_go |
bd8af7d8Sudarsan Reddy4 years ago | 80 | - 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 ago | 88 | - python3-dev |
| 89 | - libffi-dev | |
bd8af7d8Sudarsan Reddy4 years ago | 90 | - python3-setuptools |
| 91 | - python3-pip | |
70e675f4Nuno Diegues4 years ago | 92 | pre-cache: *github_release_pkgs_pre_cache |
bd8af7d8Sudarsan Reddy4 years ago | 93 | post-cache: |
70e675f4Nuno Diegues4 years ago | 94 | # same logic as above, but for FIPS packages only |
| 95 | - ./build-packages-fips.sh | |
bd8af7d8Sudarsan Reddy4 years ago | 96 | - make github-release-built-pkgs |
e89bcecaSudarsan Reddy3 years ago | 97 | generate-versions-file: |
| 98 | build_dir: *build_dir | |
| 99 | builddeps: | |
442af9eeSudarsan Reddy3 years ago | 100 | - *pinned_go |
e89bcecaSudarsan Reddy3 years ago | 101 | - build-essential |
| 102 | post-cache: | |
| 103 | - make generate-docker-version | |
0c414cebChung-Ting Huang7 years ago | 104 | build-deb: |
| 105 | build_dir: *build_dir | |
6e45e0d5cthuang4 years ago | 106 | builddeps: &build_deb_deps |
70e675f4Nuno Diegues4 years ago | 107 | - *pinned_go |
| 108 | - build-essential | |
| 109 | - fakeroot | |
| 110 | - rubygem-fpm | |
| 111 | post-cache: | |
| 112 | - export GOOS=linux | |
| 113 | - export GOARCH=amd64 | |
| 114 | - make cloudflared-deb | |
01ad2785Nuno Diegues4 years ago | 115 | build-fips-internal-deb: |
70e675f4Nuno Diegues4 years ago | 116 | build_dir: *build_dir |
01ad2785Nuno Diegues4 years ago | 117 | builddeps: &build_fips_deb_deps |
12dd91adChung-Ting2 years ago | 118 | - *pinned_go |
0c414cebChung-Ting Huang7 years ago | 119 | - build-essential |
| 120 | - fakeroot | |
| 121 | - rubygem-fpm | |
| 122 | post-cache: | |
| 123 | - export GOOS=linux | |
| 124 | - export GOARCH=amd64 | |
88b53eb8Areg Harutyunyan5 years ago | 125 | - export FIPS=true |
ead93e9fNuno Diegues4 years ago | 126 | - export ORIGINAL_NAME=true |
| 127 | - make cloudflared-deb | |
2084a123Devin Carr2 years ago | 128 | build-internal-deb-nightly-amd64: |
6e45e0d5cthuang4 years ago | 129 | build_dir: *build_dir |
01ad2785Nuno Diegues4 years ago | 130 | builddeps: *build_fips_deb_deps |
6e45e0d5cthuang4 years ago | 131 | post-cache: |
| 132 | - export GOOS=linux | |
| 133 | - export GOARCH=amd64 | |
| 134 | - export NIGHTLY=true | |
01ad2785Nuno Diegues4 years ago | 135 | - export FIPS=true |
ead93e9fNuno Diegues4 years ago | 136 | - export ORIGINAL_NAME=true |
| 137 | - make cloudflared-deb | |
2084a123Devin Carr2 years ago | 138 | build-internal-deb-nightly-arm64: |
| 139 | build_dir: *build_dir | |
| 140 | builddeps: *build_fips_deb_deps | |
| 141 | post-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 ago | 148 | build-deb-arm64: |
| 149 | build_dir: *build_dir | |
6e45e0d5cthuang4 years ago | 150 | builddeps: *build_deb_deps |
6274567eIvan Babrou5 years ago | 151 | post-cache: |
| 152 | - export GOOS=linux | |
| 153 | - export GOARCH=arm64 | |
| 154 | - make cloudflared-deb | |
b698fe5eDalton5 years ago | 155 | github-release-macos-amd64: |
| 156 | build_dir: *build_dir | |
b0f0741aDevin Carr3 years ago | 157 | builddeps: &build_pygithub |
b698fe5eDalton5 years ago | 158 | - *pinned_go |
d9636c73Nuno Diegues4 years ago | 159 | - build-essential |
| 160 | - python3-dev | |
| 161 | - libffi-dev | |
b698fe5eDalton5 years ago | 162 | - python3-setuptools |
| 163 | - python3-pip | |
cd4af569Sudarsan Reddy4 years ago | 164 | pre-cache: &install_pygithub |
0292727acthuang4 years ago | 165 | - pip3 install pynacl==1.4.0 |
| 166 | - pip3 install pygithub==1.55 | |
b698fe5eDalton5 years ago | 167 | post-cache: |
| 168 | - make github-mac-upload | |
b0f0741aDevin Carr3 years ago | 169 | github-release-windows: |
| 170 | build_dir: *build_dir | |
| 171 | builddeps: | |
| 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 | |
| 182 | pre-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 | |
| 187 | post-cache: | |
| 188 | - .teamcity/package-windows.sh | |
| 189 | - make github-windows-upload | |
0c414cebChung-Ting Huang7 years ago | 190 | test: |
| 191 | build_dir: *build_dir | |
515ad7cbDevin Carr3 years ago | 192 | builddeps: *build_deps |
| 193 | pre-cache: *build_pre_cache | |
0c414cebChung-Ting Huang7 years ago | 194 | post-cache: |
| 195 | - export GOOS=linux | |
| 196 | - export GOARCH=amd64 | |
70e675f4Nuno Diegues4 years ago | 197 | - export PATH="$HOME/go/bin:$PATH" |
| 198 | - ./fmt-check.sh | |
| 199 | - make test | gotest-to-teamcity | |
| 200 | test-fips: | |
| 201 | build_dir: *build_dir | |
12dd91adChung-Ting2 years ago | 202 | builddeps: *build_deps |
515ad7cbDevin Carr3 years ago | 203 | pre-cache: *build_pre_cache |
70e675f4Nuno Diegues4 years ago | 204 | post-cache: |
| 205 | - export GOOS=linux | |
| 206 | - export GOARCH=amd64 | |
88b53eb8Areg Harutyunyan5 years ago | 207 | - export FIPS=true |
e5335b6cNick Vollmar6 years ago | 208 | - export PATH="$HOME/go/bin:$PATH" |
da4d0b2bIgor Postelnik5 years ago | 209 | - ./fmt-check.sh |
a278753bAdam Chalmers5 years ago | 210 | - make test | gotest-to-teamcity |
4481b9e4cthuang5 years ago | 211 | component-test: |
| 212 | build_dir: *build_dir | |
| 213 | builddeps: | |
d7fb18beDevin Carr3 years ago | 214 | - *pinned_go |
4481b9e4cthuang5 years ago | 215 | - python3.7 |
| 216 | - python3-pip | |
| 217 | - python3-setuptools | |
9df60276cthuang5 years ago | 218 | # 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 ago | 221 | pre-cache-copy-paths: |
| 222 | - component-tests/requirements.txt | |
d7fb18beDevin Carr3 years ago | 223 | pre-cache: &component_test_pre_cache |
4481b9e4cthuang5 years ago | 224 | - sudo pip3 install --upgrade -r component-tests/requirements.txt |
d7fb18beDevin Carr3 years ago | 225 | post-cache: &component_test_post_cache |
9d3a7bd0Nuno Diegues5 years ago | 226 | # 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 ago | 228 | - pytest component-tests -o log_cli=true --log-cli-level=INFO |
9d3a7bd0Nuno Diegues5 years ago | 229 | # The Named Tunnel is deleted and its route unprovisioned here. |
| 230 | - python3 component-tests/setup.py --type cleanup | |
d7fb18beDevin Carr3 years ago | 231 | component-test-fips: |
| 232 | build_dir: *build_dir | |
| 233 | builddeps: | |
12dd91adChung-Ting2 years ago | 234 | - *pinned_go |
d7fb18beDevin Carr3 years ago | 235 | - 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 | |
| 241 | pre-cache-copy-paths: | |
| 242 | - component-tests/requirements.txt | |
| 243 | pre-cache: *component_test_pre_cache | |
| 244 | post-cache: *component_test_post_cache | |
5b3b5921Dalton5 years ago | 245 | github-message-release: |
| 246 | build_dir: *build_dir | |
b0f0741aDevin Carr3 years ago | 247 | builddeps: *build_pygithub |
20623255Michael Borkenstein5 years ago | 248 | pre-cache: *install_pygithub |
5b3b5921Dalton5 years ago | 249 | post-cache: |
| 250 | - make github-message | |
72412db4Austin Cherry7 years ago | 251 | |
c7f343a3Devin Carr3 years ago | 252 | bullseye: *buster |
| 253 | bookworm: *buster |