1+ version : " 1.0"
2+ kind : step-type
3+ metadata :
4+ name : octopusdeploy-push-build-information
5+ version : 1.0.0
6+ title : Push build information to Octopus Deploy
7+ isPublic : true
8+ description : Push build information to Octopus Deploy
9+ sources :
10+ - " https://github.com/codefresh-io/steps/tree/master/incubating/octopusdeploy-push-build-information"
11+ stage : incubating
12+ official : true
13+ categories :
14+ - deployment
15+ icon :
16+ type : svg
17+ url : " https://cdn.jsdelivr.net/gh/codefresh-io/steps/incubating/octopusdeploy-push-build-information/push_build_information.svg"
18+ background : " #F4F6F8"
19+ maintainers :
20+ - name : OctopusDeploy
21+ examples :
22+ - description : Basic usage of the push build information step
23+ workflow :
24+ push-build-information :
25+ type : octopusdeploy-push-build-information
26+ arguments :
27+ OCTOPUS_API_KEY : " ${{OCTOPUS_API_KEY}}"
28+ OCTOPUS_URL : " ${{OCTOPUS_URL}}"
29+ OCTOPUS_SPACE : " Spaces 1"
30+ PACKAGE_IDS :
31+ - " SomePackage"
32+ - " SomeOtherPackage"
33+ FILE : " SomeFile.json"
34+ VERSION : " 1.0.0"
35+ OVERWRITE_MODE : " fail"
36+ spec :
37+ arguments : |-
38+ {
39+ "definitions": {},
40+ "$schema": "http://json-schema.org/draft-07/schema#",
41+ "type": "object",
42+ "name": "octopusdeploy-push-build-information",
43+ "additionalProperties": false,
44+ "patterns": [],
45+ "required": ["OCTOPUS_API_KEY", "OCTOPUS_URL", "OCTOPUS_SPACE", "PACKAGE_IDS", "FILE", "VERSION"],
46+ "properties": {
47+ "OCTOPUS_API_KEY": {
48+ "type": "string",
49+ "description": "API key for octopus deploy (required)"
50+ },
51+ "OCTOPUS_URL": {
52+ "type": "string",
53+ "description": "URL of the octopus deploy server (required)"
54+ },
55+ "OCTOPUS_SPACE": {
56+ "type": "string",
57+ "description": "API key for octopus deploy (required)"
58+ },
59+ "PACKAGE_IDS": {
60+ "type": "array",
61+ "items": {
62+ "type": "string"
63+ },
64+ "description": "The ID of the package, may be specified multiple times. Any arguments without flags will be treated as package IDs (required)"
65+ },
66+ "FILE": {
67+ "type": "string",
68+ "description": "Path to Octopus Build Information Json file (required)"
69+ },
70+ "VERSION": {
71+ "type": "string",
72+ "description": "The version of the package (required)"
73+ },
74+ "OVERWRITE_MODE": {
75+ "type": "string",
76+ "description": "Action when a build information already exists. Valid values are 'fail', 'overwrite', 'ignore'. Default is 'fail' (optional)"
77+ }
78+ }
79+ }
80+ stepsTemplate : |-
81+ push-build-information:
82+ name: octopusdeploy-push-build-information
83+ image: octopuslabs/octopus-cli
84+ tag: latest
85+ commands:
86+ - octopus build-information upload
87+ [[- range $val := .Arguments.PACKAGE_IDS ]] --package-id "[[ $val ]]" [[ end ]]
88+ [[- if .Arguments.VERSION ]] --version "[[ .Arguments.VERSION ]]" [[ end ]]
89+ [[- if .Arguments.FILE ]] --file "[[ .Arguments.FILE ]]" [[ end ]]
90+ [[- if .Arguments.OVERWRITE_MODE ]] --overwrite-mode "[[ .Arguments.OVERWRITE_MODE ]]" [[ end ]]
91+ --no-prompt
92+ environment:
93+ - 'OCTOPUS_URL=[[.Arguments.OCTOPUS_URL]]'
94+ - 'OCTOPUS_API_KEY=[[.Arguments.OCTOPUS_API_KEY]]'
95+ - 'OCTOPUS_SPACE=[[.Arguments.OCTOPUS_SPACE]]'
96+ delimiters :
97+ left : " [["
98+ right : " ]]"
0 commit comments