Skip to content

Commit a4b1d2c

Browse files
authored
chore: Test changes for Papertrail (#3477)
1 parent d5ea3ae commit a4b1d2c

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

build/ci/papertrail.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ functions:
2929
sudo dnf install -y gh
3030
3131
"trace release artifacts":
32-
- command: shell.exec
32+
- command: shell.exec
3333
params:
34-
working_dir: /tmp
34+
working_dir: /tmp
3535
script: |
3636
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
3737
sudo dnf install -y gh
3838
3939
- command: git.get_project
4040
params:
4141
directory: src/github.com/mongodb/terraform-provider-mongodbatlas
42-
42+
4343
- command: shell.exec
4444
params:
4545
working_dir: "src/github.com/mongodb/terraform-provider-mongodbatlas"
@@ -60,12 +60,13 @@ functions:
6060
6161
# get the latest release workflow run
6262
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)
6464
6565
conclusion=$(jq -r '.jobs[] | select(.name=="release") | .conclusion' <<<"$run_json")
6666
version=$(jq -r '.name | match("v[0-9]+\\.[0-9]+\\.[0-9]+") | .string' <<<"$run_json")
67+
author=$(jq -r '.actor.login' <<<"$run_json")
6768
68-
echo "conclusion=$conclusion version=$version"
69+
echo "conclusion=$conclusion version=$version author=$author"
6970
7071
# checking the latest tag version (that triggered this task) matches the version in the release workflow run name
7172
if [[ "$version" != "$release_tag" ]]; then
@@ -107,34 +108,31 @@ functions:
107108
108109
cat >trace-expansions.yml <<EOF
109110
release_version: "$version"
111+
release_author: "$author"
110112
EOF
111113
112114
echo "✅ Done."
113115
114-
115-
116116
- command: expansions.update
117117
params:
118118
file: src/github.com/mongodb/terraform-provider-mongodbatlas/trace-expansions.yml
119-
119+
120120
- command: papertrail.trace
121121
params:
122122
key_id: ${papertrail_key_id}
123123
secret_key: ${papertrail_secret_key}
124124
product: "tmp2-terraform-provider-mongodbatlas"
125125
version: ${release_version}
126-
submitter: "svc-apix-Bot"
126+
submitter: "${release_author}"
127127
filenames:
128128
- "src/github.com/mongodb/terraform-provider-mongodbatlas/release_artifacts/*.zip"
129129

130-
131130
tasks:
132131
- name: trace_release_artifacts
133132
tags: ["release"]
134133
commands:
135134
- func: "trace release artifacts"
136135

137-
138136
buildvariants:
139137
- name: papertrail_github_release
140138
display_name: "Papertrail - GitHub Release Artifacts"

0 commit comments

Comments
 (0)