Publish Reports and Artifacts

    Your query search resulted in no results.

    Publishing artifacts

    When executing a job on an agent there are often artifacts created that we need to keep around.

    For example

    • JUnit creates xml reports that GoCD is able to parse in order to help us understand why the build is broken. We can use GoCD with any JUnit style xml reports.
    • a build automation tool might product an HTML report for test, or code coverage report that we wish to view alongside the build results
    • we might create a video of our UI tests that we want displayed in GoCD. You can upload any html file from your build and view it in GoCD.

    To publish artifacts we add an < artifact > to the job configuration. More information can be found on the Managing artifacts and reports page.

    Example usages

    Uploading JUnit xml reports

    We are going to assume that the JUnit test reports are being placed in the “target/reports” folder.

    Click on the Administration tab

    Click on your pipeline

    For each job that runs JUnit:

    • Click on the job name to edit job config
    • Add the source of the test artifact. For tests, choose the type of artifact as Test artifact
    • Click “Save”

    Uploading a flash video and displaying it as a sub-tab

    We are going to assume that the flash file, and the html file referencing it, are being created in the “target/reports” folder.

    Click on the Admin > Pipelines tab tab

    Click on your pipeline

    For each job that creates a flash video

    • Click on the job name to edit the job config
    • Navigate to the “Artifacts”. Add the source of the artifact. Choose the type of artifact as Build artifact. This will copy all files from the “target/reports” folder on the agent to the “Recording” folder on Go server
    • Navigate to “Custom Tabs”. Add the tab name and the source of the html file. This will create a tab called “Recording” that shows the html page found at “recording/twist-recording.html” on GoCD server.
    • Click “Save”
    • Watch the flash video as a sub-tab on the Job Details page