From 6fae7acf1120118bb1a5d02e5c5f254fd9b8702c Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Wed, 13 Jun 2018 10:46:33 -0700 Subject: [PATCH 1/3] Trying some new things with the gitlab.yml file, also removing pylint from requirements.txt so it is only instlled during testing --- .gitlab-ci.yml | 14 ++++++-------- Dockerfile-test-env | 1 + app/requirements.txt | 1 - 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 235bd2c7..5a726381 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,22 +4,20 @@ services: before_script: - apk add --no-cache python3 - - pip3 install -r app/requirements.txt stages: - - test + - linting - deploy -linting_python: - stage: test +linting: + stage: linting + before_script: + - pip3 install pylint script: - pylint -E app/*.py - only: - - /.*/ - tags: - - docker build_and_push_container: + - pip3 install -r app/requirements.txt stage: deploy script: - docker login -u ldooks -p $DOCKER_PASSWORD diff --git a/Dockerfile-test-env b/Dockerfile-test-env index 48408c6c..f3cc7527 100644 --- a/Dockerfile-test-env +++ b/Dockerfile-test-env @@ -3,6 +3,7 @@ ADD app/requirements.txt /requirements.txt RUN apk update && \ apk add --no-cache vim docker && \ pip install -U pip && \ + pip install pylint && \ pip install -r requirements.txt ADD app /app diff --git a/app/requirements.txt b/app/requirements.txt index 5648ee1b..ec1efc85 100644 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -2,7 +2,6 @@ beautifulsoup4 discord.py docker gTTS -pylint pyowm requests wikipedia From 1c8d2a9c02f055e38d92a87e17eb1977006c9032 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Wed, 13 Jun 2018 10:50:03 -0700 Subject: [PATCH 2/3] fixing pip call in the yaml file --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a726381..1cef16eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,9 +2,6 @@ image: docker:latest services: - docker:dind -before_script: - - apk add --no-cache python3 - stages: - linting - deploy @@ -12,11 +9,14 @@ stages: linting: stage: linting before_script: + - apk add --no-cache python3 - pip3 install pylint script: - pylint -E app/*.py build_and_push_container: + before_script: + - apk add --no-cache python3 - pip3 install -r app/requirements.txt stage: deploy script: From 9bd119e6605eb18d2e47f5e4cb8eae3defe387d8 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Wed, 13 Jun 2018 10:56:19 -0700 Subject: [PATCH 3/3] guess i cant get away with not installing requirements for linting --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1cef16eb..e8a7213d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,7 @@ linting: before_script: - apk add --no-cache python3 - pip3 install pylint + - pip3 install -r app/requirements.txt script: - pylint -E app/*.py