summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schramm <tobleminer@gmail.com>2018-08-24 17:21:44 +0200
committerTobias Schramm <tobleminer@gmail.com>2018-08-24 17:21:44 +0200
commitb5f8a4ad16482b67d8a738e1b61ed5c3b5c868d0 (patch)
treed84db5bef5124cb7b0afe5574ead480363973094
parent9066ea0e6f311373facf48ff5e9386ba24842662 (diff)
Add custom container setup
-rw-r--r--.gitlab-ci.yml19
-rw-r--r--.gitlab-ci/docker/Dockerfile3
2 files changed, 21 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e742732..28198f0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,12 +1,29 @@
variables:
+ GIT_SUBMODULE_STRATEGY: recursive
+ GIT_SSL_CAPATH: /etc/ssl/certs/
+ CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/build
GATEWAYS: "vpn0 vpn6"
stages:
+ - container
- prepare
- validate
- deploy
-prepare:
+docker:
+ stage: container
+ image: docker:latest
+ services:
+ - docker:dind
+ script:
+ - docker info
+ - docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
+ - docker pull $CONTAINER_IMAGE:latest || true
+ - docker build --cache-from $CONTAINER_IMAGE:latest -t $CONTAINER_IMAGE:$CI_COMMIT_SHA -t $CONTAINER_IMAGE:latest .gitlab-ci/docker
+ - docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA
+ - docker push $CONTAINER_IMAGE:latest
+
+scripts:
stage: prepare
script:
- git clone https://gitlab.toppoint.de/ffki/ffki-scripts.git ./gitlab-ci/ffki-scripts
diff --git a/.gitlab-ci/docker/Dockerfile b/.gitlab-ci/docker/Dockerfile
new file mode 100644
index 0000000..a6767a6
--- /dev/null
+++ b/.gitlab-ci/docker/Dockerfile
@@ -0,0 +1,3 @@
+FROM debian:stretch
+
+RUN apt-get update && apt-get install -y git