Skip to content

Configs File

All settings for any project could be defined with json-configs file, which should be placed in the corresponding repository.

Example of the configs file

{
  "integrations": {
    "continuous_delivery": [
      {
        "credential": "ssh.server-alfa"
      },
      {
        "credential": "ssh.server-beta"
      }
    ],
    "collaboration_tool": {
      "credential": "slack-default"
    },
    "project_management_system": {
      "credential": "jira-default",
      "project": "TES",
      "tracker": "Aufgabe",
      "priority": "Low",
      "task_status_to_ag_mapping": {
        "In Progress": "execute_update",
        "Done": "closed"
      },
      "task_status_from_ag_mapping": {
        "closed": "Done"
      }
    }
  },
  "update_behavior": {
      "source_branch": "dev",
      "destination_branch": "updates/[task:id]",
      "auto_start_updates": "no",
      "skip_manual_testing": "no"
  },
  "events": {
    "new_updates_available": [
      {
        "sendmail": {
          "emails": "test@mail-composer.com,test2@mail-composer.com",
          "subject": "Test subject - Composer Project",
          "message": "Test message - Composer Project",
          "cc": "",
          "bcc": ""
        }
      },
      {
        "sendmessage": {
          "title": "New updates available for \"[project:name]\"",
          "message": "We've found the new updates for your project.\n\nThe packages:\n[task:packages|, ][package:name]: [package:current-version] → [package:new-version][/task:packages]",
          "color": "#998877"
        }
      }
    ],
    "ready_to_test": [],
    "test_passed": [
      {
        "merge_branch": {
          "source": "source-branch",
          "delete_after_merge": "yes",
          "target": ["target-1", "target-2"]
        }
      },
      {
        "url_request": {
          "url": "http://myproject.com/api/call",
          "type": "get",
          "body": ["task": "[task:id]"]
        }
      },
      {
        "ssh_script": {
          "connection": "ssh.server-alfa",
          "script": "pwd"
        }
      }
    ],
    "closed": [],
    "failed": [
      {
        "sendmail": {
          "emails": "test@mail-composer.com,test2@mail-composer.com",
          "subject": "Test subject - Composer Project",
          "message": "Test message - Composer Project",
          "cc": "",
          "bcc": ""
        }
      }
    ]
  }
}

Explanation

Integrations

Project Manager System

Key: project_management_system.

Property Description
credential The alias of the corresponding credentials.
project The project name inside the project manager system.
tracker The tracker name inside the project manager system.
priority The priority for the tasks, which will be created with AG.
task_status_to_ag_mapping The mapping for the statuses, used for changing the statuses in a task of AG when in a project system manager a status of a corresponding task will be changed. Also there possible provide a mapping for the execute_update (despite the fact that it is implicit).
task_status_from_ag_mapping The mapping for the statuses, used for changing the statuses in a task of project system manager when in AG a status of a corresponding task will be changed.

Collaboration tool

Key: collaboration_tool.

Property Description
credential The alias of the corresponding credentials.

Continuous Delivery

Key: continuous_delivery.

Contains multiple definitions, unlike other integration groups.

Property Description
credential The alias of the corresponding credentials.

Update behavior

Key: update_behavior.

Contain sections with branches for updates. Allowed to use tokens.

Properties for Update behavior

Behavior Description
source_branch The source branch. Allowed to use tokens.
destination_branch The destination update branch. Allowed to use tokens.
auto_start_updates This property specified a method of the start update process for tasks. Available values: always, auto_for_vulnerable, no.
skip_manual_testing This property specified which status will has a task after applying the update. If "yes" - "Test Passed", otherwise "Ready to Test". Available values: yes, no.

Events

  • new_updates_available (a task has been created)
  • ready_to_test (updates have been applied and manual testing is enabled)
  • test_passed (test passed automatically or manually)
  • test_failed (test has been failed)
  • failed (some problem has been occurred: network problem, problem with access to repo, ...)
  • patch_cant_be_applied (updates could't been applied)
  • closed (a task has been closed)

Actions

Send Mail

Key: sendmail.

Property Description
emails The list of emails, separate with comma. Allowed use [user:email] token.
subject The subject of an email. Allowed to use tokens.
message The message of an email. Allowed to use tokens.
cc The list of carbon copy emails, separate with comma.
bcc The list of blind carbon copy emails, separate with comma.
get_notification_for Choose a policy for executing this action depending on existence of packages with vulnerabilities. Available values: all_packages (by default), contains_vulnerable_packages. Not required.

Send Message (to enabled Collaboration tool)

Key: sendmessage.

Property Description
title The subject of an email. Allowed to use tokens. Not required.
message The message of an email. Allowed to use tokens.
color The color for a line in Slack message (use #RRGGBB format). Not required.
get_notification_for Choose a policy for executing this action depending on existence of packages with vulnerabilities. Available values: all_packages (by default), contains_vulnerable_packages. Not required.

Merge a branch

Key: merge_branch.

Property Description
source The source branch. Allowed to use tokens.
delete_after_merge The property, which defines the need to remove source branch after a merge. Available values: yes, no.
target The array of target branches. Allowed to use tokens.

Request a URL

Key: url_request.

Property Description
url The URL for request. Allowed to use tokens.
type Type of a request. Available values: post, get, head, put, delete, patch.
headers Headers for a request, will be used for this section. Allowed use tokens for keys and values. Not required.
auth Auth data for a request, will be used for this section. Allowed use tokens for keys and values. Not required.
body Body for a request. If specified a string will be used for this section, if an array - will be used for this section. Allowed use tokens for keys and values. Not required.

Execute a SSH script

Key: ssh_script.

Property Description
connection Name of a SSH connection (alias).
script BASH script which will be executed on your server. Allowed to use tokens.