> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# circleci/spinnaker

This orb is no longer supported by CircleCI 
because of limited or no use. If you would like 
to use this orb or create your own version feel 
free to fork the repository and use the following 
https://circleci.com/blog/building-private-orbs/ 
as a guide to making this orb into a private orb 
for your own use. 
An orb to simplify deployments with Spinnaker.
Repo: https://github.com/CircleCI-Public/spinnaker-orb


## Commands

### install-spin

Installs the spin CLI and optionally sets up the configuration directory.
Currently this command only supports installation on Linux.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `configure-spin` | boolean | false | Create a configuration for spin in the user's home directory.
Either "spin-config-path" or "generate-config" should be enabled
if the configure-spin parameter is set to true.
 |
| `generate-config` | boolean | false | Generates a spin config with authentication disabled and for
connection to a local Gate endpoint at the default port.
Either "spin-config-path" or "generate-config" should be enabled
if the configure-spin parameter is set to true.
This parameter is ineffective when "spin-config-path" is set to a non-default
value.
 |
| `spin-config-path` | string |  | Path to config file to be copied to spin's config directory.
Either "spin-config-path" or "generate-config" should be enabled
if the configure-spin parameter is set to true.
Takes precedence over "generate-config".
 |

### set-up-port-forwarding

Set up port forwarding for the Deck (Spinnaker UI) and Gate (Spinnaker API Gateway)
pods in a Kubernetes-based Spinnaker installation.
Port forwarding will be run as a background step for each pod,
which means that the background steps will run concurrently with the next
step(s) in the configuration, unless  the "wait" parameter is set to true.
Note: requires kubectl to be configured to connect to the kubernetes cluster.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `deck-protocol` | enum | http | The protocol used for port forwarding to the Deck pod.
This is only effective when the "wait" parameter is enabled.
 |
| `deck-source-port` | integer | -1 | Specify the local port number in the Deck (Spinnaker UI) pod that port forwarding will be
set up for.
The default value of -1 will cause the default local port number for the Deck pod
in a Spinnaker installation to be used.
 |
| `deck-target-port` | integer | -1 | Specify the target port number for port forwarding to the Deck pod.
The default value of -1 will cause the same port number to be used as the
default local port number for the Deck pod in a Spinnaker installation.
 |
| `gate-protocol` | enum | http | The protocol used for port forwarding to the Gate pod.
This is only effective when the "wait" parameter is enabled.
 |
| `gate-source-port` | integer | -1 | Specify the local port number in the Gate (Spinnaker API Gateway)
pod that port forwarding will be set up for.
The default value of -1 will cause the default local port number for the Deck pod
in a Spinnaker installation to be used.
 |
| `gate-target-port` | integer | -1 | Specify the target port number for port forwarding to the Gate pod.
The default value of -1 will cause the same port number to be used as the
default local port number for the Deck pod in a Spinnaker installation.
 |
| `namespace` | string |  | The kubernetes namespace in which Spinnaker was installed.
 |
| `wait` | boolean |  | Whether to wait for port forwarding setup completion.
 |

### trigger-pipeline-with-webhook

Triggers an application's pipeline in Spinnaker
by invoking a webhook which must be pre-configured in Spinnaker.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `payload` | string |  | JSON payload. Escaping of double quotes in the payload is required;
please check this parameter's description for instructions.
If the parameter is surrounded with double quotes, the double quotes in the payload need to be escaped like in the
following example.
e.g. "{\\\"mystatus\\\": \\\"success\\\", \\\"mybuild\\\": \\\"$CIRCLE_BUILD_NUM\\\", \\\"mymessage\\\": \\\"I've got it\\\"}"

If the parameter is surrounded with single quotes, the double quotes in the payload need to be escaped like in the
following example, and single quotes will also need to be escaped.
e.g. '{\"mystatus\": \"success\", \"mybuild\": \"$CIRCLE_BUILD_NUM\", \"mymessage\": \"It\u0027s possible\"}'
 |
| `webhook-endpoint` | env_var_name | SPINNAKER_WEBHOOK | Name of environment variable defined in CircleCI
containing the webhook endpoint URL pre-configured in Spinnaker
Example of value: http://localhost:8084/webhooks/webhook/myappwebhook
 |

## Executors

### default-stretch

This is a default executor that is based on Debian Stretch and has
Python 3 installed.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag` | string | 3-stretch | Pick a specific circleci/python image variant:
https://hub.docker.com/r/circleci/python/tags
 |

## Examples

### trigger-pipeline-with-webhook

Trigger a Spinnaker application pipeline by sending a request
to a preconfigured webhook endpoint.


```yaml
version: '2.1'
orbs:
  aws-eks: circleci/aws-eks@0.2.0
  spinnaker: circleci/spinnaker@x.y.z
jobs:
  send-webhook:
    executor: spinnaker/default-stretch
    parameters:
      aws-region:
        description: |
          AWS region that the EKS cluster is in
        type: string
      cluster-name:
        description: |
          Name of the EKS cluster
        type: string
    steps:
      - aws-eks/update-kubeconfig-with-authenticator:
          aws-region: << parameters.aws-region >>
          cluster-name: << parameters.cluster-name >>
          install-kubectl: true
      - spinnaker/set-up-port-forwarding:
          namespace: spinnaker
          wait: true
      - spinnaker/trigger-pipeline-with-webhook:
          payload: >-
            {\"status\": \"success\", \"jobid\": \"$CIRCLE_WORKFLOW_JOB_ID\",
            \"message\": \"I've got it\"}
          webhook-endpoint: SPINNAKER_WEBHOOK
workflows:
  example-workflow:
    jobs:
      - send-webhook:
          aws-region: ap-southeast-2
          cluster-name: my-eks-tests
```