This action creates a new release on your Instana tenant via the Instana Pipeline Feedback capability.
Set the following variables as secrets for your repository:
INSTANA_BASE
: The base url of your tenant (e.g.https://test-example.instana.io
)INSTANA_TOKEN
: The API token to create releases at Instana, which must have theConfiguration of releases
permission. Refer to the Tokens documentation on the Instana website for more information on how to create API tokens.
-
releaseName
(required): The name of the release to create -
releaseScope
(optional): scoping information for the release in terms of Application Perspectives and Services. The file should contain valid JSON object that satisfiesjq type == 'object'
, and it can have as fieldsapplications
andservices
, which respectively have the same structure as in the API documentation for creating releases, e.g.:{ "applications": [ { "name": "My Awesome App" }, { "name": "My Even More Awesome App" } ], "services": [ { "name": "Cool service #1" }, { "name": "Cool service #2", "scopedTo": { "applications": [ { "name": "My Cool App" } ] } } ] }
The JSON snippet above will scope the new release to apply to the entirety of the Application Perspectives
My Awesome App
andMy Even More Awesome App
, to the entirely of theCool service #1
service, and to theCool service #2
service, but only to what part ofCool service #2
is included in theMy Cool App
Application Perspective. For more information on Application Perspectives, Services and the scoping, refer to the Application Monitoring documentation.Note: Release scoping is supported in Instana v190 and above; using release scoping with older versions of Instana will not lead to issues, but the scoping specification will be ignored.
id
: The id of the newly-created release
uses: taimos/github-action-instana-release@%%version%%
with:
releaseName: 'Deployed version 42'
env:
INSTANA_BASE: ${{ secrets.INSTANA_BASE }}
INSTANA_TOKEN: ${{ secrets.INSTANA_TOKEN }}
uses: taimos/github-action-instana-release@%%version%%
with:
releaseName: 'Deployed version 42'
releaseScope: >
{
"services": [
{
"name": "spring-webflux",
"scopedTo": {
"applications": [{ "name": "All Services" }]
}
},
{ "name": "spring-boot" }
]
}
env:
INSTANA_BASE: ${{ secrets.INSTANA_BASE }}
INSTANA_TOKEN: ${{ secrets.INSTANA_TOKEN }}
Notice that, to nest a JSON datastructure in YAML without dealing with conversion issues, we are actually using a YAML multiline string by adding >
at the beginning of the value for releaseScope
.
When using YAML multiline string, each line of the string must be indented at least one level deeper than the key.
The YAML Multiline is excellent to understand the nuances of multiline in YAML.
To test a new version of this GitHub Action, copy the test/test-action.yml
to .github/workflows
. The test can be executed
locally with act.
act -s INSTANA_BASE=<<INSTANA_BASE>> -s INSTANA_TOKEN="<<INSTANA_TOKEN>>" [--env version=<<VERSION>>]
The version
is optional and will be used to identify the user-agent. If not set dev
will used as version.