From 18495e17bc8ff3fc3bf5119ac315d11a912de818 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Fri, 19 May 2017 15:48:20 +0200 Subject: [PATCH] TASK: Add own docker image --- .gitlab-ci.yml | 22 ++++++++++++++++++++-- Dockerfile | 12 ++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a0143a2..1b712d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,30 @@ +stages: + - build + - test + +build:image: + image: docker:git + stage: build + services: + - docker:dind + script: + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com + - docker build -t registry.gitlab.com/danielsiepmann/neotags . + - docker push registry.gitlab.com/neotags/neotags:latest + only: + - master + lint:coding-guideline: - image: python:3-alpine + image: 'registry.gitlab.com/danielsiepmann/neotags:latest' + stage: test before_script: - pip install pep8 script: - pep8 . test: - image: python:3-alpine + image: 'registry.gitlab.com/danielsiepmann/neotags:latest' + stage: test before_script: - apk add --no-cache gcc - pip install neovim diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f47fa5c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM alpine:3.5 + +MAINTAINER Daniel Siepmann +LABEL Description="This image should provide environment to lint neotags" Vendor="DanielSiepmann" Version="1.0" + +RUN apk update && apk upgrade + +# Install dependencies +RUN apk add python3 py-pip + +# Clean APK cache +RUN rm -rf /var/cache/apk/*