https://github.com/d-led/gocd_docker_compose_example
A simple GoCD demo environment using docker-compose & yaml pipeline as code
https://github.com/d-led/gocd_docker_compose_example
continuous-delivery continuous-integration demo demo-environment docker gocd pipeline pipelines-as-code yaml
Last synced: 4 months ago
JSON representation
A simple GoCD demo environment using docker-compose & yaml pipeline as code
- Host: GitHub
- URL: https://github.com/d-led/gocd_docker_compose_example
- Owner: d-led
- License: unlicense
- Created: 2017-02-15T20:56:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-27T09:44:05.000Z (over 7 years ago)
- Last Synced: 2025-04-14T04:15:18.606Z (about 1 year ago)
- Topics: continuous-delivery, continuous-integration, demo, demo-environment, docker, gocd, pipeline, pipelines-as-code, yaml
- Language: Python
- Homepage:
- Size: 1.83 MB
- Stars: 8
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoCD Infrastructure as Code
[](https://travis-ci.org/d-led/gocd_docker_compose_example)
a simple [GoCD](https://www.gocd.io/) demo environment that completely provisions itself and adds build pipelines (as code), e.g. as a [YAML](https://github.com/tomzo/gocd-yaml-config-plugin) config, via the [REST API](https://api.gocd.io/) / an external tool (gomatic) / through an XML config file.
[→ Blog: Self-contained GoCD Environment Using Docker-Compose](https://ledentsov.de/2017/03/04/self-contained-gocd-docker-compose/)
## the versions
- [gomatic](gomatic) - a server and an agent container as they are out of the box + a [gomatic](https://github.com/gocd-contrib/gomatic) script to provision the server (**needs fixing** for the current GoCD version)
- [static_config](static_config) - 2 different agents, server provisioned via a static config file copie into the container
- [provisioned_externally](provisioned_externally) - 2 different agents, server provisioned externally via the API
## summary of the provisioned version
the startup sequence:
- the GoCD server starts
- two different agents start
- agents wait to connect to the server
- the provisioner waits some, and adds the pipelines to the config
- the server picks up the config and starts the builds
## up and running
in [static_config](static_config), run:
```
docker-compose up -d
```
### troubleshooting
- see the console output of the containers
- In case you mount folders instead of copying them, note, on some platforms Docker fails to mount local folders. In this case, use [node-docker-share](https://github.com/vweevers/node-docker-share)!
## access the instance
- http://[go-server-ip]:8153


## shutdown
```
docker-compose stop
```
or destroy via:
```
docker-compose down --remove-orphans
```