1
+ # # Testing changes to this file
2
+ #
3
+ # You'll need to know the git tag of the most recent release; call that ${TAG}.
4
+ #
5
+ # The simplest way is to develop changes as a branch from the most recent release;
6
+ # in that case, a release dry-run can be executed via:
7
+ #
8
+ # evergreen patch --path .evergreen/releases.yml \
9
+ # -t publish-release -v all \
10
+ # -p mongo-rust-driver-current \
11
+ # -u --browse \
12
+ # --param triggered_by_git_tag=${TAG} \
13
+ # --param DRY_RUN=yes
14
+ #
15
+ # If the changes need to be developed against the main branch, more steps are needed:
16
+ #
17
+ # 1. Add dummy version numbers to the Cargo.toml lines for action_macro, bson, and libmongocrypt
18
+ # 2. Comment out the "fetch tag" func call from the "publish-release" task in this file
19
+ # 3. Execute:
20
+ #
21
+ # evergreen patch --path .evergreen/releases.yml \
22
+ # -t publish-release -v all \
23
+ # -p mongo-rust-driver \
24
+ # -u --browse \
25
+ # --param triggered_by_git_tag=${TAG} \
26
+ # --param DRY_RUN=yes \
27
+ # --param PACKAGE_ONLY=yes
28
+ #
29
+ # Make sure to remove the changes from 1 and 2 before merging!
30
+
31
+
1
32
exec_timeout_secs : 3600
2
33
3
34
functions :
@@ -12,9 +43,12 @@ functions:
12
43
working_dir : " src"
13
44
script : |
14
45
export PROJECT_DIRECTORY="$(pwd)"
46
+ export DRIVERS_TOOLS="$(pwd)/../drivers-tools"
15
47
16
48
cat <<EOT > expansion.yml
49
+ DRIVERS_TOOLS: "$DRIVERS_TOOLS"
17
50
PROJECT_DIRECTORY: "$PROJECT_DIRECTORY"
51
+ GIT_TAG: "${triggered_by_git_tag}"
18
52
PREPARE_SHELL: |
19
53
set -o errexit
20
54
set -o xtrace
@@ -40,45 +74,82 @@ functions:
40
74
rm expansion.yml
41
75
42
76
" install dependencies " :
43
- command : shell.exec
44
- params :
45
- working_dir : " src"
46
- script : |
47
- ${PREPARE_SHELL}
48
- .evergreen/install-dependencies.sh rust
77
+ - command : shell.exec
78
+ params :
79
+ working_dir : " src"
80
+ script : |
81
+ ${PREPARE_SHELL}
82
+ .evergreen/install-dependencies.sh rust
83
+
84
+ - command : subprocess.exec
85
+ params :
86
+ working_dir : src
87
+ include_expansions_in_env :
88
+ - DRIVERS_TOOLS
89
+ binary : bash
90
+ args :
91
+ - .evergreen/fetch-drivers-tools.sh
92
+
93
+ " build papertrail vars " :
94
+ - command : subprocess.exec
95
+ params :
96
+ working_dir : src
97
+ include_expansions_in_env :
98
+ - DRIVERS_TOOLS
99
+ - DRY_RUN
100
+ - GIT_TAG
101
+ binary : bash
102
+ args :
103
+ - .evergreen/release-build-papertrail-vars.sh
104
+
105
+ - command : expansions.update
106
+ params :
107
+ file : src/papertrail-expansion.yml
108
+
109
+ - command : shell.exec
110
+ params :
111
+ working_dir : " src"
112
+ script : rm papertrail-expansion.yml
49
113
50
114
" fetch tag " :
51
115
command : subprocess.exec
52
116
params :
53
117
working_dir : " src"
54
- add_expansions_to_env : true
118
+ include_expansions_in_env :
119
+ - GIT_TAG
55
120
binary : bash
56
121
args :
57
122
- .evergreen/release-fetch-tag.sh
58
123
59
124
" publish release " :
60
- - command : shell .exec
125
+ - command : subprocess .exec
61
126
type : test
62
127
params :
63
128
working_dir : " src"
64
- script : |
65
- set +x
129
+ add_expansions_to_env : true
130
+ binary : bash
131
+ args :
132
+ - .evergreen/release-danger-do-not-run-manually.sh
66
133
67
- TAG=${GIT_TAG} \
68
- TOKEN=${CRATES_IO_TOKEN} \
69
- DRY_RUN=${DRY_RUN} \
70
- PROJECT_DIRECTORY="$(pwd)" \
71
- bash .evergreen/release-danger-do-not-run-manually.sh
134
+ " publish papertrail " :
135
+ - command : papertrail.trace
136
+ params :
137
+ key_id : ${PAPERTRAIL_KEY_ID}
138
+ secret_key : ${PAPERTRAIL_SECRET_KEY}
139
+ product : ${PAPERTRAIL_PRODUCT}
140
+ version : ${GIT_TAG}
141
+ filenames :
142
+ - src/target/package/mongodb-*.crate
72
143
73
144
tasks :
74
145
- name : " publish-release"
75
146
commands :
76
147
- func : " fetch source"
77
148
- func : " install dependencies"
78
149
- func : " fetch tag"
79
- vars :
80
- GIT_TAG : ${triggered_by_git_tag}
150
+ - func : " build papertrail vars"
81
151
- func : " publish release"
152
+ - func : " publish papertrail"
82
153
83
154
axes :
84
155
- id : " os"
0 commit comments