All Projects → buddy-works → Buddy Cli

buddy-works / Buddy Cli

Licence: mit
CLI tool for Buddy Cloud

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Buddy Cli

Haiku
🚀 Instant Heroku deploys from GitHub branches
Stars: ✭ 17 (-75.36%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Hygieia
CapitalOne DevOps Dashboard
Stars: ✭ 3,682 (+5236.23%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Cds
Enterprise-Grade Continuous Delivery & DevOps Automation Open Source Platform
Stars: ✭ 3,677 (+5228.99%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Gocd
Main repository for GoCD - Continuous Delivery server
Stars: ✭ 6,314 (+9050.72%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Bzppx Codepub
暴走皮皮虾之代码发布系统,是现代的持续集成发布系统,由后台管理系统和agent两部分组成,一个运行着的agent就是一个节点,本系统并不是造轮子,是"鸟枪"到"大炮"的创新,对"前朝遗老"的革命.
Stars: ✭ 471 (+582.61%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Elastic Ci Stack For Aws
An auto-scaling cluster of build agents running in your own AWS VPC
Stars: ✭ 313 (+353.62%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Lightning Sites
☁️ Lightning deployment for your ~/Sites folders
Stars: ✭ 8 (-88.41%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
alloy-runner
AlloyCI Runner
Stars: ✭ 16 (-76.81%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Origin
Conformance test suite for OpenShift
Stars: ✭ 8,046 (+11560.87%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Devops Readme.md
What to Read to Learn More About DevOps
Stars: ✭ 398 (+476.81%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Abstruse
Abstruse is a free and open-source CI/CD platform that tests your models and code.
Stars: ✭ 704 (+920.29%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Git Push Deploy
Simple Automated CI/CD Pipeline for GitHub and GitLab Projects
Stars: ✭ 21 (-69.57%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Serverless Plugin Canary Deployments
Canary deployments for your Serverless application
Stars: ✭ 283 (+310.14%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Agola
Agola: CI/CD Redefined
Stars: ✭ 783 (+1034.78%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Android-CICD
This repo demonstrates how to work on CI/CD for Mobile Apps 📱 using Github Actions 💊 + Firebase Distribution 🎉
Stars: ✭ 37 (-46.38%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Jenkins
Jenkins automation server
Stars: ✭ 18,225 (+26313.04%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
hygieia
CapitalOne DevOps Dashboard
Stars: ✭ 3,697 (+5257.97%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
flagsmith-nodejs-client
Flagsmith Node JS Client. Flagsmith lets you manage features flags across web, mobile and server side applications. Get builds out faster. Control who has access to new features.
Stars: ✭ 13 (-81.16%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Circleci Images
Scripts to generate images for building projects on CircleCI 2.0
Stars: ✭ 397 (+475.36%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment
Agent
The Buildkite Agent is an open-source toolkit written in Golang for securely running build jobs on any device or network
Stars: ✭ 534 (+673.91%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment

buddy-cli

buddy pipeline GitHub issues GitHub stars GitHub license

The Buddy CLI is used to manage Buddy.Works pipelines from the terminal.

About Buddy.Works

Buddy.Works is a Docker-based CI server with auto-deployment tools. Its core feature are pipelines that let developers automate repeatable tasks, for example: build, test and deploy applications, run SSH scripts, monitor websites, build and push Docker images, or send custom Slack notifications – automatically on push, manually on click, or on time interval.

How Buddy CLI works

With the CLI installed, you can trigger pipeline executions without entering the service's GUI. Here's an example use case:

  1. A developer pushes a bugfix to the DEV branch:
git commit -m 'quick bugfix'
git push dev
  1. Once the bugfix is pushed, he runs a pipeline assigned to the DEV branch that will test the changes and deploy the application to the DEV server:
buddy-cli pl run dev
  1. When the execution is over, he checks if the tests have passed and deployment went through:
buddy-cli pl inspect

NOTE: To use Buddy CLI, you must first sign up to Buddy.Works.

Features

  • Run pipelines from the command line
  • Check pipeline status
  • List executions
  • List pipelines
  • List projects
  • List workspaces

Installation

npm install -g buddyworks-cli

Usage

The tool will be immediately available after the installation. You can call buddy-cli -h to find out more about commands available.

In order to call any command, you must first generate an auth token in your Buddy.Works my-id settings. If you are using Buddy Enterprise (standalone) you need to do the same, but in your own instance. Your token must have these scopes in order to work properly:

  • WORKSPACE – Manage workspace and its objects
  • EXECUTION_INFO – Get pipelines
  • EXECUTION_RUN – Run pipelines

Pipeline operations

buddy-cli pipeline <cmd>

Shortcut:

buddy-cli pl <cmd>

The pipeline parameter is the ID of the pipeline. You can get it from the pipeline list command described below. Apart from that you also need the passed token, workspace and project.

The arguments are mandatory, but you can store them in Buddy.Works as environment variables or through a config command that will enable you to shorten your commands (more below).

Run pipeline

buddy-cli pl run [pipeline]

Shortcut:

buddy-cli pl r [pipeline]

Options:

 -v, --version    Show version
 -h, --help       Show help
 -j, --json       Output json
 -t, --token      The token used to authenticate the request
 -u, --url        The base URL for the app (default: api.buddy.works)
 -w, --workspace  The name of the workspace in which the command is run
 -p, --project    The name of the project in which the command is run
 -r, --revision   The revision from the repository that will be executed in the pipeline
 -c, --comment    The execution comment
 -f, --refresh    Execute from scratch

Retry pipeline

buddy-cli pl retry [pipeline]

Shortcut:

buddy-cli pl t [pipeline]

Options:

 -v, --version    Show version
 -h, --help       Show help
 -j, --json       Output json
 -t, --token      The token used to authenticate the request
 -u, --url        The base URL for the app (default: api.buddy.works)
 -w, --workspace  The name of the workspace in which the command is run
 -p, --project    The name of the project in which the command is run

Cancel pipeline

buddy-cli pl cancel [pipeline]

Shortcut:

buddy-cli pl c [pipeline]

Options:

 -v, --version    Show version
 -h, --help       Show help
 -j, --json       Output json
 -t, --token      The token used to authenticate the request
 -u, --url        The base URL for the app (default: api.buddy.works)
 -w, --workspace  The name of the workspace in which the command is run
 -p, --project    The name of the project in which the command is run

Inspect pipeline

buddy-cli pl inspect [pipeline]

Shortcut:

buddy-cli pl i [pipeline]

Options:

 -v, --version    Show version
 -h, --help       Show help
 -j, --json       Output json
 -t, --token      The token used to authenticate the request
 -u, --url        The base URL for the app (default: api.buddy.works)
 -w, --workspace  The name of the workspace in which the command is run
 -p, --project    The name of the project in which the command is run

List pipelines

buddy-cli pl ls

Options:

 -v, --version    Show version
 -h, --help       Show help
 -j, --json       Output json
 -t, --token      The token used to authenticate the request
 -u, --url        The base URL for the app (default: api.buddy.works)
 -w, --workspace  The name of the workspace in which the command is run
 -p, --project    The name of the project in which the command is run
 -e, --page       Which page to show (by default, the first 20 pipelines are shown)

List pipeline executions

buddy-cli pl executions [pipeline]

Shortcut:

buddy-cli pl exs [pipeline]

Options:

 -v, --version    Show version
 -h, --help       Show help
 -j, --json       Output json
 -t, --token      The token used to authenticate the request
 -u, --url        The base URL for the app (default: api.buddy.works)
 -w, --workspace  The name of the workspace in which the command is run
 -p, --project    The name of the project in which the command is run
 -e, --page       The number of the pages to display (by default, the first 20 pipelines are shown)

Inspect pipeline execution

buddy-cli pl execution [execution]

Shortcut:

buddy-cli pl ex [execution]

The [execution] parameter is the ID of the execution. If none has passed, the last execution of the pipeline will be shown.

Options:

 -v, --version    Show version
 -h, --help       Show help
 -j, --json       Output json
 -t, --token      The token used to authenticate the request
 -u, --url        The base URL for the app (default: api.buddy.works)
 -w, --workspace  The name of the workspace in which the command is run
 -p, --project    The name of the project in which the command is run
 -l, --pipeline   The ID of the pipeline in which the command is run

Project operations

buddy-cli project <cmd>

Shortcut:

buddy-cli pj <cmd>

The same rules for arguments apply here: some mandatory arguments, like project name, can be stored in the config or env variables.

List projects

buddy-cli pj ls

Options:

 -v, --version    Show version
 -h, --help       Show help
 -j, --json       Output json
 -t, --token      The token used to authenticate the request
 -u, --url        The base URL for the app (default: api.buddy.works)
 -w, --workspace  The name of the workspace in which the command is run
 -s, --status     Filter by project status [choices: "ACTIVE", "CLOSED", "ANY"] [default: "ANY"]
 -m, --mine       Show only the projects to which the user belongs
 -e, --page       Which page to show (by default, the first 20 pipelines are shown)

Inspect project

buddy-cli pj inspect [project]

Shortcut:

buddy-cli pj i [project]

Options:

 -v, --version    Show version
 -h, --help       Show help
 -j, --json       Output json
 -t, --token      The token used to authenticate the request
 -u, --url        The base URL for the app (default: api.buddy.works)
 -w, --workspace  The name of the workspace in which the command is run

Workspace operations

buddy-cli workspace <cmd>

Shortcut:

buddy-cli ws <cmd>

The same rules for arguments apply here: some mandatory arguments, like workspace name, can be stored in the config or in env variables.

List workspaces

buddy-cli ws ls

Options:

 -v, --version  Show version
 -h, --help     Show help
 -j, --json     Output json
 -t, --token    Token to authenticate request
 -u, --url      Base url for app (default: api.buddy.works)

Inspect workspace

buddy-cli ws inspect [workspace]

Shortcut:

buddy-cli ws i [workspace]

Options:

 -v, --version  Show version
 -h, --help     Show help
 -j, --json     Output json
 -t, --token    Token to authenticate request
 -u, --url      Base url for app (default: api.buddy.works)

Config operations

buddy-cli config <cmd>

Shortcut:

buddy-cli cf <cmd>

The config command is used to store some arguments for future use. For example, if you often run the same pipeline, you can store the command params in config:

buddy-cli cf set token my-token
buddy-cli cf set workspace my-workspace
buddy-cli cf set project my-project
buddy-cli cf set pipeline my-pipeline

The next time you'll want to run your pipeline, just call

buddy-cli pl run

Please mind you can override the default config params with a standard command --param

Set config key

buddy-cli cf set <key> [val]

The key name is mandatory and can be one of the following values:

  • token – The token used to authenticate the request
  • workspace – The name of the workspace in which the command is run
  • project – The name of the project in the workspace
  • pipeline – The ID of the pipeline in the project
  • url – The base URL for the API endpoint. By default, we point to our hosted version of the API (api.buddy.works), but you can also point this URL to your Buddy Enterprise (standalone) API endpoint (ip/api).

Options:

  -v, --version  Show version
  -h, --help     Show help
  -j, --json     Output json

Get config key

buddy-cli cf get [key]

The key can be one of the following values:

  • token – The token used to authenticate the request
  • workspace – The name of the workspace in which the command is run
  • project – The name of the project in the workspace
  • pipeline – The ID of the pipeline in the project
  • url – The base URL for the API endpoint. By default, we point to our hosted version of the API (api.buddy.works), but you can also
  • all – Returns all options

By default, all keys are returned.

Clear config

buddy-cli cf clear

This command resets the config to default values (empties all keys and resets the URL to api.buddy.works)

Aliases

You can use custom aliases for config properties. You can save multiple aliases for any resource:

  • Token
  • Workspace
  • Project
  • Pipeline
  • Url

Set alias

buddy-cli al set <key> [val]

The key name is mandatory and can be any word (these name you will use as parameter value). To clear alias pass empty val.

Options:

  -v, --version  Show version
  -h, --help     Show help
  -j, --json     Output json

Get alias

buddy-cli al get [key]

The key is your friendly name. By default, all keys are returned.

Clear config

buddy-cli al clear

This command remove all stored aliases.

Example usage

myWorkspace - name of registered workspace

To list projects in these workspace normally you would call:

buddy-cli pj ls -w myWorkspace

Using aliases:

buddy-cli al set foo myWorkspace
buddy-cli pj ls -w foo

You can also use aliases in stored config keys:

buddy-cli al set foo myWorkspace
buddy-cli cf set workspace foo
buddy-cli pj ls

Thanks to aliases you no longer need to remember ids of your pipelines, projects names and so on. Just save it under your friendly alias.


Environment variables

You can use environment variables to store your config values. This feature is very useful if you want to use buddy-cli in a Continuous Integration (CI) and/or Continuous Deployment (CD) environment.

This is the list of variables you can use:

  • BUDDY_CLI_TOKEN
  • BUDDY_CLI_WORKSPACE
  • BUDDY_CLI_PROJECT
  • BUDDY_CLI_PIPELINE
  • BUDDY_CLI_URL

Buddy CLI uses parameters in the following order:

  1. Command line arguments
  2. Environment variables
  3. Config variables

If none of the above is found and the argument is mandatory, it will throw an error.

Environment variables are also available directly in the Buddy.Works system.

License

This project is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].