From cc4a5f71606b679c9c227bba5a5601ee136ef323 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 22 Jan 2021 22:59:31 +0200
Subject: [PATCH] CI templates.

---
 .gitlab-ci.yml | 51 +++++++-------------------------------------------
 1 file changed, 7 insertions(+), 44 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7c51269..0ba5ad7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,45 +1,8 @@
 ---
-stages:
-  - test
-  - release
-
-pre-commit:
-  stage: test
-  image: adarnimrod/ci-images:pre-commit
-  variables: &variables
-    XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
-  script:
-    - pre-commit run -a
-  cache: &cache
-    paths:
-      - .cache/
-
-upload:
-  stage: release
-  image: python:3.6
-  before_script:
-    - pip install twine
-    - mv "$pypirc" $HOME/.pypirc
-  script:
-    - python setup.py bdist_wheel
-    - twine upload dist/*
-  variables: *variables
-  cache: *cache
-  rules:
-    - if: $CI_COMMIT_TAG
-  artifacts:
-    paths:
-      - dist/*.whl
-
-release:
-  stage: release
-  image: registry.gitlab.com/gitlab-org/release-cli:latest
-  script:
-    - !!str true
-  rules:
-    - if: $CI_COMMIT_TAG
-  release:
-    name: Release $CI_COMMIT_TAG
-    tag_name: $CI_COMMIT_TAG
-    ref: $CI_COMMIT_TAG
-    description: Release $CI_COMMIT_TAG
+include:
+  - project: shore/ci-templates
+    file: templates/pre-commit.yml
+  - project: shore/ci-templates
+    file: templates/python.yml
+  - project: shore/ci-templates
+    file: templates/gitlab-release.yml
-- 
GitLab