From 221c6a8eef35217267a96a6c0bf75aecd20986f3 Mon Sep 17 00:00:00 2001
From: Maxime Guyot <Miouge1@users.noreply.github.com>
Date: Fri, 13 Mar 2020 18:29:22 +0100
Subject: [PATCH] Use a separate runner for light CI jobs (#5771)

---
 .gitlab-ci/lint.yml       | 6 ++++++
 .gitlab-ci/shellcheck.yml | 1 +
 .gitlab-ci/terraform.yml  | 3 +++
 3 files changed, 10 insertions(+)

diff --git a/.gitlab-ci/lint.yml b/.gitlab-ci/lint.yml
index b6a760410..675c845d6 100644
--- a/.gitlab-ci/lint.yml
+++ b/.gitlab-ci/lint.yml
@@ -2,6 +2,7 @@
 yamllint:
   extends: .job
   stage: unit-tests
+  tags: [light]
   variables:
     LANG: C.UTF-8
   script:
@@ -11,6 +12,7 @@ yamllint:
 vagrant-validate:
   extends: .job
   stage: unit-tests
+  tags: [light]
   variables:
     VAGRANT_VERSION: 2.2.4
   script:
@@ -20,6 +22,7 @@ vagrant-validate:
 ansible-lint:
   extends: .job
   stage: unit-tests
+  tags: [light]
   # lint every yml/yaml file that looks like it contains Ansible plays
   script: |-
     grep -Rl '^- hosts: \|^  hosts: ' --include \*.yml --include \*.yaml . | xargs -P 4 -n 25 ansible-lint -v
@@ -28,6 +31,7 @@ ansible-lint:
 syntax-check:
   extends: .job
   stage: unit-tests
+  tags: [light]
   variables:
     ANSIBLE_INVENTORY: inventory/local-tests.cfg
     ANSIBLE_REMOTE_USER: root
@@ -43,6 +47,7 @@ syntax-check:
 
 tox-inventory-builder:
   stage: unit-tests
+  tags: [light]
   extends: .job
   before_script:
     - ./tests/scripts/rebase.sh
@@ -56,6 +61,7 @@ tox-inventory-builder:
 
 markdownlint:
   stage: unit-tests
+  tags: [light]
   image: node
   before_script:
     - npm install -g markdownlint-cli
diff --git a/.gitlab-ci/shellcheck.yml b/.gitlab-ci/shellcheck.yml
index a8d7230df..78e32c943 100644
--- a/.gitlab-ci/shellcheck.yml
+++ b/.gitlab-ci/shellcheck.yml
@@ -2,6 +2,7 @@
 shellcheck:
   extends: .job
   stage: unit-tests
+  tags: [light]
   variables:
     SHELLCHECK_VERSION: v0.6.0
   before_script:
diff --git a/.gitlab-ci/terraform.yml b/.gitlab-ci/terraform.yml
index fa891beb8..c9038e35f 100644
--- a/.gitlab-ci/terraform.yml
+++ b/.gitlab-ci/terraform.yml
@@ -22,6 +22,7 @@
 .terraform_validate:
   extends: .terraform_install
   stage: unit-tests
+  tags: [light]
   only: ['master', /^pr-.*$/]
   script:
     - terraform validate -var-file=cluster.tfvars contrib/terraform/$PROVIDER
@@ -29,6 +30,7 @@
 
 .terraform_apply:
   extends: .terraform_install
+  tags: [light]
   stage: deploy-part2
   when: manual
   only: [/^pr-.*$/]
@@ -106,6 +108,7 @@ tf-validate-aws:
 
 tf-ovh_cleanup:
   stage: unit-tests
+  tags: [light]
   image: python
   variables:
     <<: *ovh_variables
-- 
GitLab