Skip to content

CLI for handling shared build and deploy tools between projects no matter what technologies the projects are using

License

Notifications You must be signed in to change notification settings

lunarway/shuttle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

56fced6 · Dec 4, 2018

History

79 Commits
Oct 24, 2018
Nov 12, 2018
Oct 2, 2018
Dec 4, 2018
Oct 24, 2018
Sep 28, 2018
Dec 4, 2018
Nov 12, 2018
Dec 4, 2018
Dec 4, 2018
Sep 26, 2018
Aug 15, 2018
Sep 6, 2018
Oct 11, 2018
Oct 9, 2018

Repository files navigation

Shuttle logo

A CLI for handling shared build and deploy tools between many projects no matter what technologies the project is using.
Report bug · Request feature · Releases · Latest release

Table of contents

What is shuttle?

shuttle is a CLI for handling shared build and deploy tools between many projects no matter what technologies the project is using.

Status

DISCLAIMER: shuttle is in its alpha stage and is not yet production ready. Expect the APIs to change.

Build Status Go Report Card

How?

Projects that use shuttle are always referencing a shuttle plan. A plan describes what can be done with shuttle. Fx:

# plan.yaml file
scripts:
  build:
    description: Build the docker image
    args:
    - name: tag
      required: true
    actions:
    - shell: docker -f $plan/Dockerfile build -t (shuttle get docker.image):$tag
  test:
    description: Run test for the project
    actions:
    - shell: go test

The plan.yaml is located at the root of the plan directory which is located elsewhere of the actual project using it. The plan directory can be locally stored or in a git repository. The directory structure could be something like:

workspace
│
└───moon-base          # project
│   │   shuttle.yaml   # project specific shuttle.yaml file
│   │   main.go
│
└───station-plan       # plan to be shared by projects
    │   plan.yaml
    │   Dockerfile

To use a plan a project must specify the shuttle.yaml file:

plan: ../the-plan
vars:
  docker:
    image: earth-united/moon-base

With this in place a docker image can be built:

$ cd workspace/moon-base
$ shuttle run build tag=v1

Features

  • Fetch shuttle plans from git repositories
  • Create any script you like in the plan
  • Overwrite scripts in local projects when they defer from the plan
  • Write templates in plans and overwrite them in projects when they defer
  • ...

Documentation

Documentation is coming

Installing

Mac OS

curl -LO https://github.com/lunarway/shuttle/releases/download/$(curl -Lso /dev/null -w %{url_effective} https://github.com/lunarway/shuttle/releases/latest | grep -o '[^/]*$')/shuttle-darwin-amd64
chmod +x shuttle-darwin-amd64
sudo mv shuttle-darwin-amd64 /usr/local/bin/shuttle

Linux

curl -LO https://github.com/lunarway/shuttle/releases/download/$(curl -Lso /dev/null -w %{url_effective} https://github.com/lunarway/shuttle/releases/latest | grep -o '[^/]*$')/shuttle-linux-amd64
chmod +x shuttle-linux-amd64
sudo mv shuttle-linux-amd64 /usr/local/bin/shuttle

Functions

shuttle get <variable>

Used to get a variable defined in shuttle.yaml

$ shuttle get some.variable
> some variable content

$ shuttle get does.not.exist
> # nothing

shuttle has <variable>

It is possible to easily check if a variable or script is defined

shuttle has some.variable
shuttle has --script integration

Output is either statuscode=0 if variable is found or statuscode=1 if variables isn't found. The output can also be a stdout boolean like

$ shuttle has my.docker.image --stdout
> false

Release History

See the releases for more information on changes between releases.

About

CLI for handling shared build and deploy tools between projects no matter what technologies the projects are using

Topics

Resources

License

Stars

Watchers

Forks

Languages