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