A build tool using Docker containers.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
asset Add include-built option to push and remove tasks (unimplemented). Feb 15, 2019
command Fix bad golang formatting for docker output. Jan 3, 2019
config Add include-built option to push and remove tasks (unimplemented). Feb 15, 2019
docs Add IJ_IMAGE_TAGS variable. Feb 15, 2019
environment Add UID and GID global vars. Jan 17, 2019
images/ecr-token Add documentation drafts. Sep 4, 2018
loader Add include-built option to push and remove tasks (unimplemented). Feb 15, 2019
logging Replace writeAll with io.Copy. Feb 15, 2019
network Refactor state and runners. Sep 4, 2018
options Add context to run options. Sep 18, 2018
paths Relax transfer requirements (closes #13). Sep 11, 2018
registry Add key option to GCR registry (closes #15). Jan 19, 2019
runner Add IJ_IMAGE_TAGS variable. Feb 15, 2019
scratch Add log messages to scratch prune function. Jan 24, 2019
ssh Ensure ssh key fingerprint matches case. Sep 5, 2018
subcommand Add show-config command. Jan 3, 2019
util Move json utilites into util package. Jan 3, 2019
.codeclimate.yml
.gitignore Use go modules. Dec 28, 2018
.travis.yml Update travis config. Dec 28, 2018
LICENSE Add CI templates. Aug 30, 2018
README.md Add show-config command. Jan 3, 2019
go.mod Update deps. Jan 3, 2019
go.sum
ij.svg Move ecr-token directory. Aug 31, 2018
main.go Add show-config command. Jan 3, 2019

README.md

IJ logo

GoDoc Build Status Maintainability Test Coverage

IJ is a build tool using Docker containers.

Concepts

A build is defined by a sequence of tasks which perform some unit of work (e.g. building a binary, running integration tests, pushing artifacts to a remote server), usually within a docker container. This ensures that the development host stays clean, and that the exact build dependencies are available within the container (no more development tool version hell). The build process is defined by assembling a sequence of tasks into a plan. A build is simply the invocation of one or more plans. A project's config file declares tasks and plans which builds the project.

Installation

Simply run go install github.com/efritz/ij.

Usage

There are currently four IJ subcommands (run, login, logout, clean, and rotate-logs) each discussed below. The following command line flags are applicable for all IJ commands.

Name Short Flag Description
config f The path to the config file. If not supplied, ij.yaml and ij.yml are attempted in the current directory.
env e Set an environment variable. Use -e VAR=VAL to set an explicit value for the variable VAR. Use -e VAR to use the host value of $VAR.
env-file The path to an environment file.
no-color Disable colorized output.
verbose v Show debug-level output.

Run Command

This command can be invoked as ij [run]? (plan-name)*. The run keyword is assumed if not supplied. This command runs a series of plans or metaplans defined in the config file. If no plan-names are supplied, the plan named default is invoked.

Name Short Flag Description
cpu-shares c The proc limit for run task containers.
force-sequential Disable running tasks in parallel.
healthcheck-interval How frequently to check the health of service containers.
keep-workspace k Do not prune the scratch directory (useful for debugging failed plans).
login Login to registries before invoking plans and logout from registries after (useful for builds that push image artifacts).
memory m The memory limit for run task containers.
ssh-identity An additional SSH key fingerprint required to be present in the host's SSH agent.
timeout The maximum time a build plan can run in total.

Login Command

This command can be invoked as ij login. Login to all registries defined in the config file.

Logout Command

This command can be invoked as ij logout. Logout from all registries defined in the config file.

Rotate Logs Command

This command can be invoked as ij rotate-logs. Remove all but the most recent run from the .ij directory in the current project.

Clean Command

This command can be invoked as ij clean. Remove files exported from the workspace on previous runs.

Name Short Flag Description
--force Do not prompt before removing files or directories.

Show Config Command

This command cna be invoked as ij show-config. This will print the effective config after resolving inheritance and extension. This output of this command, if successful, should also be another valid config file.

License

Copyright (c) 2018 Eric Fritz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.