Initial Revision
This commit is contained in:
commit
8bea309906
41
.gitlab-ci.yml
Normal file
41
.gitlab-ci.yml
Normal 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
13
Dockerfile
Normal 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
|
Reference in New Issue
Block a user