vmware-archive / spinnaker-resource

A Concourse resource to interact with Spinnaker
Apache License 2.0
3 stars 4 forks source link

Concourse Spinnaker Resource

This resource is under active development and is an alpha release

Features :

Source Configuration

Behaviour

check

Pipeline executions will be found by fetching pipeline executions for the configured application, filtered by the pipeline name. If statuses is configured, the list will be filtered by statuses.

The pipeline execution id will be used as the version of the resource.

API : GET /applications/{application}/pipelines

in

Places the following files in the destination:

out: Triggers a pipeline

Triggers a Spinnaker pipeline.

Parameters

Example Pipelines

Put

---
resource_types:
- name: spinnaker
  type: docker-image
  source:
    repository: concourse/spinnaker-resource

- name: trigger-spinnaker-pipeline
  type: spinnaker
  source:
    spinnaker_api: https://api.spincon.ci.cf-app.com:8085
    spinnaker_application: nvidia
    spinnaker_pipeline: deploy
    spinnaker_x509_cert: ((spinnaker_x509_cert))
    spinnaker_x509_key: ((spinnaker_x509_key))
    status_check_timeout: 2m
    statuses:
    - succeeded

jobs:
- name: trigger-pipeline
  plan:
  - put: trigger-spinnaker-pipeline
    params:
      trigger_params:
        build_id: (build ${BUILD_ID})
      artifacts_json_file: some-other-resource/artifact.json
      trigger_params_json_file: some-task-output/params.json

Get

---
resource_types:
- name: spinnaker
  type: docker-image
  source:
    repository: concourse/spinnaker-resource

resources:
  - name: listen-on-spinnaker-executions
    type: spinnaker
    source:
      spinnaker_api: ((spinnaker-api))
      client_x509_cert: ((client-x509-cert))
      client_x509_key: ((client-x509-key))
      spinnaker_application: samplespinnakerapp
      spinnaker_pipeline: samplespinnakerpipeline
      statuses:
        - SUCCEEDED
        - TERMINAL

jobs:
- name: trigger-pipeline
  plan:
  - get: listen-on-spinnaker-executions
    trigger: true