Git Product home page Git Product logo

junit-annotate-buildkite-plugin's Introduction

JUnit Annotate Buildkite Plugin Build status

A Buildkite plugin that parses junit.xml artifacts (generated across any number of parallel steps) and creates a build annotation listing the individual tests that failed.

Example

The following pipeline will run test.sh jobs in parallel, and then process all the resulting JUnit XML files to create a summary build annotation.

steps:
  - command: test.sh
    parallelism: 50
    artifact_paths: tmp/junit-*.xml
  - wait: ~
    continue_on_failure: true
  - plugins:
      - junit-annotate#v2.4.1:
          artifacts: tmp/junit-*.xml

Configuration

artifacts (required)

The artifact glob path to find the JUnit XML files.

Example: tmp/junit-*.xml

always-annotate (optional, boolean)

Forces the creation of the annotation even when no failures or errors are found

context (optional)

Default: junit

The buildkite annotation context to use. Useful to differentiate multiple runs of this plugin in a single pipeline.

job-uuid-file-pattern (optional)

Default: -(.*).xml

The regular expression (with capture group) that matches the job UUID in the junit file names. This is used to create the job links in the annotation.

To use this, configure your test reporter to embed the $BUILDKITE_JOB_ID environment variable into your junit file names. For example "junit-buildkite-job-$BUILDKITE_JOB_ID.xml".

failure-format (optional)

This setting controls the format of your failed test in the main annotation summary.

There are two options for this:

  • classname (the default)
    • displays: MyClass::UnderTest text of the failed expectation in path.to.my_class.under_test
  • file
    • displays: MyClass::UnderTest text of the failed expectation in path/to/my_class/under_test.file_ext

fail-build-on-error (optional)

Default: false

If this setting is true and any errors are found in the JUnit XML files during parsing, the annotation step will exit with a non-zero value, which should cause the build to fail.

failed-download-exit-code (optional, integer)

Default: 2

Exit code of the plugin if the call to buildkite-agent artifact download fails.

min-tests (optional, integer)

Minimum amount of run tests that need to be analyzed or a failure will be reported. It is useful to ensure that tests are actually run and report files to analyze do contain information.

report-slowest (optional)

Default: 0

Include the specified number of slowest tests in the annotation. The annotation will always be shown.

ruby-image (optional)

The docker image to use for running the analysis code. Must be a valid image reference that can run the corresponding ruby code and the agent running the step must be able to pull it if not already present.

Default: ruby:3.1-alpine@sha256:a39e26d0598837f08c75a42c8b0886d9ed5cc862c4b535662922ee1d05272fca

Developing

To run testing, shellchecks and plugin linting use use bk run with the Buildkite CLI.

bk run

Or if you want to run just the plugin tests, you can use the docker Plugin Tester:

docker run --rm -ti -v "${PWD}":/plugin buildkite/plugin-tester:latest

To test the Ruby code with rake in docker:

docker-compose run --rm ruby

To test your plugin in your builds prior to opening a pull request, you can refer to your fork and SHA from a branch in your pipeline.yml.

steps:
  - label: Annotate
    plugins:
      - YourGithubHandle/junit-annotate#v2.4.1:
          ...

License

MIT (see LICENSE)

junit-annotate-buildkite-plugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

junit-annotate-buildkite-plugin's Issues

Cannot upload yml with plugin specified

This is how I'm using it in our YML file:

- plugins:
    junit-annotate:
    artifacts: library-core/build/test-results/testDebugUnitTest/*.xml

I've also tried using specific git commit SHA and tag like in the example, but I always get this result:

2018-04-19 11:15:30 INFO   Reading pipeline config from ".buildkite/android-dev-build.yml"
2018-04-19 11:16:21 WARN   POST https://agent.buildkite.com/v3/jobs/d49b84b7-532e-4d4d-8380-272739ebc30f/pipelines: 102 (Attempt 1/5 Retrying in 1s)
2018-04-19 11:17:13 WARN   POST https://agent.buildkite.com/v3/jobs/d49b84b7-532e-4d4d-8380-272739ebc30f/pipelines: 102 (Attempt 2/5 Retrying in 1s)
2018-04-19 11:18:04 WARN   POST https://agent.buildkite.com/v3/jobs/d49b84b7-532e-4d4d-8380-272739ebc30f/pipelines: 102 (Attempt 3/5 Retrying in 1s)
2018-04-19 11:18:56 WARN   POST https://agent.buildkite.com/v3/jobs/d49b84b7-532e-4d4d-8380-272739ebc30f/pipelines: 102 (Attempt 4/5 Retrying in 1s)
2018-04-19 11:19:47 WARN   POST https://agent.buildkite.com/v3/jobs/d49b84b7-532e-4d4d-8380-272739ebc30f/pipelines: 102 (Attempt 5/5 Retrying in 1s)
2018-04-19 11:19:48 FATAL Failed to upload and process pipeline: POST https://agent.buildkite.com/v3/jobs/d49b84b7-532e-4d4d-8380-272739ebc30f/pipelines: 102

Manually annotating and uploading of artifacts work.

bug: glob should fail if 0 files are returned?

If the test job fails to generate a report for some reason, and you're using a wildcard to glob for the report, this plugin will report success, even though 0 tests were reported.

I'd say it should fail if there are 0 files returned by the glob and/or 0 tests reported. I'd argue this should happen whether fail-build-on-error is set or not, but that's debatable.

only list the failed test methods only for large junit reports

We have a large test suite (40k) and we frequently run into this error, when we have 100+ test failures.

⚠️ Failures too large to annotate | 0s
-- | --
  | The failures are too large to create a build annotation. Please inspect the failed JUnit artifacts manually.

When we run into this error, we have no test annotation, and we don't want to tell developers to look at the junit report themselve.
When the report is too large, would that be possible for the annotate plugin to only list the failed test methods (without the extra log)?
With this we would be able to report which tests fail to the developers.

Docker is seg faulting on Google Compute agents when running junit-annotate-buildkite-plugin

We're using a very lightweight Google Compute agents for light tasks like setup and annotations, and as of March 19th 2020 we're seeing the following error message in annotations step:
image

/var/buildkite/plugins/github-com-buildkite-plugins-junit-annotate-buildkite-plugin-5b6d1c107f1a2dc50bdd57f56b50d90489ad9be2/hooks/command: line 42:  5119 Segmentation fault      (core dumped) docker --log-level "error" run --rm --volume "$artifacts_dir:/junits" --volume "$PLUGIN_DIR/ruby:/src" --env "BUILDKITE_PLUGIN_JUNIT_ANNOTATE_JOB_UUID_FILE_PATTERN=${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_JOB_UUID_FILE_PATTERN:-}" --env "BUILDKITE_PLUGIN_JUNIT_ANNOTATE_FAILURE_FORMAT=${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_FAILURE_FORMAT:-}" ruby:2.7-alpine ruby /src/bin/annotate /junits > "$annotation_path"

From our investigation, there hasn't been any relevant updates or changes at that time (this plugin, ruby:2.7-alpine image). Plugin works on AWS agents.

Error while Processing the junits: docker: invalid reference format.

My build is throwing an error on the step Processing the junits ; docker: invalid reference format. , Error: The command exited with status 125

v2.4.0

image

#pipeline.yml
steps:
  - group: ':cypress: build e2e'
    steps:
      - label: build e2e
        key: 'build-e2e'
        commands:
          - pushd e2e-tests; ./build-and-upload-image.sh; popd
        agents:
          - 'role=node12'
  - wait
  - group: ':cypress: e2e tests'
    steps:
      - commands:
          - 'pushd e2e-tests'
          - './run-all-tests.sh'
          - 'popd'
        label: ':test_tube: Running :cypress: E2E tests :test_tube:'
        key: 'e2e-tests'
        agents:
          - 'role=node12'
        parallelism: 7
        timeout_in_minutes: 30
        artifact_paths:
          - 'e2e-tests/test-report/junit-results/results*.xml'
        plugins:
          - seek-oss/aws-sm#v2.3.1:
              json-to-env:
                - secret-id: 'build-e2e-tests'
      - wait: ~
        continue_on_failure: true
      - plugins:
          - junit-annotate#v2.4.0:
              artifacts: 'e2e-tests/test-report/junit-results/results*.xml'
              always-annotate: true
        retry:
          manual: false
          automatic:
            - exit_status: -1
              limit: 3

Error Setting up plugin

The console prints the following...

Setting up plugins | 0s
-- | --
  | 🚨 Error: Failed to parse plugin definition: Configuration for "github.com/buildkite-plugins/artifacts-buildkite-plugin" is not a hash

My setup looks like this...

  - command: "./gradlew application:testDevDebugUnitTest"
    label: "Run application unit tests"
    artifact_paths: application/build/test-results/testDevDebugUnitTest/TEST-*.xml

  - wait: ~
    continue_on_failure: true

  - plugins:
      junit-annotate#v1.4.1:
      artifacts: application/build/test-results/testDevDebugUnitTest/TEST-*.xml

Am I doing something wrong or is there an issue with the plugin?

Feature request: Ability to show also skipped tests in annotations

Currently, this plugin allows to show the failures and/or errors as a new annotation for each build in Buildkite.

Would it be possible to show also the skipped tests as part of that annotation ? Or maybe adding a new parameter so it can be customized if it is needed or not? That would help also for visibility.

junits_dir missing $

buildkite-agent artifact download "${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_ARTIFACTS}" junits_dir

This line is using junits_dir instead of $junits_dir, causing an error during execution like Could not find information about destination: [redacted]/junits_dir since the directory doesn't exist.

Display file path in summary instead of class name

When addressing test failures that crop up in CI, it's helpful to immediately see the path to the file with the failure, so that you can easily copy, paste, and reproduce locally.

Currently the default annotation output uses the classname (path.to.my.file) instead of the file path (path/to/my/file.ext), and devs need to expand the accordion, scroll through the failures, or manually transform path.to.my.file to path/to/my/file.ext
image

(Our company just switched to Buildkite from Circle, and this is something that a few of my coworkers have brought up about the annotation output.)

It would be great if users could specify which format they'd like to use for the main display. I've been playing around with this locally and will open a PR for this shortly :)

fail-build-on-error not respected if annotation is too large

The fail-build-on-error flag is ignored if the annotation is too large. It would still be beneficial in our case to fail the build even if there is no annotation instead of wrongfully passing the build. Here is a small patch that would solve this issue.

diff --git a/hooks/command b/hooks/command
index 2e03f21..6bfbe65 100755
--- a/hooks/command
+++ b/hooks/command
@@ -48,13 +48,12 @@ if grep -q "<details>" "$annotation_path"; then
   if ! check_size; then
       echo "--- :warning: Failures too large to annotate"
       echo "The failures are too large to create a build annotation. Please inspect the failed JUnit artifacts manually."
-      exit 0
+  else
+    echo "--- :buildkite: Creating annotation"
+    # shellcheck disable=SC2002
+    cat "$annotation_path" | buildkite-agent annotate --context junit --style error
   fi

-  echo "--- :buildkite: Creating annotation"
-  # shellcheck disable=SC2002
-  cat "$annotation_path" | buildkite-agent annotate --context junit --style error
-
   if [[ "${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_FAIL_BUILD_ON_ERROR:-false}" =~ (true|on|1) ]]
   then
     echo "--- :boom: Failing build due to error"

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

buildkite
.buildkite/pipeline.yml
  • docker-compose v3.9.0
  • docker-compose v3.9.0
  • plugin-linter v3.0.0
  • shellcheck v1.2.0
docker-compose
docker-compose.yml
  • buildkite/plugin-tester latest@sha256:476a1024936901889147f53d2a3d8e71e99d76404972d583825514f5608083dc
  • ruby 3.1-alpine@sha256:c5acbb8bcc57cc3cb8da7f28077ec23c9c05217f26bd4e156d7b87df6dcf0c00
github-actions
.github/workflows/release-drafter.yml
  • release-drafter/release-drafter v5

  • Check this box to trigger a request for Renovate to run again on this repository

Similar project

Disclaimer: This isn't actually an issue, but this is the channel I have for communication so I figured I'd put this here.

A couple of weeks ago, before you guys fixed this up, I was experimenting with v3 features and tried this out. Obviously it didn't work but it got me thinking what it was I wanted and how I'd build it myself. Over the last week I had a chance to actually put some of it together. It's publicly available over at https://github.com/bugcrowd/test-summary-buildkite-plugin. Of course, I have great timing and managed to build mine at exactly the same time that you were fixing yours. But I thought you might still find it interesting so I figured I'd share it.

Now I'll have to go through what you've changed in the last few days and pull over any of the interesting things you've added... 😀

Add support for using the plugin in the step that generates the junit report

How can i make the plugin run after uploading artifacts? The plugin try to download the artifact before the artifact being uploaded and hit an error.

screenshot 2018-11-01 at 6 39 13 pm

Here is my pipeline.yaml

steps:
  - label: ":php: Checkstyle"
    plugins:
      - ecr#v1.1.4:
          login: true
          no-include-email: true
      - docker#v2.0.0:
          image: "php:5.6"
      - junit-annotate#v1.4.1:
          artifacts: tmp/checkstyle.xml
    agents:
      application: "queues-api"
    command: |     
      cd src
      mkdir -p tmp
      phpcs -n --standard=psr2.xml -d memory_limit=80M --report=junit --report-file=tmp/checkstyle.xml app
    artifact_paths: "src/tmp/checkstyle.xml"

Attempted adding second root element to document failure

I'm using junit-annotate-buildkite-plugins#1.4.1 to parse junit XML files generated by php-unit, generally it works but periodically this step fails even though the tests all passed. Rerunning this step will usually pass although sometimes we have to re-run it multiple times.

I can provide a link to a build exhibiting this problem (failed twice then worked third time) if it would help?

Unable to find image 'ruby:2.5-alpine' locally
--
  | 2.5-alpine: Pulling from library/ruby
  | 4fe2ade4980c: Pulling fs layer
  | dc5149ad8262: Pulling fs layer
  | ffeb2951944c: Pulling fs layer
  | 64bf8d66a767: Pulling fs layer
  | 64bf8d66a767: Waiting
  | dc5149ad8262: Verifying Checksum
  | dc5149ad8262: Download complete
  | 4fe2ade4980c: Download complete
  | 64bf8d66a767: Verifying Checksum
  | 64bf8d66a767: Download complete
  | ffeb2951944c: Verifying Checksum
  | ffeb2951944c: Download complete
  | 4fe2ade4980c: Pull complete
  | dc5149ad8262: Pull complete
  | ffeb2951944c: Pull complete
  | 64bf8d66a767: Pull complete
  | Digest: sha256:f0d03c0e907929b8d7172ebe2bfa7e544db7ac61a3d837097246e8d8925bdb65
  | Status: Downloaded newer image for ruby:2.5-alpine
  | Parsing /artifacts/project/junit-integration.xml
  | /usr/local/lib/ruby/2.5.0/rexml/parsers/treeparser.rb:96:in `rescue in parse': #<RuntimeError: attempted adding second root element to document> (REXML::ParseException)
  | /usr/local/lib/ruby/2.5.0/rexml/document.rb:96:in `add'
  | /usr/local/lib/ruby/2.5.0/rexml/element.rb:904:in `add'
  | /usr/local/lib/ruby/2.5.0/rexml/child.rb:22:in `initialize'
  | /usr/local/lib/ruby/2.5.0/rexml/parent.rb:14:in `initialize'
  | /usr/local/lib/ruby/2.5.0/rexml/element.rb:60:in `initialize'
  | /usr/local/lib/ruby/2.5.0/rexml/element.rb:902:in `new'
  | /usr/local/lib/ruby/2.5.0/rexml/element.rb:902:in `add'
  | /usr/local/lib/ruby/2.5.0/rexml/element.rb:298:in `add_element'
  | /usr/local/lib/ruby/2.5.0/rexml/document.rb:103:in `add_element'
  | /usr/local/lib/ruby/2.5.0/rexml/parsers/treeparser.rb:34:in `parse'
  | /usr/local/lib/ruby/2.5.0/rexml/document.rb:288:in `build'
  | /usr/local/lib/ruby/2.5.0/rexml/document.rb:45:in `initialize'
  | /src/bin/annotate:35:in `new'
  | /src/bin/annotate:35:in `block in <main>'
  | /src/bin/annotate:29:in `each'
  | /src/bin/annotate:29:in `<main>'
  | ...
  | attempted adding second root element to document
  | Line: 22
  | Position: 9053
  | Last 80 unconsumed characters:
  | from /usr/local/lib/ruby/2.5.0/rexml/parsers/treeparser.rb:21:in `parse'
  | from /usr/local/lib/ruby/2.5.0/rexml/document.rb:288:in `build'
  | from /usr/local/lib/ruby/2.5.0/rexml/document.rb:45:in `initialize'
  | from /src/bin/annotate:35:in `new'
  | from /src/bin/annotate:35:in `block in <main>'
  | from /src/bin/annotate:29:in `each'
  | from /src/bin/annotate:29:in `<main>'
  | 🚨 Error: The command exited with status 1

Plugin reports no failures when tests error

If tests error instead of failing, the plugin reports no failures. Looks like the parser is only looking for failure elements inside each testcase and error elements are ignored.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.frangz.crypto.PasswordsTest" time="0.152" tests="2" errors="2" skipped="0" failures="0">
  <properties>
      ...
  </properties>
  <testcase name="testFixed" classname="com.frangz.crypto.PasswordsTest" time="0.152">
    <error message="libsodium.so: cannot open shared object file: No such file or directory" type="java.lang.UnsatisfiedLinkError"><![CDATA[java.lang.UnsatisfiedLinkError: libsodium.so: cannot open shared object file: No such file or directory
	at jnr.ffi.provider.jffi.NativeLibrary.loadNativeLibraries(NativeLibrary.java:87)
	at jnr.ffi.provider.jffi.NativeLibrary.getNativeLibraries(NativeLibrary.java:70)
	at jnr.ffi.provider.jffi.NativeLibrary.getSymbolAddress(NativeLibrary.java:49)
	at jnr.ffi.provider.jffi.NativeLibrary.findSymbolAddress(NativeLibrary.java:59)
	at jnr.ffi.provider.jffi.AsmLibraryLoader.generateInterfaceImpl(AsmLibraryLoader.java:117)
	at jnr.ffi.provider.jffi.AsmLibraryLoader.loadLibrary(AsmLibraryLoader.java:59)
	at jnr.ffi.provider.jffi.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:43)
	at jnr.ffi.LibraryLoader.load(LibraryLoader.java:290)
	at jnr.ffi.LibraryLoader.load(LibraryLoader.java:269)
	at org.abstractj.kalium.NaCl$SingletonHolder.<clinit>(NaCl.java:41)
	at org.abstractj.kalium.NaCl.sodium(NaCl.java:28)
	at org.abstractj.kalium.NaCl.init(NaCl.java:425)
	at com.frangz.crypto.Passwords.init(Passwords.java:43)
	at com.frangz.crypto.PasswordsTest.before(PasswordsTest.java:23)
]]></error>
  </testcase>
  <testcase name="testRandom" classname="com.frangz.crypto.PasswordsTest" time="0">
    <error message="libsodium.so: cannot open shared object file: No such file or directory" type="java.lang.UnsatisfiedLinkError"><![CDATA[java.lang.UnsatisfiedLinkError: libsodium.so: cannot open shared object file: No such file or directory
	at jnr.ffi.provider.jffi.NativeLibrary.loadNativeLibraries(NativeLibrary.java:87)
	at jnr.ffi.provider.jffi.NativeLibrary.getNativeLibraries(NativeLibrary.java:70)
	at jnr.ffi.provider.jffi.NativeLibrary.getSymbolAddress(NativeLibrary.java:49)
	at jnr.ffi.provider.jffi.NativeLibrary.findSymbolAddress(NativeLibrary.java:59)
	at jnr.ffi.provider.jffi.AsmLibraryLoader.generateInterfaceImpl(AsmLibraryLoader.java:117)
	at jnr.ffi.provider.jffi.AsmLibraryLoader.loadLibrary(AsmLibraryLoader.java:59)
	at jnr.ffi.provider.jffi.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:43)
	at jnr.ffi.LibraryLoader.load(LibraryLoader.java:290)
	at jnr.ffi.LibraryLoader.load(LibraryLoader.java:269)
	at org.abstractj.kalium.NaCl$SingletonHolder.<clinit>(NaCl.java:41)
	at org.abstractj.kalium.NaCl.sodium(NaCl.java:28)
	at org.abstractj.kalium.NaCl.init(NaCl.java:425)
	at com.frangz.crypto.Passwords.init(Passwords.java:43)
	at com.frangz.crypto.PasswordsTest.before(PasswordsTest.java:23)
]]></error>
  </testcase>
</testsuite>

This test reports There were no failures.

Feature Request: Ability to specify Ruby docker image to use

We are hitting Dockerhub rate limits in our Buildkite builds that utilise this plugin. Our desired approach to remedy this would be to move away from Dockerhub hosted images and to instead use public ECR images, or even our own private ECR hosted images. At the moment we have no ability to remedy this whilst using this plugin as the Docker image is hard coded to ruby:2.7-alpine. Would it be possible to add a parameter to override the Docker image used?

Large output is will fail to upload

Output from this plugin which exceeds the Buildkite annotation limit of 100 kilobytes is not handled gracefully, and will thus simply be rejected, and the step fail.

It would be desirable to have some control over this, perhaps following the example of the Test Summary Buildkite Plugin, which truncates output when necessary.

It seems necessary to generate or locate some Java error stack traces to ensure compatibility with the sort of output that language produces, if we are to claim to support JUnit data!

issue with using junit annotate with bk local run

Hi,

I share here an issue I created: buildkite/cli#81

When running the sample pipeline of the plugin: junit-annotate, I see the following error happening:

 bk local run .buildkite/pipeline.integration_tests.yml
(...)

--- :junit: Processing the junits
docker: Error response from daemon: Mounts denied: 
The path /var/folders/kf/fsdklxv57_v6kq5ydjxpj6g00000gp/T/buildkite-plugins-670558647/github-com-buildkite-plugins-junit-annotate-buildkite-plugin-v1-7-0/ruby
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
ERRO[0000] error waiting for container: context canceled 
🚨 Error: The command exited with status 125

Apparently, when trying to mount such a folder on a mac, one would need to prefix /var with /private and use instead /private/var according to this comment

Is this a problem of the plugin or of the bk local agent?

junit-annotate#v2.2.0 docker rate limit issue with ruby:2.7-alpine.

Hi,

We are using junit-annotate#v2.2.0 , in CI run getting this error

Unable to find image 'ruby:2.7-alpine' locally
`Error response from daemon: error parsing HTTP 429 response body: invalid character 'T' looking for beginning of value: "Too Many Requests (HAP429).\n`.

Is there a way we can change the reference of ruby docker image to private ECR mirror image?

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Preset name not found within published preset config (monorepo:babel6). Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

HTML entities in junit error output aren't escaped

If HTML entities (such as <main> which can appear in Ruby error output) appear in the error failure output, they disappear from the output (because the Buildkite markdown parser removes the invalid elements).

All the code here needs to HTML escape the output:

failures.each do |failure|
puts "<details>"
puts "<summary><code>#{failure.name} in #{failure.failed_test}</code></summary>\n\n"
if failure.body
puts "<code><pre>#{failure.body.chomp.strip}</pre></code>\n\n"
end
if failure.job
puts "in <a href=\"##{failure.job}\">Job ##{failure.job}</a>"
end
puts "</details>"
puts "" unless failure == failures.last
end

Update annotation as parallel jobs complete commands

Currently you have to wait for all parallel jobs to complete to view the final test report. If you run many jobs in parallel, it can be useful to have the annotation update as jobs complete. This way you can get real time feedback of your test failures.

Perhaps this can shown directly in the parallel job annotation. Or titled by job at the top annotation in the pipeline (the current annotation style).

Multiple artifact paths

Works great:

  - label: 'Save test results'
    plugins:
      junit-annotate#v1.4.1:
        artifacts: "pytest.*.xml"

Not so much:

  - label: 'Save test results'
    plugins:
      junit-annotate#v1.4.1:
        artifacts:
          - "pytest.*.xml"
          - "some-other-test-results/pytest.*.xml"


▼ Download the junits
/var/lib/buildkite-agent/plugins/github-com-buildkite-plugins-junit-annotate-buildkite-plugin-v1-4-1/hooks/command: line 20: BUILDKITE_PLUGIN_JUNIT_ANNOTATE_ARTIFACTS: unbound variable
🚨 Error: The command exited with status 1

Possible to support multiple artifact paths?

FEATURE - Supporting JSON buildkite annotations

This buildkite plugin currently only supports junit's XML format. It would be nice if we could have an argument that allows the plugin to parses JSON which is generated through --format json by rspec.

An alternative solution is to create an entirely new plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.