Skip to content

sgaunet/retry

Repository files navigation

Go Report Card GitHub Downloads GitHub Release Maintainability Test Coverage

retry

retry command will execute X times a failed command until it's successful. Interesting for flakky tests for example or to wait after something.

Getting started

Usage is quite simple :

$ ./retry -h
Usage of retry:
  -c string
        command to execute
  -h    print help
  -m uint
        max tries of execution of failed command (default 3)
  -s uint
        sleep time in seconds between each try
  -version
        print version

Demo:

demo

Install

From binary

Download the binary in the release section.

From Docker image

Docker registry is: sgaunet/retry

The docker image is only interesting to copy the binary in your docker image.

Development

This project is using :

There are hooks executed in the precommit stage. Once the project cloned on your disk, please install pre-commit:

brew install pre-commit

Install tools:

task dev:install-prereq

And install the hooks:

task dev:install-pre-commit

If you like to launch manually the pre-commmit hook:

task dev:pre-commit