Skip to content

CI Info Extension ​

CI-Info attaches crucial CI/CD pipeline details such as the repository name, build link, branch name, and pull request information to your notifications.

CI Info Example

Supported CI Providers ​

TIP

More CI providers are coming soon.

Configuration ​

Basic Syntax ​

json
{
  "name": "ci-info",
  "inputs": {
    "show_repository": false,
    "show_repository_branch": true,
    "show_build": true,
    "data": [
      {
        "key": "Download Logs",
        "value": "<custom url>",
        "type": "hyperlink"
      }
    ]
  }
}

Parameters ​

  • show_repository (boolean) - Show repository name and link
  • show_repository_branch (boolean) - Show repository branch name
  • show_build (boolean) - Show build name and link
  • data (object[]) - List of custom data objects
    • key (string) - Text to display as a key
    • value (string|function) - Text to display as a value. URL in case of hyperlink
    • type (string) - Type of data. Allowed values: hyperlink
    • condition (condition) - Condition to include this data

Default Behavior ​

  • Hook: after-summary
  • Condition: passOrFail

Examples ​

Basic CI Info ​

Attaches repository name/link, repository branch name, build name/link:

json
{
  "targets": [
    {
      "name": "slack",
      "inputs": {
        "url": "{SLACK_WEBHOOK_URL}"
      }
    }
  ],
  "extensions": [
    {
      "name": "ci-info"
    }
  ]
}

Attaches custom link to download logs:

json
{
  "targets": [
    {
      "name": "teams",
      "inputs": {
        "url": "{TEAMS_WEBHOOK_URL}"
      }
    }
  ],
  "extensions": [
    {
      "name": "ci-info",
      "inputs": {
        "data": [
          {
            "key": "Download Logs",
            "value": "https://ci.example.com/logs/{BUILD_ID}",
            "type": "hyperlink"
          },
          {
            "key": "Artifacts",
            "value": "https://ci.example.com/artifacts/{BUILD_ID}",
            "type": "hyperlink"
          }
        ]
      }
    }
  ]
}

Conditional Display ​

Show different information based on test results:

json
{
  "name": "ci-info",
  "inputs": {
    "show_repository": true,
    "show_build": true,
    "data": [
      {
        "key": "Failed Tests Report",
        "value": "https://reports.example.com/failures/{BUILD_ID}",
        "type": "hyperlink",
        "condition": "fail"
      },
      {
        "key": "Coverage Report",
        "value": "https://coverage.example.com/{BUILD_ID}",
        "type": "hyperlink",
        "condition": "pass"
      }
    ]
  }
}

Released under the MIT License.