First experimental job for offline deployments 25/82425/5
authorMichal Ptacek <m.ptacek@partner.samsung.com>
Fri, 15 Mar 2019 14:05:49 +0000 (14:05 +0000)
committerMichal Ptacek <m.ptacek@partner.samsung.com>
Thu, 21 Mar 2019 13:58:34 +0000 (13:58 +0000)
This job is just basic yaml lint check for offline
installer ansible playbooks. It should fail unless
all warnings are fixed in ansible code.

Issue-ID: OOM-1707
Change-Id: Ib65023e51d176855b35d470513edb26c40a22e59
Signed-off-by: Michal Ptacek <m.ptacek@partner.samsung.com>
jjb/oom/include-yaml-check.sh [new file with mode: 0755]
jjb/oom/offline-installer.yaml [new file with mode: 0644]
jjb/oom/oom-jobs.yaml [new file with mode: 0644]

diff --git a/jjb/oom/include-yaml-check.sh b/jjb/oom/include-yaml-check.sh
new file mode 100755 (executable)
index 0000000..27359e5
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# setting-up bash flags
+set -x -e -o pipefail
+
+# remove old ansible - current centos build minion
+# is quite old and using incompatible ansible 2.4.x
+sudo yum -y remove ansible
+sudo pip install ansible ansible-lint
+
+# perform check
+ansible --version
+ansible-lint --version
+ansible-lint ./ansible/site.yml -vvv
diff --git a/jjb/oom/offline-installer.yaml b/jjb/oom/offline-installer.yaml
new file mode 100644 (file)
index 0000000..ca2f15f
--- /dev/null
@@ -0,0 +1,14 @@
+---
+- project:
+    name: offline-installer
+    project-name: 'offline-installer'
+    build-node: centos7-builder-2c-1g
+    offline_build_script: !include-raw-escape: include-yaml-check.sh
+
+    stream:
+      - 'master':
+          branch: 'master'
+
+    jobs:
+      - '{project-name}-{stream}-yaml-lint':
+          build_script: '{offline_build_script}'
diff --git a/jjb/oom/oom-jobs.yaml b/jjb/oom/oom-jobs.yaml
new file mode 100644 (file)
index 0000000..02eae3f
--- /dev/null
@@ -0,0 +1,34 @@
+---
+- job-template:
+    name: '{project-name}-{stream}-yaml-lint'
+    node: '{build-node}'
+    type: freestyle
+    build_script: ''
+    pattern: '**'
+
+    parameters:
+      - lf-infra-parameters:
+          branch: '{branch}'
+          project: 'oom/{project-name}'
+          stream: '{stream}'
+          lftools-version: '{lftools-version}'
+
+    scm:
+      - gerrit-trigger-scm:
+          refspec: '$GERRIT_REFSPEC'
+          submodule-recursive: '{submodule-recursive}'
+          choosing-strategy: 'gerrit'
+
+    triggers:
+      - gerrit-trigger-patch-submitted:
+          server: '{server-name}'
+          project: 'oom/{project-name}'
+          branch: '{branch}'
+          files: '{obj:pattern}'
+
+    builders:
+      - shell: '{obj:build_script}'
+
+    publishers:
+      - lf-infra-publish
+