From bea0257caeaebf81a7567cc3a74f6631705bc788 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Wed, 29 Jul 2020 22:47:32 +0200 Subject: [PATCH] Update CI jobs --- gitlab-ci/build.yml | 4 ++++ gitlab-ci/deploy.yml | 4 ++-- gitlab-ci/lint.yml | 12 +++++++++--- gitlab-ci/test.yml | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gitlab-ci/build.yml b/gitlab-ci/build.yml index c8df615..4d9854d 100644 --- a/gitlab-ci/build.yml +++ b/gitlab-ci/build.yml @@ -5,3 +5,7 @@ static: - npm install script: - npm run build + only: + refs: + - development + - merge_requests diff --git a/gitlab-ci/deploy.yml b/gitlab-ci/deploy.yml index 6eaa01f..05365df 100644 --- a/gitlab-ci/deploy.yml +++ b/gitlab-ci/deploy.yml @@ -1,11 +1,11 @@ deploy: stage: deploy - image: debian:buster + image: python:3.7 environment: name: production url: rss.fudiggity.nl before_script: - - apt-get update && apt-get install --quiet --quiet --assume-yes ansible git + - pip install ansible --quiet - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@git.fudiggity.nl/sonny/ansible-playbooks.git deployment - mkdir /root/.ssh - echo "192.168.178.63 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILbtcdgJBhVCKsO88cV19EYefDTopdYejEQCp1pYr1Ga" > /root/.ssh/known_hosts diff --git a/gitlab-ci/lint.yml b/gitlab-ci/lint.yml index 134716f..0300c33 100644 --- a/gitlab-ci/lint.yml +++ b/gitlab-ci/lint.yml @@ -1,7 +1,6 @@ python-linting: stage: lint - allow_failure: true - image: python:3.7.4-slim-stretch + image: python:3.7 before_script: - pip install poetry --quiet - poetry config cache-dir ~/.cache/poetry @@ -11,12 +10,19 @@ python-linting: - poetry run isort src/ --check-only --recursive - poetry run black src/ --line-length 88 --check - poetry run autoflake src/ --check --recursive --remove-all-unused-imports --ignore-init-module-imports + only: + refs: + - development + - merge_requests javascript-linting: stage: lint - allow_failure: true image: node:12 before_script: - npm install script: - npm run lint + only: + refs: + - development + - merge_requests diff --git a/gitlab-ci/test.yml b/gitlab-ci/test.yml index 723a0e8..3114a87 100644 --- a/gitlab-ci/test.yml +++ b/gitlab-ci/test.yml @@ -4,7 +4,7 @@ python-tests: services: - postgres:11 - memcached:1.5.22 - image: python:3.7.4-slim-stretch + image: python:3.7 before_script: - pip install poetry --quiet - poetry config cache-dir .cache/poetry