Giter Site home page Giter Site logo

kekeniker / marco Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 105 KB

Marco is a CLI tool for showing Spinnaker application, pipelines and pipeline templates

License: Apache License 2.0

Go 100.00%
spin spinnaker marco go cli pipeline-templates spinnaker-application keisukeyamashita

marco's Introduction

Marco

Marco is a CLI tool for showing Spinnaker application, pipelines and pipeline templates

Usecase

With marco, you can check these items organizantion-wide:

  • All Spinnaker applications name
  • Pipeline and stages statistics

Install

Install by this command.

$ brew install kekeniker/tap/marco

Configuration

marco uses the same configuration file with spinnaker/spin, the Spinnaker CLI.

See details with Configure spin. marco also shares the flags with spin for example --gate-endpoint, etc. You don't have to learn anything.

Usage

Applications

$ marco app list
+------------------------------+-------------------------------+-----------------+---------------+
|             NAME             |             EMAIL             | CLOUD PROVIDERS | INSTANCE PORT |
+------------------------------+-------------------------------+-----------------+---------------+
| app                          |                               | aws             |            80 |
+------------------------------+-------------------------------+-----------------+---------------+
| authority                    | [email protected]               | kubernetes      |            80 |
+------------------------------+-------------------------------+-----------------+---------------+
| marco                        | [email protected]               | kubernetes      |            80 |
+------------------------------+-------------------------------+-----------------+---------------+

You can check the name validation for each cloud provider with --validate option.

$ marco app list  --validate
+------------------------------+-------------------------------+-----------------+---------------+-----------+-----+------+-----+---------------+---------------+-----------+--------------+-------+
|             NAME             |             EMAIL             | CLOUD PROVIDERS | INSTANCE PORT | APPENGINE | AWS | DCOS | GCE | KUBERNETES V1 | KUBERNETES V2 | OPENSTACK | TENCENTCLOUD | TITUS |
+------------------------------+-------------------------------+-----------------+---------------+-----------+-----+------+-----+---------------+---------------+-----------+--------------+-------+
| app                          |                               | aws             |            80 | ✅        | ✅  | ✅   | ✅  | ✅            | ✅            | ✅        | ✅           | ✅    |
+------------------------------+-------------------------------+-----------------+---------------+-----------+-----+------+-----+---------------+---------------+-----------+--------------+-------+
| authority                    | [email protected]               | kubernetes      |            80 | ✅        | ✅  | ✅   | ✅  | ✅            | ✅            | ✅        | ✅           | ✅    |
+------------------------------+-------------------------------+-----------------+---------------+-----------+-----+------+-----+---------------+---------------+-----------+--------------+-------+
| authority                    | [email protected]              | kubernetes      |            80 | ✅        | ✅  | ✅   | ✅  | ✅            | ✅            | ✅        | ✅           | ✅    |
+------------------------------+-------------------------------+-----------------+---------------+-----------+-----+------+-----+---------------+---------------+-----------+--------------+-------+

Pipelines

Specify the Spinnaker application by -a or --application .

$ marco pipeline list -a "marco"
+----------+--------------------------------------+-----------------------------+----------------------------------+-------------+-------------------+----------------+
|   APP    |             PIPELINE ID              |            NAME             |             TEMPLATE             | STAGE REFID |       STAGE       |      TYPE      |
+----------+--------------------------------------+-----------------------------+----------------------------------+-------------+-------------------+----------------+
|  marco   | 1d733082-5368-475e-b8ud-cde5bcfe9eec | Trigger every minute        | (none)                           |           1 | Wait              | wait           |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           2 | Bake (Manifest)   | bakeManifest   |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           3 | Canary Analysis   | kayentaCanary  |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           4 | Disable Cluster   | disableCluster |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           5 | Deploy            | deploy         |
+          +--------------------------------------+-----------------------------+                                  +-------------+-------------------+----------------+
|          | 9b3c34c7-6f5a-5773-8a44-34f0e098f3e2 | Trigger every minite v2     |                                  |           1 | Wait              | wait           |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           2 | Bake (Manifest)   | bakeManifest   |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           3 | Canary Analysis   | kayentaCanary  |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           4 | Disable Cluster   | disableCluster |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           5 | Deploy            | deploy         |
+          +--------------------------------------+-----------------------------+----------------------------------+-------------+-------------------+----------------+
|          | ae74405e-942e-4p13-882f-3d783cbc7f10 | Test from Pipeline Template | deployWithManualJudgement:latest |           1 | Manual Judgment   | manualJudgment |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           2 | Deploy (Manifest) | deployManifest |
+----------+--------------------------------------+-----------------------------+----------------------------------+-------------+-------------------+----------------+

Use --all flag to see the pipelines for all applications. Also, if you don't want to expand the pipeline template use --expand=false.

$ marco pipeline list -a "marco" --expand=false
+----------+--------------------------------------+-----------------------------+----------------------------------+-------------+-------------------+----------------+
|   APP    |             PIPELINE ID              |            NAME             |             TEMPLATE             | STAGE REFID |       STAGE       |      TYPE      |
+----------+--------------------------------------+-----------------------------+----------------------------------+-------------+-------------------+----------------+
|  marco   | 1d733082-5368-475e-b8ud-cde5bcfe9eec | Trigger every minute        | (none)                           |           1 | Wait              | wait           |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           2 | Bake (Manifest)   | bakeManifest   |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           3 | Canary Analysis   | kayentaCanary  |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           4 | Disable Cluster   | disableCluster |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           5 | Deploy            | deploy         |
+          +--------------------------------------+-----------------------------+                                  +-------------+-------------------+----------------+
|          | 9b3c34c7-6f5a-5773-8a44-34f0e098f3e2 | Trigger every minite v2     |                                  |           1 | Wait              | wait           |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           2 | Bake (Manifest)   | bakeManifest   |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           3 | Canary Analysis   | kayentaCanary  |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           4 | Disable Cluster   | disableCluster |
+          +                                      +                             +                                  +-------------+-------------------+----------------+
|          |                                      |                             |                                  |           5 | Deploy            | deploy         |
+          +--------------------------------------+-----------------------------+----------------------------------+-------------+-------------------+----------------+
|          | ae74405e-942e-4p13-882f-3d783cbc7f10 | Test from Pipeline Template | deployWithManualJudgement:latest |  (template) | (template)        | (template)     |
+----------+--------------------------------------+-----------------------------+----------------------------------+-------------+-------------------+----------------+

Pipeline templates

$ marco pipeline-template list
+--------------------------------------------+-----------+
|                     ID                     | PROTECTED |
+--------------------------------------------+-----------+
| deployWithManualJudgementWithDocker:latest | true      |
+--------------------------------------------+-----------+
| deployWithManualJudgementWithDocker:latest | true      |
+--------------------------------------------+-----------+
| deployWithManualJudgementWithDocker:latest | true      |
+--------------------------------------------+-----------+
| deployWithManualJudgement:latest           | true      |
+--------------------------------------------+-----------+
| deployWithManualJudgementWithDocker:latest | true      |
+--------------------------------------------+-----------+
| deployWithManualJudgementWithDocker:       | true      |
+--------------------------------------------+-----------+
| deployWithManualJudgement:latest           | true      |
+--------------------------------------------+-----------+
| deployWithManualJudgement:                 | true      |
+--------------------------------------------+-----------+

Contribution

Please create a GitHub Issue or a pull request. I welcome all contributions.

Author

Licence

Copyright 2020 KeisukeYamashita. marco is released under the Apache License 2.0.

marco's People

Contributors

keisukeyamashita avatar mergify[bot] avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar

marco's Issues

Add json output

What

Like Spin, it's better to output the results with JSON format.

Why

Because JSON has more portability. Users can pass the marco results to jq to do some transformation, analytics, etc.

Why not use Spin

Spin outputs the result with the logs included.
And it does not support org-wide {application, pipeline} listing feature.

I would like to support this on marco.

Filter options

What

Add filter options so that this command shows only targets that maches the passes the filter(s).

Why

We want to find specify target.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/release.yml
  • actions/checkout v2
  • actions/setup-go v5
  • goreleaser/goreleaser-action v2
.github/workflows/test.yml
  • actions/checkout v2
  • actions/setup-go v5
gomod
go.mod
  • go 1.16
  • github.com/olekukonko/tablewriter v0.0.4
  • github.com/spf13/cobra v1.1.3
  • github.com/spf13/pflag v1.0.5
  • github.com/spinnaker/spin v0.4.1-0.20201211003717-9e6d8f2f1f78@9e6d8f2f1f78

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

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.