Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ Important:

By default the plugin will not follow symlinked folders, set this option to `true` to do so. This will add the `-L` option to the `find` command used to get the files to upload.

#### `job-id` (string)

The buildkite job id for which the results should be linked to. Defaults to the current job.

#### `missing-error` (integer)

Exit code of the hook when no files are found to upload as long as the step's command has not failed already.
Expand Down Expand Up @@ -153,7 +157,7 @@ You can also use build artifacts generated in a previous step:

```yaml
steps:
# Run tests and upload
# Run tests and upload
- label: "🔨 Test"
command: "make test --junit=tests-N.xml"
artifact_paths: "tests-*.xml"
Expand Down
3 changes: 2 additions & 1 deletion hooks/pre-exit
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ TIMEOUT="${BUILDKITE_PLUGIN_TEST_COLLECTOR_TIMEOUT:-30}"
BASE_PATH="${BUILDKITE_PLUGIN_TEST_COLLECTOR_BASE_PATH:-.}"
ANNOTATE="${BUILDKITE_PLUGIN_TEST_COLLECTOR_ANNOTATION_LINK:-false}"
UPLOAD_CONCURRENCY="${BUILDKITE_PLUGIN_TEST_COLLECTOR_UPLOAD_CONCURRENCY:-1}"
JOB_ID="${BUILDKITE_PLUGIN_TEST_COLLECTOR_JOB_ID:-$BUILDKITE_JOB_ID}"
REPORT_URLS_FILE=$(mktemp)
CURL_RESP_FILE="${CURL_RESP_FILE:-}"
DEBUG="false"
Expand Down Expand Up @@ -126,7 +127,7 @@ upload() {
"--form" "run_env[branch]=\"$BUILDKITE_BRANCH\""
"--form" "run_env[commit_sha]=\"$BUILDKITE_COMMIT\""
"--form" "run_env[number]=\"$BUILDKITE_BUILD_NUMBER\""
"--form" "run_env[job_id]=\"$BUILDKITE_JOB_ID\""
"--form" "run_env[job_id]=\"$JOB_ID\""
"--form" "run_env[message]=\"$BUILDKITE_MESSAGE\""
"--form" "run_env[collector]=test-collector-buildkite-plugin"
)
Expand Down
2 changes: 2 additions & 0 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ configuration:
enum:
- json
- junit
job-id:
type: string
missing-error:
type: integer
timeout:
Expand Down