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/*