Configuration: CI/CD Pipelines
This section is part of the remote-config.yaml
configuration file. See the configuration overview for further information.
Azure DevOps (ADO)
Note the same token value may also be used for retrieving VCS info within the code management configuration if required and permission is provided within the token scope.
Within a pipelines.azure
server object:
-
Add a unique
id
value for the target server. -
Add the
url
endpoint of the ADO instance. -
Create an Azure Personal Access Token. To call ADO you'll need to authenticate with a PAT. See instructions here.
-
Add the PAT value to the object's
apiKey
field. -
Add a list of
branches
you want to have the option to analyse for your projects (TODO: Align with Workloads)
GitHub
Within a pipelines.github
server object:
-
Add a unique
id
value for the target server. -
Create a Personal Access Token. Navigate to https://github.com/settings/tokens and create a token with the following scopes:
- public_repo
- read:org
- read:project
-
Paste the result into the server object's
apiKey
field. -
Add a list of
branches
you want to have the option to analyse for your projects (TODO: Align with Workloads)
pipelines:
github:
servers:
- id: CodeMetrics
url: 'https://api.github.com'
apiKey: ${secret.github_api_key}
branches:
- main
Jenkins
Within a pipelines.jenkins
server object:
-
Add a unique
id
value for the target server. -
Add url and access credentials to the url field following the basic auth structure: https://
user
:key
@jenkins.server.url
-
Add a list of
branches
you want to have the option to analyse for your projects
Dynatrace
Some teams use Dynatrace to monitor their pipelines. This configuration allows you to retrieve data from Dynatrace to monitor the success, duration and frequency of your pipelines.
Within a pipelines.dynatrace
server object:
- Add a unique
id
value for the target server. - Add the
url
endpoint of the Dynatrace instance. - Add the
apiKey
value for the Dynatrace API. - Set the
metricSelector
to your query and, optionally, theentitySelector
to filter the data you want to retrieve. - Set the dimension names to the names of the dimensions of the metric in your query.
- Set the
successfulOutcomeValue
to the value that indicates a successful build.
pipelines:
dynatrace:
servers:
- id: "example-dynatrace"
url: "https://example-instance.live.dynatrace.com"
apiKey: "${secret.dynatrace-api-key}"
metricSelector: "your.query.here"
#entitySelector: builtin.foo.bar
successfulOutcomeValue: "1"
dimensionNames:
runId: "commit-sha"
startDate: "start-time-utc"
endDate: "end-time-utc"
outcome: "build-success"
branch: "branch-name"
repository: "repository"
jobName: "deploy-job-name"
Here is an example metricSelector
, which queries a custom metric in Dynatrace, named example.pipelines.deployment
:
example.pipelines.deployment
:splitBy(commit-sha,environment,start-time-utc,end-time-utc,build-success,repository,deploy-job-name)
:filter(eq(environment,production))
No pipeline provider
In the case where no pipeline provider is used, the pipelines
type should be set to none
.
# remote-config.yaml
---
pipelines:
none:
- id: none
In the associated workflow configuration, the pipelines
type should be set to none
.