-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
994ba0b
commit 0c55035
Showing
16 changed files
with
1,157 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.git | ||
.gitignore | ||
conform.yaml | ||
coverage.txt | ||
Dockerfile | ||
docs | ||
examples | ||
LICENSE | ||
Makefile | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
coverage.txt | ||
Dockerfile | ||
docs/build | ||
vendor |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
|
||
## Gopkg.toml example (these lines may be deleted) | ||
|
||
## "metadata" defines metadata about the project that could be used by other independent | ||
## systems. The metadata defined here will be ignored by dep. | ||
# [metadata] | ||
# key1 = "value that convey data to other systems" | ||
# system1-data = "value that is used by a system" | ||
# system2-data = "value that is used by another system" | ||
|
||
## "required" lists a set of packages (not projects) that must be included in | ||
## Gopkg.lock. This list is merged with the set of packages imported by the current | ||
## project. Use it when your project needs a package it doesn't explicitly import - | ||
## including "main" packages. | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
|
||
## "ignored" lists a set of packages (not projects) that are ignored when | ||
## dep statically analyzes source code. Ignored packages can be in this project, | ||
## or in a dependency. | ||
# ignored = ["github.com/user/project/badpkg"] | ||
|
||
## Constraints are rules for how directly imported projects | ||
## may be incorporated into the depgraph. They are respected by | ||
## dep whether coming from the Gopkg.toml of the current project or a dependency. | ||
# [[constraint]] | ||
## Required: the root import path of the project being constrained. | ||
# name = "github.com/user/project" | ||
# | ||
## Recommended: the version constraint to enforce for the project. | ||
## Only one of "branch", "version" or "revision" can be specified. | ||
# version = "1.0.0" | ||
# branch = "master" | ||
# revision = "abc123" | ||
# | ||
## Optional: an alternate location (URL or import path) for the project's source. | ||
# source = "https://github.com/myfork/package.git" | ||
# | ||
## "metadata" defines metadata about the dependency or override that could be used | ||
## by other independent systems. The metadata defined here will be ignored by dep. | ||
# [metadata] | ||
# key1 = "value that convey data to other systems" | ||
# system1-data = "value that is used by a system" | ||
# system2-data = "value that is used by another system" | ||
|
||
## Overrides have the same structure as [[constraint]], but supersede all | ||
## [[constraint]] declarations from all projects. Only [[override]] from | ||
## the current project's are applied. | ||
## | ||
## Overrides are a sledgehammer. Use them only as a last resort. | ||
# [[override]] | ||
## Required: the root import path of the project being constrained. | ||
# name = "github.com/user/project" | ||
# | ||
## Optional: specifying a version constraint override will cause all other | ||
## constraints on this project to be ignored; only the overridden constraint | ||
## need be satisfied. | ||
## Again, only one of "branch", "version" or "revision" can be specified. | ||
# version = "1.0.0" | ||
# branch = "master" | ||
# revision = "abc123" | ||
# | ||
## Optional: specifying an alternate source location as an override will | ||
## enforce that the alternate location is used for that project, regardless of | ||
## what source location any dependent projects specify. | ||
# source = "https://github.com/myfork/package.git" | ||
|
||
|
||
|
||
[[constraint]] | ||
name = "github.com/Masterminds/semver" | ||
version = "1.3.0" | ||
|
||
[[constraint]] | ||
name = "github.com/Masterminds/sprig" | ||
version = "2.12.0" | ||
|
||
[[constraint]] | ||
name = "github.com/docker/docker" | ||
version = "1.13.1" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "github.com/inconshreveable/mousetrap" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "github.com/mitchellh/go-homedir" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "github.com/spf13/cobra" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "github.com/spf13/viper" | ||
|
||
[[constraint]] | ||
branch = "v2" | ||
name = "gopkg.in/yaml.v2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,73 @@ | ||
# conform | ||
<p align="center"> | ||
<h1 align="center">Conform</h1> | ||
<p align="center">DRY, hygienic, fast builds.</p> | ||
<p align="center"> | ||
<a href="https://gitter.im/autonomy/conform"><img alt="Gitter" src="https://img.shields.io/gitter/room/autonomy/conform.svg?style=flat-square"></a> | ||
<a href="https://godoc.org/github.com/autonomy/conform"><img alt="GoDoc" src="http://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square"></a> | ||
</p> | ||
<p align="center"> | ||
<a href="https://travis-ci.org/autonomy/conform"><img alt="Travis" src="https://img.shields.io/travis/autonomy/conform.svg?style=flat-square"></a> | ||
<a href="https://codecov.io/gh/autonomy/conform"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/autonomy/conform.svg?style=flat-square"></a> | ||
<a href="https://goreportcard.com/report/github.com/autonomy/conform"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/autonomy/conform?style=flat-square"></a> | ||
</p> | ||
<p align="center"> | ||
<a href="https://github.com/autonomy/conform/releases/latest"><img alt="Release" src="https://img.shields.io/github/release/autonomy/conform.svg?style=flat-square"></a> | ||
<a href="https://github.com/autonomy/conform/releases/latest"><img alt="GitHub (pre-)release" src="https://img.shields.io/github/release/autonomy/conform/all.svg?style=flat-square"></a> | ||
</p> | ||
</p> | ||
|
||
--- | ||
|
||
**Conform** is a tool for building projects in a flexible and reliabale manner. | ||
|
||
The key features of Conform are: | ||
- **DRY**: Templatized multi-stage Docker builds. | ||
- **Hygienic**: Builds run in Docker. | ||
- **Fast**: Leverages Docker caching, building only what has changed. | ||
|
||
Getting Started | ||
--------------- | ||
Create a file named `conform.yaml` with the following contents: | ||
```yaml | ||
metadata: | ||
repository: example | ||
scripts: | ||
init : | | ||
#!/bin/bash | ||
set -e | ||
echo "Hello, world!" | ||
templates: | ||
build: | | ||
FROM alpine:latest as build | ||
RUN echo "Run your build here!" | ||
RUN touch artifact | ||
test: | | ||
FROM alpine:latest as test | ||
COPY --from=build artifact . | ||
RUN echo "Run your tests here!" | ||
image: | | ||
FROM scratch as image | ||
RUN echo "Deply your image here!" | ||
COPY --from=build artifact . | ||
rules: | ||
all: | ||
templates: | ||
- build | ||
- test | ||
- image | ||
|
||
``` | ||
|
||
In the same directory, run: | ||
``` | ||
$ conform enforce all | ||
``` | ||
> **Note:** Conform is still under design. The YAML layout is subject to change. | ||
Devloping Conform | ||
---------------- | ||
|
||
### License | ||
[![license](https://img.shields.io/github/license/autonomy/conform.svg?style=flat-square)](https://github.com/autonomy/conform/blob/master/LICENSE) |
Oops, something went wrong.