|
| 1 | +variables: |
| 2 | + |
| 3 | +functions: |
| 4 | + |
| 5 | + "clone": |
| 6 | + - command: subprocess.exec |
| 7 | + type: setup |
| 8 | + params: |
| 9 | + command: "mkdir -p src/github.com/mongodb" |
| 10 | + - command: git.get_project |
| 11 | + type: setup |
| 12 | + params: |
| 13 | + directory: src/github.com/mongodb/mongodb-enterprise-kubernetes |
| 14 | + |
| 15 | + "install goreleaser": |
| 16 | + - command: shell.exec |
| 17 | + type: setup |
| 18 | + include_expansions_in_env: |
| 19 | + - goreleaser_pro_tar_gz |
| 20 | + params: |
| 21 | + script: | |
| 22 | + set -Eeu pipefail |
| 23 | + |
| 24 | + curl -fL "${goreleaser_pro_tar_gz}" --output goreleaser_Linux_x86_64.tar.gz |
| 25 | + tar -xf goreleaser_Linux_x86_64.tar.gz |
| 26 | + chmod 755 ./goreleaser |
| 27 | +
|
| 28 | + "install macos notarization service": |
| 29 | + - command: shell.exec |
| 30 | + type: setup |
| 31 | + params: |
| 32 | + include_expansions_in_env: |
| 33 | + - notary_service_url |
| 34 | + script: | |
| 35 | + set -Eeu pipefail |
| 36 | + |
| 37 | + curl "${notary_service_url}" --output macos-notary.zip |
| 38 | + unzip -u macos-notary.zip |
| 39 | + chmod 755 ./linux_amd64/macnotary |
| 40 | + "release": |
| 41 | + - command: shell.exec |
| 42 | + type: setup |
| 43 | + params: |
| 44 | + working_dir: src/github.com/mongodb/mongodb-enterprise-kubernetes/tools/multicluster |
| 45 | + add_to_path: |
| 46 | + - src/github.com/mongodb/tools |
| 47 | + - src/github.com/mongodb/tools/linux_amd64 |
| 48 | + include_expansions_in_env: |
| 49 | + - GITHUB_TOKEN |
| 50 | + - macos_notary_keyid |
| 51 | + - macos_notary_secret |
| 52 | + - workdir |
| 53 | + env: |
| 54 | + MACOS_NOTARY_KEY: ${macos_notary_keyid} |
| 55 | + MACOS_NOTARY_SECRET: ${macos_notary_secret} |
| 56 | + script: | |
| 57 | + set -Eeu pipefail |
| 58 | + |
| 59 | + ${workdir}/goreleaser release |
| 60 | +
|
| 61 | +tasks: |
| 62 | + - name: package_goreleaser |
| 63 | + tags: ["packaging"] |
| 64 | + commands: |
| 65 | + - func: "clone" |
| 66 | + - func: "install goreleaser" |
| 67 | + - func: "install macos notarization service" |
| 68 | + - func: "release" |
| 69 | + |
| 70 | +buildvariants: |
| 71 | + |
| 72 | +# This variant is kept manual for now in order avoid any interfering with the existing release process. |
| 73 | +# In the future, it will be called in one of two ways: |
| 74 | +# By PCT when a new operator version is released. |
| 75 | +# When a new tag is out similarly to github actions. |
| 76 | +- name: release_mcli |
| 77 | + display_name: Release Go multi-cluster binary |
| 78 | + run_on: |
| 79 | + - ubuntu2204-small |
| 80 | + tasks: |
| 81 | + - name: package_goreleaser |
0 commit comments