Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
0aad13dc29 | ||
|
4bbc2fb76b | ||
|
025abc9d8e |
@ -1,25 +1,40 @@
|
||||
image: leenooks/ci-docker:latest
|
||||
image: docker:latest
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
|
||||
services:
|
||||
- leenooks/ci-docker:dind
|
||||
|
||||
variables:
|
||||
REGISTRY: registry.leenooks.net
|
||||
IMAGE: leenooks/base
|
||||
VERSION: "6"
|
||||
DOCKER_IMAGE: leenooks/base
|
||||
DOCKER_REGISTRY: registry.leenooks.net
|
||||
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
|
||||
|
||||
services:
|
||||
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind
|
||||
|
||||
before_script:
|
||||
- docker info
|
||||
- docker version
|
||||
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${REGISTRY}
|
||||
- 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
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- docker build -t ${IMAGE} .
|
||||
- docker tag ${IMAGE} ${REGISTRY}/${IMAGE}
|
||||
- docker push ${REGISTRY}/${IMAGE}
|
||||
- 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:
|
||||
- c6
|
||||
|
@ -1,9 +1,8 @@
|
||||
# NAME leenooks/base
|
||||
# VERSION latest
|
||||
# BUILD docker build -t="leenooks/base" .
|
||||
# VERSION 6
|
||||
|
||||
FROM centos:latest
|
||||
FROM centos:6
|
||||
MAINTAINER deon@leenooks.net
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
|
||||
RUN yum -y install http://yum.leenooks.net/repo-7.rpm && yum -y update && yum clean all && rm -rf /var/tmp/*
|
||||
RUN yum -y install http://yum.leenooks.net/repo-6.rpm && yum -y update && yum clean all && rm -rf /var/tmp/*
|
||||
|
Reference in New Issue
Block a user