github.com/stevenmatthewt/agent@v3.5.4+incompatible/README.md (about) 1 # Buildkite Agent ![Build status](https://badge.buildkite.com/08e4e12a0a1e478f0994eb1e8d51822c5c74d395.svg?branch=master) 2 3 _Note: This is the development branch of the buildkite-agent, and may not contain files or code in the current stable release. To see code or submit PRs for stable agent versions, please use the corresponding maintenance branch: [3.0.x](https://github.com/buildkite/agent/tree/3-0-stable)_. 4 5 The buildkite-agent is a small, reliable, and cross-platform build runner that makes it easy to run automated builds on your own infrastructure. It’s main responsibilities are polling [buildkite.com](https://buildkite.com/) for work, running build jobs, reporting back the status code and output log of the job, and uploading the job's artifacts. 6 7 Full documentation is available at [buildkite.com/docs/agent](https://buildkite.com/docs/agent) 8 9 ``` 10 $ buildkite-agent --help 11 Usage: 12 13 buildkite-agent <command> [arguments...] 14 15 Available commands are: 16 17 start Starts a Buildkite agent 18 artifact Upload/download artifacts from Buildkite jobs 19 meta-data Get/set data from Buildkite jobs 20 pipeline Make changes to the pipeline of the currently running build 21 bootstrap Run a Buildkite job locally 22 help, h Shows a list of commands or help for one command 23 24 Use "buildkite-agent <command> --help" for more information about a command. 25 ``` 26 27 ## Installing 28 29 The agents page on Buildkite has personalised instructions for installing the agent with Ubuntu (via apt), Debian (via apt), macOS (via homebrew), Windows and Linux. You can also run the agent [via Docker](https://hub.docker.com/r/buildkite/agent). 30 31 ## Starting 32 33 To start an agent all you need is your agent token, which you can find on your Agents page within Buildkite. 34 35 ```bash 36 buildkite-agent start --token 37 ``` 38 39 ## Development 40 41 These instructions assume you are running a recent macOS, but could easily be adapted to Linux and Windows. 42 43 ### With Docker 44 45 ```bash 46 docker-compose run agent bash 47 root@d854f845511a:/go/src/github.com/buildkite/agent# go run main.go start --token xxx --debug 48 ``` 49 50 ### Without Docker 51 52 ```bash 53 # Make sure you have go installed. 54 brew install go 55 56 # Setup your GOPATH 57 export GOPATH="$HOME/go" 58 export PATH="$HOME/go/bin:$PATH" 59 60 # Checkout the code 61 go get github.com/buildkite/agent 62 cd "$HOME/go/src/github.com/buildkite/agent" 63 ``` 64 65 To test the commands locally: 66 67 ```bash 68 go run main.go start --debug --token "abc123" 69 ``` 70 71 ### Windows via Vagrant 72 73 This requires either Virtualbox (free) or VMWare Fusion + Vagrant VMWare Fusion plugin (paid). 74 75 It assumes that you have Docker for Mac or similar installed. The following commands are run on your local machine. Expect things to take a long time, the vagrant box is 10GB and the docker base image is 3.4GB. 76 77 ```bash 78 vagrant up 79 eval $(docker-machine env windows-2016) 80 docker-compose -f docker-compose.windows.yml run agent cmd 81 C:\gopath\src\github.com\buildkite\agent> go run main.go start --token xxx --debug 82 ``` 83 84 ### Dependency management 85 86 We're using [govendor](https://github.com/kardianos/govendor) to manage our Go dependencies. Install it with: 87 88 ```bash 89 go get github.com/kardianos/govendor 90 ``` 91 92 If you introduce a new package, just add the import to your source file and run: 93 94 ```bash 95 govendor fetch +missing 96 ``` 97 98 Or explicitly fetch it with a version using: 99 100 ```bash 101 govendor fetch github.com/buildkite/go-buildkite@v2.0.0 102 ``` 103 104 ## Contributing 105 106 1. Fork it 107 1. Create your feature branch (`git checkout -b my-new-feature`) 108 1. Commit your changes (`git commit -am 'Add some feature'`) 109 1. Push to the branch (`git push origin my-new-feature`) 110 1. Create new Pull Request 111 112 ## Contributors 113 114 Many thanks to our fine contributors! @adill, @airhorns, @alexjurkiewicz, @bendrucker, @bradfeehan, @byroot, @cab, @caiofbpa, @colinrymer, @cysp, @daveoflynn, @daveoxley, @daveslutzkin, @davidk-zenefits, @DazWorrall, @dch, @deoxxa, @dgoodlad, @donpinkster, @essen, @grosskur, @jgavris, @joelmoss, @jules2689, @julianwa, @kouky, @marius92mc, @mirdhyn, @mousavian, @nikyoudale, @pda, @rprieto, @samritchie, @silarsis, @skevy, @stefanmb, @tekacs, @theojulienne, @tommeier, @underscorediscovery, and @wolfeidau. 115 116 ## Copyright 117 118 Copyright (c) 2014-2017 Buildkite Pty Ltd. See [LICENSE](./LICENSE.txt) and [DEPENDENCIES](./DEPENDENCIES.txt) for details.