File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
scaletest/templates/scaletest-runner Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,16 @@ data "coder_parameter" "repo_branch" {
84
84
mutable = true
85
85
}
86
86
87
+ data "coder_parameter" "comment" {
88
+ order = 4
89
+ type = " string"
90
+ name = " Comment"
91
+ default = " "
92
+ description = " Describe **what** you're testing and **why** you're testing it."
93
+ mutable = true
94
+ ephemeral = true
95
+ }
96
+
87
97
data "coder_parameter" "create_concurrency" {
88
98
order = 10
89
99
type = " number"
@@ -365,6 +375,10 @@ resource "coder_agent" "main" {
365
375
SCALETEST_RUN_ID : local.scaletest_run_id,
366
376
SCALETEST_RUN_DIR : local.scaletest_run_dir,
367
377
378
+ # Comment is a scaletest param, but we want to surface it separately from
379
+ # the rest, so we use a different name.
380
+ SCALETEST_COMMENT : data.coder_parameter.comment.value != " " ? data.coder_parameter.comment.value : " No comment provided" ,
381
+
368
382
SCALETEST_PARAM_TEMPLATE : data.coder_parameter.workspace_template.value,
369
383
SCALETEST_PARAM_REPO_BRANCH : data.coder_parameter.repo_branch.value,
370
384
SCALETEST_PARAM_NUM_WORKSPACES : data.coder_parameter.num_workspaces.value,
Original file line number Diff line number Diff line change 80
80
text_arr=(
81
81
" ${header} "
82
82
" "
83
+ " ${bullet} *Comment:* ${SCALETEST_COMMENT} "
83
84
" ${bullet} Workspace (runner): ${CODER_URL} /@${owner_name} /${workspace_name} "
84
85
" ${bullet} Run ID: ${SCALETEST_RUN_ID} "
85
86
" ${app_urls[@]} "
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ if [[ ! -d "${HOME}/coder" ]]; then
18
18
fi
19
19
(cd " ${HOME} /coder" && git fetch -a && git checkout " ${SCALETEST_PARAM_REPO_BRANCH} " && git pull)
20
20
21
+ # Store the input parameters (for debugging).
22
+ env | grep " ^SCALETEST_" | sort > " ${SCALETEST_RUN_DIR} /environ.txt"
23
+
21
24
# shellcheck disable=SC2153 source=scaletest/templates/scaletest-runner/scripts/lib.sh
22
25
. " ${SCRIPTS_DIR} /lib.sh"
23
26
@@ -101,7 +104,7 @@ on_exit() {
101
104
102
105
set_appearance " ${appearance_json} " " ${message_color} " " ${service_banner_message} | Scaletest ${message_status} : [${CODER_USER} /${CODER_WORKSPACE} ](${CODER_URL} /@${CODER_USER} /${CODER_WORKSPACE} )!"
103
106
104
- annotate_grafana_end " " " Start scaletest"
107
+ annotate_grafana_end " " " Start scaletest: ${SCALETEST_COMMENT} "
105
108
}
106
109
trap on_exit EXIT
107
110
@@ -121,7 +124,7 @@ trap on_err ERR
121
124
122
125
# Pass session token since `prepare.sh` has not yet run.
123
126
CODER_SESSION_TOKEN=$CODER_USER_TOKEN " ${SCRIPTS_DIR} /report.sh" started
124
- annotate_grafana " " " Start scaletest"
127
+ annotate_grafana " " " Start scaletest: ${SCALETEST_COMMENT} "
125
128
126
129
" ${SCRIPTS_DIR} /prepare.sh"
127
130
You can’t perform that action at this time.
0 commit comments