@@ -2,7 +2,7 @@ version: "1.0"
2
2
kind : step-type
3
3
metadata :
4
4
name : octopusdeploy-run-runbook
5
- version : 1.0.0
5
+ version : 1.0.1
6
6
title : Run a runbook in Octopus Deploy
7
7
isPublic : true
8
8
description : Run a runbook in Octopus Deploy
@@ -19,7 +19,7 @@ metadata:
19
19
maintainers :
20
20
- name : OctopusDeploy
21
21
examples :
22
- - description : Basic usage of the run a runbook step
22
+ - description : Basic usage of the run a runbook step with API key
23
23
workflow :
24
24
run-runbook :
25
25
type : octopusdeploy-run-runbook
@@ -32,7 +32,7 @@ metadata:
32
32
ENVIRONMENTS :
33
33
- " Development"
34
34
- " Production"
35
- - description : Complex usage of the run a runbook step
35
+ - description : Complex usage of the run a runbook step with API key
36
36
workflow :
37
37
run-runbook :
38
38
type : octopusdeploy-run-runbook
@@ -52,6 +52,39 @@ metadata:
52
52
TENANT_TAGS :
53
53
- " Tenant tag 1"
54
54
USE_GUIDED_FAILURE : " false"
55
+ - description : Basic usage of the run a runbook step with Octopus access token
56
+ workflow :
57
+ run-runbook :
58
+ type : octopusdeploy-run-runbook
59
+ arguments :
60
+ OCTOPUS_ACCESS_TOKEN : " ${{OCTOPUS_ACCESS_TOKEN}}"
61
+ OCTOPUS_URL : " ${{OCTOPUS_URL}}"
62
+ OCTOPUS_SPACE : " Spaces 1"
63
+ PROJECT : " Project Name"
64
+ NAME : " Runbook Name"
65
+ ENVIRONMENTS :
66
+ - " Development"
67
+ - " Production"
68
+ - description : Complex usage of the run a runbook step with Octopus access token
69
+ workflow :
70
+ run-runbook :
71
+ type : octopusdeploy-run-runbook
72
+ arguments :
73
+ OCTOPUS_ACCESS_TOKEN : " ${{OCTOPUS_ACCESS_TOKEN}}"
74
+ OCTOPUS_URL : " ${{OCTOPUS_URL}}"
75
+ OCTOPUS_SPACE : " Spaces 1"
76
+ PROJECT : " Project Name"
77
+ NAME : " Runbook Name"
78
+ ENVIRONMENTS :
79
+ - " Development"
80
+ - " Production"
81
+ VARIABLES :
82
+ - " Label:Value"
83
+ TENANTS :
84
+ - " Tenant 1"
85
+ TENANT_TAGS :
86
+ - " Tenant tag 1"
87
+ USE_GUIDED_FAILURE : " false"
55
88
spec :
56
89
arguments : |-
57
90
{
@@ -61,19 +94,27 @@ spec:
61
94
"name": "octopusdeploy-run-runbook",
62
95
"additionalProperties": false,
63
96
"patterns": [],
64
- "required": ["OCTOPUS_API_KEY", "OCTOPUS_URL", "OCTOPUS_SPACE", "PROJECT", "NAME", "ENVIRONMENTS"],
97
+ "required": ["OCTOPUS_URL", "OCTOPUS_SPACE", "PROJECT", "NAME", "ENVIRONMENTS"],
98
+ "oneOf": [
99
+ {"required": ["OCTOPUS_API_KEY"]},
100
+ {"required": ["OCTOPUS_ACCESS_TOKEN"]}
101
+ ],
65
102
"properties": {
66
103
"OCTOPUS_API_KEY": {
67
104
"type": "string",
68
- "description": "API key for octopus deploy (required)"
105
+ "description": "API key for octopus deploy (required when OCTOPUS_ACCESS_TOKEN is not provided)"
106
+ },
107
+ "OCTOPUS_ACCESS_TOKEN": {
108
+ "type": "string",
109
+ "description": "Access token for octopus deploy (required when OCTOPUS_API_KEY is not provided)"
69
110
},
70
111
"OCTOPUS_URL": {
71
112
"type": "string",
72
113
"description": "URL of the octopus deploy server (required)"
73
114
},
74
115
"OCTOPUS_SPACE": {
75
116
"type": "string",
76
- "description": "API key for octopus deploy (required)"
117
+ "description": "Workspace for octopus deploy (required)"
77
118
},
78
119
"PROJECT": {
79
120
"type": "string",
@@ -171,8 +212,13 @@ spec:
171
212
--no-prompt)
172
213
- cf_export RUNBOOK_RUNS=$OUTPUT
173
214
environment:
174
- - 'OCTOPUS_URL=[[ .Arguments.OCTOPUS_URL]]'
215
+ [[ if .Arguments.OCTOPUS_API_KEY ]]
175
216
- 'OCTOPUS_API_KEY=[[.Arguments.OCTOPUS_API_KEY]]'
217
+ [[- end ]]
218
+ [[ if .Arguments.OCTOPUS_ACCESS_TOKEN ]]
219
+ - 'OCTOPUS_ACCESS_TOKEN=[[.Arguments.OCTOPUS_ACCESS_TOKEN]]'
220
+ [[- end ]]
221
+ - 'OCTOPUS_URL=[[.Arguments.OCTOPUS_URL]]'
176
222
- 'OCTOPUS_SPACE=[[.Arguments.OCTOPUS_SPACE]]'
177
223
delimiters :
178
224
left : " [["
0 commit comments