Initial Revision

This commit is contained in:
Deon George 2018-10-19 21:05:45 +11:00
commit 8bea309906
2 changed files with 54 additions and 0 deletions

41
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,41 @@
image: docker:latest
stages:
- test
- build
variables:
VERSION: latest
CACHETAG: build
DOCKER_HOST: tcp://${CI_REGISTRY}-leenooks-ci-docker:2375
services:
- ${CI_REGISTRY}/leenooks/ci-docker:dind
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
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}
tags:
- docker
only:
- master

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
# NAME leenooks/ci-apt
# VERSION stretch-slim
FROM debian:stretch-slim
RUN apt-get update && apt-get install -y git \
build-essential devscripts debhelper dh-make quilt \
autoconf autotools-dev automake libtool \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /build