Skip to content

Commit

Permalink
add support for building in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzo committed May 1, 2019
1 parent 2be55d3 commit 8b04434
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
out
*.swp
*.swo
/gocd
2 changes: 2 additions & 0 deletions Dojofile
@@ -0,0 +1,2 @@
DOJO_DOCKER_IMAGE=kudulab/golang-dojo:1.0.0
DOJO_WORK_INNER="/dojo/work/src/gocd-cli"
19 changes: 19 additions & 0 deletions README.md
Expand Up @@ -16,6 +16,25 @@ This will generate the `gocd` binary in the repository's root directory (i.e., m

You will likely need to [`fetch`](#fetch-fetch-config-repo-plugins) recent versions of config-repo plugins to do anything interesting.

### Build in docker

Alternatively, if you have local docker daemon, you can build the binary using [docker golang-dojo](https://github.com/kudulab/docker-golang-dojo) image.

1. [Install docker](https://docs.docker.com/install/), if you haven't already.
2. [Install Dojo](https://github.com/ai-traders/dojo#installation), it is a self-contained binary, so just place it somewhere on the `PATH`.
On **Linux**:
```bash
DOJO_VERSION=0.4.3
wget -O dojo https://github.com/ai-traders/dojo/releases/download/${DOJO_VERSION}/dojo_linux_amd64
sudo mv dojo /usr/local/bin
sudo chmod +x /usr/local/bin/dojo
```
3. Build gocd-cli with
```
dojo ./build.sh
```
This will generate the `gocd` binary in the repository's root directory.

## Usage

The general invocation pattern for `gocd` looks like this:
Expand Down

0 comments on commit 8b04434

Please sign in to comment.