summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoragardner <agardner@linuxfoundation.org>2017-04-26 15:31:26 +0200
committeragardner <agardner@linuxfoundation.org>2017-04-27 13:13:07 +0200
commit93747f1709a4641db4eae87c072e5825349b768a (patch)
treee1d30a22da02352daf46ef5a9fc0fc564a5f5bc5
parenta19708f290905bbb831e7430a1d9a984d5fb6e79 (diff)
Syntax Check for jinja2 files
Just something basic, theres no real logic yet Change-Id: I37efa8ffbe44981100d6849120d0900b8fb9280c Signed-off-by: agardner <agardner@linuxfoundation.org>
-rw-r--r--jjb/securedlab/check-jinja2.yml76
1 files changed, 76 insertions, 0 deletions
diff --git a/jjb/securedlab/check-jinja2.yml b/jjb/securedlab/check-jinja2.yml
new file mode 100644
index 000000000..578e7869f
--- /dev/null
+++ b/jjb/securedlab/check-jinja2.yml
@@ -0,0 +1,76 @@
+########################
+# Job configuration to validate jninja2 files
+########################
+- project:
+
+ name: validate-templates
+
+ project: securedlab
+
+ jobs:
+ - 'validate-jinja2-templates-{stream}'
+
+ stream:
+ - master:
+ branch: '{stream}'
+ disabled: false
+ - danube:
+ branch: 'stable/{stream}'
+ disabled: false
+
+########################
+# job templates
+########################
+
+- job-template:
+ name: 'validate-jinja2-templates-{stream}'
+
+ disabled: '{obj:disabled}'
+
+ parameters:
+ - project-parameter:
+ project: $GERRIT_PROJECT
+ branch: '{branch}'
+ - node:
+ name: SLAVE_NAME
+ description: Slave to execute jnija template test
+ default-slaves:
+ - lf-build1
+ allowed-multiselect: true
+ ignore-offline-nodes: true
+
+ scm:
+ - git-scm-gerrit
+
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.opnfv.org'
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'false'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ projects:
+ - project-compare-type: 'REG_EXP'
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ file-paths:
+ - compare-type: ANT
+ pattern: 'utils/generate_config.yml'
+ - compare-type: ANT
+ pattern: '**/*.jinja2'
+
+- builder:
+ name: validate-jnija-templates
+ builders:
+ -shell: |
+ set -o errexit
+ ./utils/generate_config.py -y labs/intel/pod5/pod.yaml -j
+ installers/joid/labconfig.jinja2