Octopus.Script exported 2026-02-13 by wgunn-testery belongs to ‘Testery’ category.
Report a deployment to a Testery project
Parameters
When steps based on the template are included in a project’s deployment process, the parameters below can be set.
Token
TesteryToken =
Your Testery API token (found in Testery -> Settings -> Integrations -> Show API Token)
Project Key
TesteryProjectKey =
The key of the test project in the Testery platform.
Environment Key
TesteryEnvironmentKey =
The key of the environment defined in Testery where you want the tests to run.
Build Id
TesteryBuildId =
The build ID from your CI/CD. If you have uploaded any test artifacts from your CI/CD, this build id should match the build id used when uploading artifacts.
Output
TesteryOutput = pretty
The format for outputting results.
Fail On Failure?
TesteryFailOnFailure? = False
When checked, the Octopus deployment will fail if any of the test runs associated with the deployment fail. When unchecked, the Octopus deployment will continue even if there are test failures.
Wait For Results?
TesteryWaitForResults? = False
When checked, Octopus Deploy will wait for the any test runs associated with the deployment to complete before proceeding. This is useful for making sure deployments don’t run on environments/tenants with an active test run.
Git Provider?
TesteryGitProvider? = None
The Git provider used for the repository that is being deployed.
Git Commit?
TesteryGitCommit? =
The Git commit that was deployed.
Git Owner?
TesteryGitOwner? =
The organization owner in Git for the repository that is being deployed.
Git Repo?
TesteryGitRepo? =
The repository name that is being deployed.
Git Branch?
TesteryGitBranch? =
The Git branch the deploy came from.
Status Name?
TesteryStatusName? =
The name you want to use on the Git status, as plain text.
SkipVCSUpdates?
TesterySkipVCSUpdates? = False
Check this if you do not want to submit status updates to Version Control.
Script body
Steps based on this template will execute the following Bash script.
set -e
TOKEN=$(get_octopusvariable "TesteryToken")
PROJECT_KEY=$(get_octopusvariable "TesteryProjectKey")
ENVIRONMENT_KEY=$(get_octopusvariable "TesteryEnvironmentKey")
BUILD_ID=$(get_octopusvariable "TesteryBuildId")
OUTPUT=$(get_octopusvariable "TesteryOutput")
GIT_REF=$(get_octopusvariable "TesteryGitCommit?")
GIT_BRANCH=$(get_octopusvariable "TesteryGitBranch?")
GIT_OWNER=$(get_octopusvariable "TesteryGitOwner?")
GIT_PROVIDER=$(get_octopusvariable "TesteryGitProvider?")
WAIT_FOR_RESULTS=$(get_octopusvariable "TesteryWaitForResults?")
FAIL_ON_FAILURE=$(get_octopusvariable "TesteryFailOnFailure?")
SKIP_VSC_UPDATE=$(get_octopusvariable "TesterySkipVCSUpdates?")
STATUS_NAME=$(get_octopusvariable "TesteryStatusName?")
if [ "$GIT_PROVIDER" = "None" ] ; then
GIT_PROVIDER=
fi
if [ "$WAIT_FOR_RESULTS" = "False" ] ; then
WAIT_FOR_RESULTS=
fi
if [ "$FAIL_ON_FAILURE" = "False" ] ; then
FAIL_ON_FAILURE=
fi
if [ "$SKIP_VSC_UPDATE" = "False" ] ; then
SKIP_VSC_UPDATE=
fi
export PATH="$HOME/.local/bin:$PATH"
pip install --user testery --upgrade
testery create-deploy --token $TOKEN \
--project-key $PROJECT_KEY \
--environment-key $ENVIRONMENT_KEY \
--build-id $BUILD_ID \
--output $OUTPUT \
${GIT_REF:+ --git-ref "$GIT_REF"} \
${GIT_BRANCH:+ --git-branch "$GIT_BRANCH"} \
${GIT_OWNER:+ --git-owner "$GIT_OWNER"} \
${GIT_PROVIDER:+ --git-provider "$GIT_PROVIDER"} \
${STATUS_NAME:+ --status-name "$STATUS_NAME"} \
${WAIT_FOR_RESULTS:+ --wait-for-results} \
${FAIL_ON_FAILURE:+ --fail-on-failure} \
${SKIP_VSC_UPDATE:+ --skip-vcs-updates}
Provided under the Apache License version 2.0.
To use this template in Octopus Deploy, copy the JSON below and paste it into the Library → Step templates → Import dialog.
{
"Id": "9c85f96e-09d3-4814-948a-aef8708740b5",
"Name": "Testery - Report Deployment",
"Description": "Report a deployment to a Testery project",
"Version": 5,
"ExportedAt": "2026-02-13T21:28:53.679Z",
"ActionType": "Octopus.Script",
"Author": "wgunn-testery",
"Packages": [],
"Parameters": [
{
"Id": "f01f917a-b2c8-4038-be1c-b2355639f57e",
"Name": "TesteryToken",
"Label": "Token",
"HelpText": "Your Testery API token (found in Testery -> Settings -> Integrations -> Show API Token)",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "Sensitive"
}
},
{
"Id": "4873b6f2-694a-463f-928a-9845b044bc8b",
"Name": "TesteryProjectKey",
"Label": "Project Key",
"HelpText": "The key of the test project in the Testery platform.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "811352ba-a3e4-4092-99c2-b48499b9a880",
"Name": "TesteryEnvironmentKey",
"Label": "Environment Key",
"HelpText": "The key of the environment defined in Testery where you want the tests to run.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "7a6aa01f-13a1-4fa7-a681-7f0acda63932",
"Name": "TesteryBuildId",
"Label": "Build Id",
"HelpText": "The build ID from your CI/CD. If you have uploaded any test artifacts from your CI/CD, this build id should match the build id used when uploading artifacts.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "bf135a1b-d58f-4e6b-ab9c-fe03b52ed09d",
"Name": "TesteryOutput",
"Label": "Output",
"HelpText": "The format for outputting results.",
"DefaultValue": "pretty",
"DisplaySettings": {
"Octopus.ControlType": "Select",
"Octopus.SelectOptions": "json|Json\npretty|Pretty\nteamcity|TeamCity"
}
},
{
"Id": "09ed4f34-d381-4f85-8869-c52264694b7c",
"Name": "TesteryFailOnFailure?",
"Label": "Fail On Failure?",
"HelpText": "When checked, the Octopus deployment will fail if any of the test runs associated with the deployment fail. When unchecked, the Octopus deployment will continue even if there are test failures.",
"DefaultValue": "False",
"DisplaySettings": {
"Octopus.ControlType": "Checkbox"
}
},
{
"Id": "2266652a-258d-447f-aebf-14e9575d6b9d",
"Name": "TesteryWaitForResults?",
"Label": "Wait For Results?",
"HelpText": "When checked, Octopus Deploy will wait for the any test runs associated with the deployment to complete before proceeding. This is useful for making sure deployments don't run on environments/tenants with an active test run.",
"DefaultValue": "False",
"DisplaySettings": {
"Octopus.ControlType": "Checkbox"
}
},
{
"Id": "f96b7529-7ced-4265-8176-972ec30b9bba",
"Name": "TesteryGitProvider?",
"Label": "Git Provider?",
"HelpText": "The Git provider used for the repository that is being deployed.",
"DefaultValue": "None",
"DisplaySettings": {
"Octopus.ControlType": "Select",
"Octopus.SelectOptions": "None|None\nGitHub|GitHub\nBitBucket|BitBucket\nGitLab|GitLab"
}
},
{
"Id": "ce589aa1-4747-4b51-87fb-5734ab676dd5",
"Name": "TesteryGitCommit?",
"Label": "Git Commit?",
"HelpText": "The Git commit that was deployed.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "4a30530e-3a71-4a22-af35-57219da67cdf",
"Name": "TesteryGitOwner?",
"Label": "Git Owner?",
"HelpText": "The organization owner in Git for the repository that is being deployed.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "59f6ad53-a42d-4e0e-96e4-aa422889cdbf",
"Name": "TesteryGitRepo?",
"Label": "Git Repo?",
"HelpText": "The repository name that is being deployed.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "ecd2de3e-bed5-4028-8fbe-b71f16e68ac4",
"Name": "TesteryGitBranch?",
"Label": "Git Branch?",
"HelpText": "The Git branch the deploy came from.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "e24fd5af-d8d3-4cec-8e33-f3ff3b043e14",
"Name": "TesteryStatusName?",
"Label": "Status Name?",
"HelpText": "The name you want to use on the Git status, as plain text.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "7c73a878-0033-43d0-b5e6-cab98b0fb549",
"Name": "TesterySkipVCSUpdates?",
"Label": "SkipVCSUpdates?",
"HelpText": "Check this if you do not want to submit status updates to Version Control.",
"DefaultValue": "False",
"DisplaySettings": {
"Octopus.ControlType": "Checkbox"
}
}
],
"Properties": {
"Octopus.Action.RunOnServer": "true",
"Octopus.Action.Script.ScriptSource": "Inline",
"Octopus.Action.Script.Syntax": "Bash",
"Octopus.Action.Script.ScriptBody": "set -e\n\nTOKEN=$(get_octopusvariable \"TesteryToken\")\nPROJECT_KEY=$(get_octopusvariable \"TesteryProjectKey\")\nENVIRONMENT_KEY=$(get_octopusvariable \"TesteryEnvironmentKey\")\nBUILD_ID=$(get_octopusvariable \"TesteryBuildId\")\nOUTPUT=$(get_octopusvariable \"TesteryOutput\")\nGIT_REF=$(get_octopusvariable \"TesteryGitCommit?\")\nGIT_BRANCH=$(get_octopusvariable \"TesteryGitBranch?\")\nGIT_OWNER=$(get_octopusvariable \"TesteryGitOwner?\")\nGIT_PROVIDER=$(get_octopusvariable \"TesteryGitProvider?\")\nWAIT_FOR_RESULTS=$(get_octopusvariable \"TesteryWaitForResults?\")\nFAIL_ON_FAILURE=$(get_octopusvariable \"TesteryFailOnFailure?\")\nSKIP_VSC_UPDATE=$(get_octopusvariable \"TesterySkipVCSUpdates?\")\nSTATUS_NAME=$(get_octopusvariable \"TesteryStatusName?\")\n\nif [ \"$GIT_PROVIDER\" = \"None\" ] ; then\n GIT_PROVIDER=\nfi\n\nif [ \"$WAIT_FOR_RESULTS\" = \"False\" ] ; then\n WAIT_FOR_RESULTS=\nfi\n\nif [ \"$FAIL_ON_FAILURE\" = \"False\" ] ; then\n FAIL_ON_FAILURE=\nfi\n\nif [ \"$SKIP_VSC_UPDATE\" = \"False\" ] ; then\n SKIP_VSC_UPDATE=\nfi\n\nexport PATH=\"$HOME/.local/bin:$PATH\"\npip install --user testery --upgrade\n\ntestery create-deploy --token $TOKEN \\\n --project-key $PROJECT_KEY \\\n --environment-key $ENVIRONMENT_KEY \\\n --build-id $BUILD_ID \\\n --output $OUTPUT \\\n ${GIT_REF:+ --git-ref \"$GIT_REF\"} \\\n ${GIT_BRANCH:+ --git-branch \"$GIT_BRANCH\"} \\\n ${GIT_OWNER:+ --git-owner \"$GIT_OWNER\"} \\\n ${GIT_PROVIDER:+ --git-provider \"$GIT_PROVIDER\"} \\\n ${STATUS_NAME:+ --status-name \"$STATUS_NAME\"} \\\n ${WAIT_FOR_RESULTS:+ --wait-for-results} \\\n ${FAIL_ON_FAILURE:+ --fail-on-failure} \\\n ${SKIP_VSC_UPDATE:+ --skip-vcs-updates}"
},
"Category": "Testery",
"HistoryUrl": "https://github.com/OctopusDeploy/Library/commits/master/step-templates//opt/buildagent/work/a381802920158308/step-templates/testery-report-deployment.json",
"Website": "/step-templates/9c85f96e-09d3-4814-948a-aef8708740b5",
"Logo": "iVBORw0KGgoAAAANSUhEUgAAALcAAACqCAYAAADvJt7aAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAbYSURBVHhe7Z3BkSNFEEV3sQATwAM8AM5c1gRM4MAdrpwAD8ADjtyAG0fwYPFgsQDqh6ZjZxTZ6q6u6urMrPcifoxiY9QhzT691WpmWq9gat6UfXm7CJCLt2X/PX1EckiDZJbYz4fkkIKl2taQHMJiVdsakkM4HlXbGpJDCPZW2xqSg2tqq20NycEdLdW2huTghh7VtqbjflYGcAm9q23t9zIkh+GcVW1rSA7DGFFta0gOp/Jh2chqW0NyOIVvyyzhrhiSQzdU7XdllmhXDsmhGU/VtobkcAiv1baG5FCF92pbQ3LYJFK1rSE5rBKx2taQHF4QvdrWDkn++uljFD4p018erPNF2de3i+n4o0z/Kkn2dOhOWY9s9n4tP4KqOlrH9LZdJf/g6SPk4J+yn24XU/Np2W9lDyVH7lzon+yZeCg5cudhlmpbSHLkTsxs1X7Ov2U/3C6+B7lzMHO1hcTWy58vQO4cUG0D5I4P1TaqLZA7PlR7BeSODdVeqbZA7thQ7Qcgd1yo9oNqC+SOC9XeALljQrU3qi2QOyZUewfIHQ+qvaPaArnjQbV3gtyxoNo7qy2QOxZUuwLkjgPVrqi2QO44UO1KkDsGVLuy2gK5YzBztfXArq62QG7/zF5tPbCrqy2Q2z+zV/vwAxu5fUO1G4h2OjWdn0K/xj8L35X9ers4BJ2u7vvb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VewHJ85Ci2qKX3AtIHp8037TrLfcCksckTbXFWXIvIHks0lRbnC33ApL7J1W1xSi5F5DcL6mqLUbLvYDkvkhXbU/ofeL1RkHWW79dvSuLZt2eM6af/oST8Sh5drkp9mA8SZ5dbqp9ER4kzyw31XbAlZJnlptqO+IKybPKTbWdMlLyrHLra5iaq17nboXXydvQ10xfQwiAKvRLmVWo1mUsd/pqi6jlvkcVelP2eZm+2wbrUO3g6FUA/YfJqlbtspV7imqLLOW+R2JLcEr+EqqdkJaSZyr3NNUWr58+zoIkl6w1p4i78ifmvnn62ANVW68wQXJ6PiePsqmqDfNIrm94waRkl5xqQ0rJqTa8IJPkVBtMoktOtWGTqJJTbdhNJMmpNhwiguRUG5rwKjnVhm54k5xqQ3c8SE614VSulJxqwxBGS061YTijJKfacBmSXO/KbInZOqoNLtAvDejXvSxJj45qgyt6SU61wS2tklNtcM8Ryak2hKJGcqoNIdmSnGpDeNYkp9qQhueSU21IiSSn2gAAAAAAAAAAAACvXv0P3aW8VNTlYhYAAAAASUVORK5CYII=",
"$Meta": {
"Type": "ActionTemplate"
}
}
Page updated on Friday, February 13, 2026