Initial commit
Add infrastructure jobs for sandbox
Related-PROD: RE-336
Change-Id: I2140d47e3fc360ab05f92175b29b31e69b2ec10b
diff --git a/common/templates/codenarc.yaml b/common/templates/codenarc.yaml
new file mode 100644
index 0000000..4843314
--- /dev/null
+++ b/common/templates/codenarc.yaml
@@ -0,0 +1,37 @@
+---
+
+- job-template:
+ name: infra.codenarc
+ id: common/codenarc
+ project-type: pipeline
+ description: Check groovy scripts by CodeNarc
+ concurrent: True
+
+ properties:
+ - build-discarder:
+ days-to-keep: 14
+ - inject:
+ properties-content: |
+ DOCKER_IMAGE=docker-prod-local.docker.mirantis.net/infra/codenarc:latest
+ K8S_CLUSTER={k8s_cluster}
+ NODE_LABEL={codenarc_node|docker}
+ GIT_CREDENTIALS_ID={git-credentials-id}
+
+
+ parameters:
+ - hidden:
+ name: DEFAULT_RULES
+ default: !include-raw-escape: ../../codenarcRules.groovy
+
+ triggers:
+ - gerrit:
+ server-name: '{gerrit-server}'
+ projects: '{obj:projects}'
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: True
+ custom-url: '- ${{JOB_NAME}} ${{BUILD_URL}}artifact/report.html'
+ skip-vote:
+ notbuilt: true
+
+ dsl: !include-raw-escape: ../pipelines/codenarc.groovy