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