@@ -29,17 +29,17 @@ functions:
29
29
sudo dnf install -y gh
30
30
31
31
" trace release artifacts " :
32
- - command : shell.exec
32
+ - command : shell.exec
33
33
params :
34
- working_dir : /tmp
34
+ working_dir : /tmp
35
35
script : |
36
36
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
37
37
sudo dnf install -y gh
38
38
39
39
- command : git.get_project
40
40
params :
41
41
directory : src/github.com/mongodb/terraform-provider-mongodbatlas
42
-
42
+
43
43
- command : shell.exec
44
44
params :
45
45
working_dir : " src/github.com/mongodb/terraform-provider-mongodbatlas"
@@ -60,12 +60,13 @@ functions:
60
60
61
61
# get the latest release workflow run
62
62
run_id=$(gh run list --workflow release.yml --branch master --limit 1 --json databaseId --jq '.[0].databaseId')
63
- run_json=$(gh run view "$run_id" --json name,jobs)
63
+ run_json=$(gh run view "$run_id" --json name,jobs,actor )
64
64
65
65
conclusion=$(jq -r '.jobs[] | select(.name=="release") | .conclusion' <<<"$run_json")
66
66
version=$(jq -r '.name | match("v[0-9]+\\.[0-9]+\\.[0-9]+") | .string' <<<"$run_json")
67
+ author=$(jq -r '.actor.login' <<<"$run_json")
67
68
68
- echo "conclusion=$conclusion version=$version"
69
+ echo "conclusion=$conclusion version=$version author=$author "
69
70
70
71
# checking the latest tag version (that triggered this task) matches the version in the release workflow run name
71
72
if [[ "$version" != "$release_tag" ]]; then
@@ -107,34 +108,31 @@ functions:
107
108
108
109
cat >trace-expansions.yml <<EOF
109
110
release_version: "$version"
111
+ release_author: "$author"
110
112
EOF
111
113
112
114
echo "✅ Done."
113
115
114
-
115
-
116
116
- command : expansions.update
117
117
params :
118
118
file : src/github.com/mongodb/terraform-provider-mongodbatlas/trace-expansions.yml
119
-
119
+
120
120
- command : papertrail.trace
121
121
params :
122
122
key_id : ${papertrail_key_id}
123
123
secret_key : ${papertrail_secret_key}
124
124
product : " tmp2-terraform-provider-mongodbatlas"
125
125
version : ${release_version}
126
- submitter : " svc-apix-Bot "
126
+ submitter : " ${release_author} "
127
127
filenames :
128
128
- " src/github.com/mongodb/terraform-provider-mongodbatlas/release_artifacts/*.zip"
129
129
130
-
131
130
tasks :
132
131
- name : trace_release_artifacts
133
132
tags : ["release"]
134
133
commands :
135
134
- func : " trace release artifacts"
136
135
137
-
138
136
buildvariants :
139
137
- name : papertrail_github_release
140
138
display_name : " Papertrail - GitHub Release Artifacts"
0 commit comments