-
Notifications
You must be signed in to change notification settings - Fork 128
/
.evergreen.yml
87 lines (81 loc) · 2.47 KB
/
.evergreen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
variables:
- &go_env
XDG_CONFIG_HOME: ${go_base_path}${workdir}
GO111MODULE: "on"
GOROOT: "/opt/golang/go1.22"
functions:
"clone":
- command: subprocess.exec
type: setup
params:
command: "mkdir -p src/github.com/mongodb"
- command: git.get_project
type: setup
params:
directory: src/github.com/mongodb/mongodb-enterprise-kubernetes
"install goreleaser":
- command: shell.exec
type: setup
include_expansions_in_env:
- goreleaser_pro_tar_gz
params:
script: |
set -Eeu pipefail
curl -fL "${goreleaser_pro_tar_gz}" --output goreleaser_Linux_x86_64.tar.gz
tar -xf goreleaser_Linux_x86_64.tar.gz
chmod 755 ./goreleaser
"install macos notarization service":
- command: shell.exec
type: setup
params:
include_expansions_in_env:
- notary_service_url
script: |
set -Eeu pipefail
curl "${notary_service_url}" --output macos-notary.zip
unzip -u macos-notary.zip
chmod 755 ./linux_amd64/macnotary
"release":
- command: shell.exec
type: setup
params:
working_dir: src/github.com/mongodb/mongodb-enterprise-kubernetes/tools/multicluster
include_expansions_in_env:
- GITHUB_TOKEN
- GRS_USERNAME
- GRS_PASSWORD
- PKCS11_URI
- ARTIFACTORY_URL
- ARTIFACTORY_PASSWORD
- SIGNING_IMAGE_URI
- macos_notary_keyid
- macos_notary_secret
- workdir
- triggered_by_git_tag
env:
<<: *go_env
MACOS_NOTARY_KEY: ${macos_notary_keyid}
MACOS_NOTARY_SECRET: ${macos_notary_secret}
GORELEASER_CURRENT_TAG: ${triggered_by_git_tag}
# shell.exec EVG Task doesn't have add_to_path, so we need to explicitly add the path export below.
script: |
set -Eeu pipefail
export PATH=$GOROOT/bin:$PATH
${workdir}/goreleaser release --rm-dist
tasks:
- name: package_goreleaser
git_tag_only: true
tags: ["packaging"]
commands:
- func: "clone"
- func: "install goreleaser"
- func: "install macos notarization service"
- func: "release"
buildvariants:
# This variant is run when a new tag is out similar to github actions.
- name: release_mcli
display_name: Release Go multi-cluster binary
run_on:
- ubuntu2204-small
tasks:
- name: package_goreleaser