GithubHelp home page GithubHelp logo

nickflory / spinnaker-resource Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vmware-archive/spinnaker-resource

0.0 0.0 0.0 78 KB

A Concourse resource to interact with Spinnaker

License: Apache License 2.0

Dockerfile 1.65% Go 98.35%

spinnaker-resource's Introduction

Concourse Spinnaker Resource

This resource is under active development and is an alpha release

Features :

  • Trigger a Spinnaker pipeline with optional artifacts from Concourse.
  • Trigger a Concourse job based on the status of a Spinnaker pipeline.

Source Configuration

  • spinnaker_api: Required the url of the Spinnaker api microservice.
  • spinnaker_application: Required The Spinnaker application you would like to trigger.
  • spinnaker_pipeline: Required The Spinnaker pipeline you would like to trigger.
  • client_x509_cert: Required Client certificate to authenticate with Spinnaker.
  • client_x509_key: Required Client key to authenticate with Spinnaker.
  • statuses: Optional Array of Spinnaker pipeline execution statuses. Currently supported statuses by Spinnaker: [NOT_STARTED, RUNNING, PAUSED, SUSPENDED, SUCCEEDED, FAILED_CONTINUE, TERMINAL, CANCELED, REDIRECT, STOPPED, SKIPPED, BUFFERED] - Reference.
    • if specified, the status will be used to filter the pipeline execution statuses when detecting new versions during the check step.
    • if specified ,the put step will block until the specified status(es) is reached.
  • statuses_check_timeout: Optional The amount of time after which the put step will timeout waiting for the statuses. Default value will be 30m.

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:

  • metadata.json: Contains the pipeline execution metadata returned from the Spinnaker API.

  • version: A file containing the pipeline execution id.

API : GET /pipelines/{id}

out: Triggers a pipeline

Triggers a Spinnaker pipeline.

Parameters

  • artifacts_json_file: Optional path to a file containing the artifacts to trigger the spinnaker pipeline with. File should contain an array of artifacts in JSON format to trigger along with the pipeline in the spinnaker artifact format.

  • trigger_params: Optional build information to send to Spinnaker pipeline execution which can be consumed by the pipeline expressions. Can be any key/value pair. Any metadata will be evaluated prior to triggering the pipeline.

  • trigger_params_json_file: Optional Path to a file that contains parameters to push to the Spinnaker pipeline. This allows the file to be generated by a previous task step. Contents of this file will be merged with trigger_params with the file getting precedence.

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

spinnaker-resource's People

Contributors

youssb avatar xtreme-sameer-vohra avatar kcmannem avatar burdzwastaken avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.