INFRA: Switch to tox for JJB verify and merge jobs
[infra/cicd.git] / jjb / infra / jjb-merge-jobs.yaml
index cbd58155d5beb5636eb42377bb8d8b857ecca5cc..4df7d67a25dadcf8001a8507c7f975c96bc0a8dc 100644 (file)
@@ -1,43 +1,68 @@
 ---
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2020 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
 # this job gets triggered when a change is merged in cicd/jjb
 # the updates to the jobs are deployed to jenkins using jenkins-jobs update command
-# result will be send to Gerrit in the form of a comment
+# executed from tox. The result will be send to Gerrit in the form of a comment
 - project:
-
     name: infra-jjb-merge
-
     project: infra/cicd
 
     stream:
       - master:
           branch: '{stream}'
-          ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
 
+    lint-type: jjbdeploy
     jobs:
-      - infra-jjb-merge-{stream}
+      - infra-merge-cicd-jjb-{stream}
 
 
 - job-template:
-    name: infra-jjb-merge-{stream}
-
-    node: ubuntu1804
-
+    name: infra-merge-cicd-jjb-{stream}
+    node: infra-tools-docker-slave-ubuntu1804
     disabled: false
-
     concurrent: false
 
     parameters:
-      - infra-parameters
       - project-parameters:
           project: '{project}'
           branch: '{branch}'
+          description: 'The project and branch which the change is proposed for'
+      - string:
+          name: LINT_TYPE
+          default: '{lint-type}'
+          description: 'Lint type to run'
+      - string:
+          name: VERBOSITY
+          default: 'false'
+          description: 'Verbosity setting for the lint script'
       - nordix-gerrit-parameters
 
+    properties:
+      - logrotate
+
     scm:
       - git-scm:
-          ssh-credentials-id: '{ssh-credentials-id}'
+          ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: ''
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-trigger-change-merged:
 
     wrappers:
       - nordixinfra-jjb-creds-wrapper
+      - build-timeout:
+          timeout: 60
+      - fix-workspace-permissions
 
     builders:
       - shell:
-          !include-raw-escape: ./jjb-merge.sh
+          !include-raw-escape: ./lint.sh