Skip to content

Commit a910f90

Browse files
Allow access key auth for push-package
1 parent 0b8eba2 commit a910f90

File tree

1 file changed

+31
-6
lines changed
  • incubating/octopusdeploy-push-package

1 file changed

+31
-6
lines changed

incubating/octopusdeploy-push-package/step.yaml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "1.0"
22
kind: step-type
33
metadata:
44
name: octopusdeploy-push-package
5-
version: 1.0.0
5+
version: 1.0.1
66
title: Push a package in Octopus Deploy
77
isPublic: true
88
description: Push a package in Octopus Deploy
@@ -19,7 +19,7 @@ metadata:
1919
maintainers:
2020
- name: OctopusDeploy
2121
examples:
22-
- description: Basic usage of the push a package step
22+
- description: Basic usage of the push a package step with API key
2323
workflow:
2424
push-package:
2525
type: octopusdeploy-push-package
@@ -31,6 +31,18 @@ metadata:
3131
- "SomePackage.1.0.0.zip"
3232
- "SomeOtherPackage.1.0.0.zip"
3333
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"
3446
spec:
3547
arguments: |-
3648
{
@@ -40,19 +52,27 @@ spec:
4052
"name": "octopusdeploy-push-package",
4153
"additionalProperties": false,
4254
"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+
],
4460
"properties": {
4561
"OCTOPUS_API_KEY": {
4662
"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)"
4868
},
4969
"OCTOPUS_URL": {
5070
"type": "string",
5171
"description": "URL of the octopus deploy server (required)"
5272
},
5373
"OCTOPUS_SPACE": {
5474
"type": "string",
55-
"description": "API key for octopus deploy (required)"
75+
"description": "Workspace for octopus deploy (required)"
5676
},
5777
"PACKAGES": {
5878
"type": "array",
@@ -78,8 +98,13 @@ spec:
7898
[[- if .Arguments.OVERWRITE_MODE ]] --overwrite-mode "[[ .Arguments.OVERWRITE_MODE ]]" [[ end ]]
7999
--no-prompt
80100
environment:
81-
- 'OCTOPUS_URL=[[.Arguments.OCTOPUS_URL]]'
101+
[[ if .Arguments.OCTOPUS_API_KEY ]]
82102
- '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]]'
83108
- 'OCTOPUS_SPACE=[[.Arguments.OCTOPUS_SPACE]]'
84109
delimiters:
85110
left: "[["

0 commit comments

Comments
 (0)