Compare commits
No commits in common. "c7" and "master" have entirely different histories.
@ -1,42 +1,25 @@
|
||||
image: docker:latest
|
||||
image: leenooks/ci-docker:latest
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
|
||||
variables:
|
||||
VERSION: "7"
|
||||
CACHETAG: build
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
|
||||
services:
|
||||
- docker:dind
|
||||
- leenooks/ci-docker:dind
|
||||
|
||||
variables:
|
||||
REGISTRY: registry.leenooks.net
|
||||
IMAGE: leenooks/base
|
||||
|
||||
before_script:
|
||||
- docker info
|
||||
- docker version
|
||||
- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- cat /etc/hosts
|
||||
- env|sort
|
||||
- docker build -t ${CI_REGISTRY_IMAGE}:${VERSION} .
|
||||
- docker images
|
||||
only:
|
||||
- debug
|
||||
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${REGISTRY}
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- if [ -f init ]; then chmod 500 init; fi
|
||||
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
|
||||
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
|
||||
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
|
||||
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
|
||||
- docker build -t ${IMAGE} .
|
||||
- docker tag ${IMAGE} ${REGISTRY}/${IMAGE}
|
||||
- docker push ${REGISTRY}/${IMAGE}
|
||||
tags:
|
||||
- docker
|
||||
- x86_64
|
||||
only:
|
||||
- c7
|
||||
|
@ -1,7 +1,9 @@
|
||||
# NAME leenooks/base
|
||||
# VERSION 7
|
||||
# VERSION latest
|
||||
# BUILD docker build -t="leenooks/base" .
|
||||
|
||||
FROM centos:7
|
||||
FROM centos:latest
|
||||
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 epel-release && yum clean all && rm -rf /var/tmp/*
|
||||
RUN yum -y install http://yum.leenooks.net/repo-7.rpm && yum -y update && yum clean all && rm -rf /var/tmp/*
|
||||
|
Reference in New Issue
Block a user