lamps/.gitlab-ci.yml

47 lines
904 B
YAML
Raw Normal View History

2016-05-26 11:45:30 +00:00
image: docker:latest
2016-08-11 01:22:20 +00:00
stages:
- test
- build
variables:
2016-08-11 02:31:27 +00:00
VERSION: php54
2016-08-11 01:22:20 +00:00
DOCKER_IMAGE: leenooks/lamps
DOCKER_REGISTRY: registry.leenooks.net
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
2016-05-26 11:45:30 +00:00
services:
2016-08-11 01:22:20 +00:00
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind
2016-05-26 11:45:30 +00:00
before_script:
- docker info
2016-08-11 01:22:20 +00:00
- docker version
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY}
test:
stage: test
script:
- cat /etc/hosts
- env|sort
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
- docker images
only:
- debug
2016-05-26 11:45:30 +00:00
build:
stage: build
script:
2016-08-22 23:47:32 +00:00
- chmod 600 .my.cnf
- chmod 500 init
- chmod 444 10-default.conf
2016-08-11 01:22:20 +00:00
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
- docker tag ${DOCKER_IMAGE}:${VERSION} ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
- docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
tags:
- docker
only:
- master
- php55
- php56
- php70