Git Product home page Git Product logo

cirrus-cli's Introduction

Cirrus CLI

Build Status

Cirrus CLI is a tool for running containerized tasks reproducibly in any environment. Run your tasks locally the same way they are executed in CI or on your colleague's machine. Immutability of Docker containers ensures your project will compile years from now regardless what versions of packages you'll have locally.

Cirrus CLI Demo

Installation

Usage

Cirrus CLI reuses the same YAML configuration format as Cirrus CI which allows to reuse a large list of examples created by Cirrus CI community.

Note: Cirrus CLI can be used in any environment that has Docker installed. It can be your laptop or any CI system you already have like Jenkins, Github Actions, Travis CI, etc. With Cirrus CLI it's no longer a requirement to use Cirrus CI in order to benefit from Cirrus configuration format that we (Cirrus Labs) have crafted for so long and really proud of.

Here is an example of .cirrus.yml configuration file for testing a Go application with several Go versions:

task:
  env:
    matrix:
      VERSION: 1.15
      VERSION: 1.14
  name: Tests (Go $VERSION)
  container:
    image: golang:$VERSION
  modules_cache:
    fingerprint_script: cat go.sum
    folder: $GOPATH/pkg/mod
  get_script: go get ./...
  build_script: go build ./...
  test_script: go test ./...

Running Cirrus Tasks

To run Cirrus tasks, simply switch to a directory where the .cirrus.yml is located and run:

cirrus run

It is also possible to run a task by name:

cirrus run "Tests (Go 1.15)"

Note: Cirrus CLI only support Linux containers instances at the moment including Dockerfile as a CI environment feature.

Validating Cirrus Configuration

To validate a Cirrus configuration, simply switch to a directory where the .cirrus.yml is located and run:

cirrus validate

FAQ

What is the relationship between Cirrus CI and Cirrus CLI?

Cirrus CI was released in the early 2018 with an idea to bring some innovation to CI space. A lot of things have changed in CI-as-a-service space since then but Cirrus CI pioneered many ideas in CI-as-a-service space including per-second billing and support for Linux, Windows and macOS all together.

Over the past two and a half years we heard only positive feedback about Cirrus CI's YAML configuration format. Users liked how concise their configuration looked and that it was easy to reason about.

Another feedback we heard from users was that it's hard to migrate from one CI to another. There is a need to rewrite CI configurations from one format into another that basically still locks into another vendor.

And now in 2020 with Cirrus CLI we are trying to solve the "vendor lock" problem by popularizing Cirrus configuration format and building community around it. Stay tuned for the upcoming option to use Starlark templates instead of YAML!

Think of Cirrus CLI as an executor of Cirrus Tasks on a single machine only in Docker containers for simple CI scenarious. And Cirrus CI as an option for more specific cases where Cirrus Tasks can be executed in containers and VMs using a variety of supported compute services or using a managed infrastructure with per-second billing.

cirrus-cli's People

Contributors

fkorotkov avatar edigaryev avatar

Watchers

James Cloos 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.