docker builds
Hi ..
Version: 8.1.2 CE (sameersbn/docker-gitlab)
Perhaps less of a 'issue' and more a question .. At present i have the below; the basic gist, build the project in one job, cache the artifact and build the docker using the artifact which was cached in the first job (i.e. ADD bin/ PATH). The 'cache' keyword doesn't appear to work as I expected. Whats the best way to build an artifact in one stage and pass to the next?
[[runners]]
url = "https://ci.example.org/ci"
token = "<token>"
tls-skip-verify = false
tls-ca-file = ""
name = "10.50.2.119"
limit = 10
executor = "docker"
[runners.docker]
image = "gitlab/dind:latest"
privileged = true
volumes = ["/cache"]
allowed_images = ["*", "*/*", "*/*/*"]
allowed_services = ["*", "*/*", "*/*/*"]
volumes = ["/var/run/docker.sock:/var/run/docker.sock"]
stages:
- building
- dockerize
building:
image: gambol99/golang:1.5.1
stage: building
cache:
paths:
- bin/
artifacts:
paths:
- bin/openvpn-sessions
script:
- go get github.com/tools/godep
- make
dockerize:
stage: dockerize
script:
- ls -l -R . /var/run
- docker ps
- docker build -t docker.io/openvpn-sessions .