Giter Site home page Giter Site logo

orbs's Introduction

Swissknife

This orb helps make common operations in various CircleCI workflows easier. (#monorepo) Some of the smaller useful commands are "fail if dirty", "run if modified", "run on branch". There are a few more complicated commands such as "wait for workflow" and "wait for job" which have niche usecases.

Official Orb page: https://circleci.com/orbs/registry/orb/roopakv/swissknife

Usage

Add swissknife to your Circle yml as follows

orbs:
  swissknife: roopakv/[email protected]

Once you have defined the Orb you can use the following commands

Fail if dirty

This can be used to fail a job if a number of steps result in git being dirty. Some examples of where this can be useful

  • Someone adds to package.json without using npm or yarn
  • You use go generate and someone made changes to a file but forgot to run go generate

Look here for the parameters this job accepts

Run if modified

Run steps only certain files are modified. For example, run js tests only if js files are modified.

Note: This command ends the job if files are not modified.

Read here for usage.

Wait for job

Circle doesnt allow you to run Job A after job B irrespective of job A's exit status. This command works around that.

Wrap a set of steps with this command and pass in the job it should run after and be rest assured that it will run the jobs one by one.

Here for usage info.

Wait for workflow

This lets you build a fake queue for a given branch and blocks workflows from actually running till previous workflows on this branch have been completed.

Note: By blocking workflows we mean that the job simply sleeps till it is its turn to run. i.e. you will be using circle credits to sleep this long (maybe use small containers?)

Look here for usage.

Github Release

This lets you create a Github release to a specified repository using custom tags. This can be useful if you want to generate releases on each master commit for instance.

Look here for usage.

Contribution

Please open an issue for the functionality you wish to add. Lets make sure it will work / there is nothing else like it.

When adding a new command, either add a circle test that we can use during build OR add a script that we can run to test things.

orbs's People

Contributors

roopakv avatar nirajjayant avatar akshayas avatar aldahick avatar ananyachandra avatar noisyscanner avatar jc4883 avatar twslade 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.