From eee233a75a72a227f504a02a1e63a23f33c30d19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adri=C3=A1n=20Robotka?= <robotka.adrian@gmail.com>
Date: Sun, 10 Jan 2021 22:54:36 +0100
Subject: [PATCH] add ci folder

---
 README.md                  | 25 +++++++++++++++++++++++++
 ci/pipeline/role-test.yaml | 22 ++++++++++++++++++++++
 ci/template/stages.yaml    |  7 +++++++
 role-test.yaml             | 22 ----------------------
 4 files changed, 54 insertions(+), 22 deletions(-)
 create mode 100644 ci/pipeline/role-test.yaml
 create mode 100644 ci/template/stages.yaml
 delete mode 100644 role-test.yaml

diff --git a/README.md b/README.md
index e69de29..a30c21b 100644
--- a/README.md
+++ b/README.md
@@ -0,0 +1,25 @@
+# Authority of the Ansible subgroup
+
+# Content of the repo
+
+- CI config for the whole subgroup
+- GitLab API scripts to setup repos in the subgroup
+- Template files for the playbooks
+
+# Usage example of the CI
+
+Example `.gitlab-ci.yml` files. Check tags under `https://git.sch.bme.hu/kszk/sysadmin/ansible/ansci/-/tags`
+
+```yaml
+include:
+  - project: kszk/sysadmin/ansible/ansci
+    ref: 0.1.0
+    file: /pipeline/playbook.yaml
+```
+
+```yaml
+include:
+  - project: kszk/sysadmin/ansible/ansci
+    ref: 0.1.0
+    file: /pipeline/role.yaml
+```
diff --git a/ci/pipeline/role-test.yaml b/ci/pipeline/role-test.yaml
new file mode 100644
index 0000000..a590d56
--- /dev/null
+++ b/ci/pipeline/role-test.yaml
@@ -0,0 +1,22 @@
+---
+
+include:
+  - template/stages.yaml
+
+# TODO insert editorconfig file
+
+# include CI config from another repo
+include:
+  - project: kszk/ci
+    ref: 0.1.0
+    file: /job/editorconfig-check.yaml
+
+  - project: kszk/ci
+    ref: 0.1.0
+    file: /job/yaml-test.yaml
+
+ansible-lint:
+  stage: test
+  image: registry.kszk.bme.hu/baseimg/ansible
+  script:
+    - ansible-lint .
diff --git a/ci/template/stages.yaml b/ci/template/stages.yaml
new file mode 100644
index 0000000..73c7402
--- /dev/null
+++ b/ci/template/stages.yaml
@@ -0,0 +1,7 @@
+---
+
+# Ordering jobs with stages
+include:
+  - project: kszk/ci
+    ref: 0.1.0
+    file: /template/stages.yaml
diff --git a/role-test.yaml b/role-test.yaml
deleted file mode 100644
index 1ef0f4c..0000000
--- a/role-test.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-editorconfig:
-  stage: test
-  image:
-    name: odannyc/eclint
-    entrypoint: [""]
-  allow_failure: true
-  script:
-    - eclint check $(git ls-files)
-
-ansible-lint:
-  stage: test
-  image: registry.kszk.bme.hu/baseimg/ansible
-  script:
-    - ansible-lint .
-
-yaml-lint:
-  stage: test
-  image: sdesbure/yamllint
-  allow_failure: true
-  script:
-    - yamllint .
-- 
GitLab