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