@@ -2,7 +2,7 @@ version: "1.0"
2
2
kind : step-type
3
3
metadata :
4
4
name : octopusdeploy-push-package
5
- version : 1.0.0
5
+ version : 1.0.1
6
6
title : Push a package in Octopus Deploy
7
7
isPublic : true
8
8
description : Push a package in Octopus Deploy
@@ -19,7 +19,7 @@ metadata:
19
19
maintainers :
20
20
- name : OctopusDeploy
21
21
examples :
22
- - description : Basic usage of the push a package step
22
+ - description : Basic usage of the push a package step with API key
23
23
workflow :
24
24
push-package :
25
25
type : octopusdeploy-push-package
@@ -31,6 +31,18 @@ metadata:
31
31
- " SomePackage.1.0.0.zip"
32
32
- " SomeOtherPackage.1.0.0.zip"
33
33
OVERWRITE_MODE : " fail"
34
+ - description : Basic usage of the push a package step with Octopus access token
35
+ workflow :
36
+ push-package :
37
+ type : octopusdeploy-push-package
38
+ arguments :
39
+ OCTOPUS_ACCESS_TOKEN : " ${{OCTOPUS_ACCESS_TOKEN}}"
40
+ OCTOPUS_URL : " ${{OCTOPUS_URL}}"
41
+ OCTOPUS_SPACE : " Spaces 1"
42
+ PACKAGES :
43
+ - " SomePackage.1.0.0.zip"
44
+ - " SomeOtherPackage.1.0.0.zip"
45
+ OVERWRITE_MODE : " fail"
34
46
spec :
35
47
arguments : |-
36
48
{
@@ -40,19 +52,27 @@ spec:
40
52
"name": "octopusdeploy-push-package",
41
53
"additionalProperties": false,
42
54
"patterns": [],
43
- "required": ["OCTOPUS_API_KEY", "OCTOPUS_URL", "OCTOPUS_SPACE", "PACKAGES"],
55
+ "required": ["OCTOPUS_URL", "OCTOPUS_SPACE", "PACKAGES"],
56
+ "oneOf": [
57
+ {"required": ["OCTOPUS_API_KEY"]},
58
+ {"required": ["OCTOPUS_ACCESS_TOKEN"]}
59
+ ],
44
60
"properties": {
45
61
"OCTOPUS_API_KEY": {
46
62
"type": "string",
47
- "description": "API key for octopus deploy (required)"
63
+ "description": "API key for octopus deploy (required when OCTOPUS_ACCESS_TOKEN is not provided)"
64
+ },
65
+ "OCTOPUS_ACCESS_TOKEN": {
66
+ "type": "string",
67
+ "description": "Access token for octopus deploy (required when OCTOPUS_API_KEY is not provided)"
48
68
},
49
69
"OCTOPUS_URL": {
50
70
"type": "string",
51
71
"description": "URL of the octopus deploy server (required)"
52
72
},
53
73
"OCTOPUS_SPACE": {
54
74
"type": "string",
55
- "description": "API key for octopus deploy (required)"
75
+ "description": "Workspace for octopus deploy (required)"
56
76
},
57
77
"PACKAGES": {
58
78
"type": "array",
78
98
[[- if .Arguments.OVERWRITE_MODE ]] --overwrite-mode "[[ .Arguments.OVERWRITE_MODE ]]" [[ end ]]
79
99
--no-prompt
80
100
environment:
81
- - 'OCTOPUS_URL=[[ .Arguments.OCTOPUS_URL]]'
101
+ [[ if .Arguments.OCTOPUS_API_KEY ]]
82
102
- 'OCTOPUS_API_KEY=[[.Arguments.OCTOPUS_API_KEY]]'
103
+ [[- end ]]
104
+ [[ if .Arguments.OCTOPUS_ACCESS_TOKEN ]]
105
+ - 'OCTOPUS_ACCESS_TOKEN=[[.Arguments.OCTOPUS_ACCESS_TOKEN]]'
106
+ [[- end ]]
107
+ - 'OCTOPUS_URL=[[.Arguments.OCTOPUS_URL]]'
83
108
- 'OCTOPUS_SPACE=[[.Arguments.OCTOPUS_SPACE]]'
84
109
delimiters :
85
110
left : " [["
0 commit comments