Skip to content

Commit

Permalink
Adds push package step (#704)
Browse files Browse the repository at this point in the history
Co-authored-by: Shane Gill <[email protected]>
  • Loading branch information
mik-ky and tothegills authored Sep 23, 2024
1 parent bb498b4 commit 9936acd
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
9 changes: 9 additions & 0 deletions incubating/octopusdeploy-push-package/push_packages.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions incubating/octopusdeploy-push-package/step.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
version: "1.0"
kind: step-type
metadata:
name: octopusdeploy-push-package
version: 1.0.0
title: Push a package in Octopus Deploy
isPublic: true
description: Push a package in Octopus Deploy
sources:
- "https://github.com/codefresh-io/steps/tree/master/incubating/octopusdeploy-push-package"
stage: incubating
official: true
categories:
- deployment
icon:
type: svg
url: "https://cdn.jsdelivr.net/gh/codefresh-io/steps/incubating/octopusdeploy-push-package/push_packages.svg"
background: "#F4F6F8"
maintainers:
- name: OctopusDeploy
examples:
- description: Basic usage of the push a package step
workflow:
push-package:
type: octopusdeploy-push-package
arguments:
OCTOPUS_API_KEY: "${{OCTOPUS_API_KEY}}"
OCTOPUS_URL: "${{OCTOPUS_URL}}"
OCTOPUS_SPACE: "Spaces 1"
PACKAGES:
- "SomePackage.1.0.0.zip"
- "SomeOtherPackage.1.0.0.zip"
OVERWRITE_MODE: "fail"
spec:
arguments: |-
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"name": "octopusdeploy-push-package",
"additionalProperties": false,
"patterns": [],
"required": ["OCTOPUS_API_KEY", "OCTOPUS_URL", "OCTOPUS_SPACE", "PACKAGES"],
"properties": {
"OCTOPUS_API_KEY": {
"type": "string",
"description": "API key for octopus deploy (required)"
},
"OCTOPUS_URL": {
"type": "string",
"description": "URL of the octopus deploy server (required)"
},
"OCTOPUS_SPACE": {
"type": "string",
"description": "API key for octopus deploy (required)"
},
"PACKAGES": {
"type": "array",
"items": {
"type": "string"
},
"description": "Package to upload, may be specified multiple times. Any arguments without flags will be treated as packages (required)"
},
"OVERWRITE_MODE": {
"type": "string",
"description": "Action when a package already exists. Valid values are 'fail', 'overwrite', 'ignore'. Default is 'fail' (optional)"
}
}
}
stepsTemplate: |-
push-package:
name: octopusdeploy-push-package
image: octopuslabs/octopus-cli
tag: latest
commands:
- octopus package push
[[- range $val := .Arguments.PACKAGES ]] --package "[[ $val ]]" [[ end ]]
[[- if .Arguments.OVERWRITE_MODE ]] --overwrite-mode "[[ .Arguments.OVERWRITE_MODE ]]" [[ end ]]
--no-prompt
environment:
- 'OCTOPUS_URL=[[.Arguments.OCTOPUS_URL]]'
- 'OCTOPUS_API_KEY=[[.Arguments.OCTOPUS_API_KEY]]'
- 'OCTOPUS_SPACE=[[.Arguments.OCTOPUS_SPACE]]'
delimiters:
left: "[["
right: "]]"

0 comments on commit 9936acd

Please sign in to comment.