From 55963795a273a3d4116c6f18dd94550ce5592c0e Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 18 Feb 2019 07:26:48 +0100 Subject: [PATCH] initial --- .gitlab-ci.yml | 22 ++++++++++++++++++++++ Dockerfile | 11 +++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2b3fbe6 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,22 @@ +image: docker:stable + +stages: + - build + +variables: + IMAGE_NAME: registry.gitlab.com/wolutator/build-env-java + +build: + stage: build + tags: + - hottis + - linux + - docker + script: + - VERSION=`cat VERSION` + - echo "Version is $VERSION" + - docker build --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION . + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + - docker push $IMAGE_NAME:latest + - docker push $IMAGE_NAME:$VERSION + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4c30a5d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM registry.gitlab.com/wolutator/base-build-env:latest + +MAINTAINER Wolfgang Hottgenroth + + +RUN \ + apt update && \ + apt install -y openjdk-8-headless && \ + apt install -y maven && \ + rm -rf /var/lib/apt/lists/* +