Git Product home page Git Product logo

roer's Introduction

roer

END OF LIFE: Roer has been EOL'd. Please use spin instead: https://github.com/spinnaker/spin

A thin CLI for Spinnaker.

This project is aimed to provide a thin, limited client that's suitable for CI environments where you may want to publish Pipeline Templates or update pipeline configurations in Spinnaker. For a CLI to help configure and operate use halyard: config & operating utilities are not in Roer's scope.

You can download the most recent version from the Releases tab.

Usage

Make sure your Spinnaker installation has pipeline-templates enabled:

hal config features edit --pipeline-templates true

Export SPINNAKER_API pointing to your Gate API.

NAME:
   roer - Spinnaker CLI

USAGE:
   main [global options] command [command options] [arguments...]

VERSION:
   dev

COMMANDS:
     pipeline           pipeline tasks
     pipeline-template  pipeline template tasks
     help, h            Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --verbose, -v               show debug messages
   --certPath value, -c value  HTTPS x509 cert path
   --keyPath value, -k value   HTTPS x509 key path
   --version                   print the version

Commands

pipeline-template

NAME:
   roer pipeline-template - pipeline template tasks

USAGE:
   roer pipeline-template  command [command options] [arguments...]

VERSION:
   dev

COMMANDS:
     publish  publish a pipeline template
     plan     validate a pipeline template and or plan a configuration
     convert  converts an existing, non-templated pipeline config into a scaffolded template

Publish template for use:

$ SPINNAKER_API=https://localhost:7002 \
  go run cmd/roer/main.go pipeline-template publish examples/wait-template.yml

Plan a pipeline run using the template (invalid config example):

$ SPINNAKER_API=https://localhost:7002 \
  go run cmd/roer/main.go pipeline-template plan examples/wait-config-invalid.yml
{
  "errors": [
    {
      "location": "configuration:stages.noConfigStanza",
      "message": "Stage configuration is unset",
      "severity": "FATAL"
    },
    {
      "location": "configuration:stages.noConfigStanza",
      "message": "A configuration-defined stage should have either dependsOn or an inject rule defined",
      "severity": "WARN"
    }
  ],
  "message": "Pipeline template is invalid",
  "status": "BAD_REQUEST"
}

Plan a pipeline run using the template (valid config example):

$ SPINNAKER_API=https://localhost:7002 \
  go run cmd/roer/main.go pipeline-template plan examples/wait-config.yml
{
  "application": "spintest",
  "id": "unknown",
  "keepWaitingPipelines": false,
  "limitConcurrent": true,
  "name": "mpt",
  "notifications": [],
  "parameterConfig": [],
  "stages": [
    {
      "id": "947eb68b-1b03-4f33-b7c2-b3fa38eeef94",
      "name": "wait",
      "refId": "wait",
      "requisiteStageRefIds": [],
      "type": "wait",
      "waitTime": 5
    }
  ],
  "trigger": {
    "parameters": {},
    "type": "manual",
    "user": "anonymous"
  }
}

pipeline

Create or update a managed pipeline within an application:

$ SPINNAKER_API=https://localhost:7002 \
  go run cmd/roer/main.go pipeline save examples/wait-config.yml

Development

All dependencies have been vendored into the repository and are managed via govendor. You can sync the deps with govendor sync.

$ go run cmd/roer/main.go

Extending

You can extend the interface, as well as inject your own HTTP client by providing your own main.go. This can be useful if you need to provide custom auth logic, or if you want to add new commands, but not contribute them directly to the project.

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.