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