Merge "Add new job for deploying libvirt"
[ci-management.git] / jjb / akraino-templates / akraino-jjb-kni.yaml
index 8c28d8b..ae16f98 100644 (file)
     publishers:
       - lf-infra-publish
 
+- job-template:
+    id: kni-installer-merge-deploy-libvirt
+    name: '{project-name}-merge-deploy-libvirt'
+
+    ######################
+    # Default parameters #
+    ######################
+
+    archive-artifacts: >
+      **/*.log
+    build-days-to-keep: 30
+    build-timeout: 60
+    build-node: kni-libvirt
+    submodule-recursive: true
+
+    #####################
+    # Job Configuration #
+    #####################
+
+    project-type: freestyle
+    node: '{build-node}'
+
+    properties:
+      - lf-infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+
+    parameters:
+      - lf-infra-parameters:
+          project: '{project}'
+          branch: '{branch}'
+          stream: '{stream}'
+          lftools-version: '{lftools-version}'
+      - string:
+          name: ARCHIVE_ARTIFACTS
+          default: '{archive-artifacts}'
+          description: Artifacts to archive to the logs server.
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: '{build-timeout}'
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+      - credentials-binding:
+          - ssh-user-private-key:
+              credential-id: kni-secrets
+              key-file-variable: KNI_KEY_PATH
+
+    gerrit_trigger_file_paths:
+      - compare-type: REG_EXP
+        pattern: '.*'
+
+    gerrit_merge_triggers:
+      - change-merged-event
+      - comment-added-contains-event:
+          comment-contains-value: remerge$
+
+    scm:
+      - lf-infra-gerrit-scm:
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+          git-url: '{git-url}/{project}.git'
+          refspec: '$GERRIT_REFSPEC'
+          branch: '$GERRIT_BRANCH'
+          submodule-recursive: '{submodule-recursive}'
+          submodule-timeout: '{submodule-timeout}'
+          choosing-strategy: default
+
+    triggers:
+      - gerrit:
+          server-name: '{gerrit-server-name}'
+          trigger-on: '{obj:gerrit_merge_triggers}'
+          projects:
+            - project-compare-type: ANT
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: ANT
+                  branch-pattern: '**/{branch}'
+              file-paths: '{obj:gerrit_trigger_file_paths}'
+
+    builders:
+      - lf-infra-pre-build
+      - config-file-provider:
+          files:
+            - file-id: kni-coreos-pull-secret
+              target: akraino-secrets/coreos-pull-secret
+            - file-id: kni-ssh-pub-key
+              target: akraino-secrets/ssh-pub-key
+      - shell: !include-raw-escape:
+          - ../shell/install_go.sh
+      - shell: !include-raw-escape:
+          - ../shell/kni_deploy_libvirt.sh
+
+    publishers:
+      - lf-infra-publish
+
 - job-template:
     id: kni-templates-verify-deploy-aws
     name: '{project-name}-verify-deploy-aws'
           - ../shell/install_go.sh
       - shell: !include-raw-escape:
           - ../shell/kni_deploy_aws.sh
+
+    publishers:
+      - lf-infra-publish
+
+- job-template:
+    id: kni-templates-verify-deploy-libvirt
+    name: '{project-name}-verify-deploy-libvirt'
+
+    ######################
+    # Default parameters #
+    ######################
+
+    build-days-to-keep: 30
+    build-timeout: 60
+    build-node: kni-libvirt
+    submodule-recursive: true
+
+    #####################
+    # Job Configuration #
+    #####################
+
+    project-type: freestyle
+    node: '{build-node}'
+
+    properties:
+      - lf-infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+
+    parameters:
+      - lf-infra-parameters:
+          project: '{project}'
+          branch: '{branch}'
+          stream: '{stream}'
+          lftools-version: '{lftools-version}'
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: '{build-timeout}'
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+      - credentials-binding:
+          - ssh-user-private-key:
+              credential-id: kni-secrets
+              key-file-variable: KNI_KEY_PATH
+
+    gerrit_trigger_file_paths:
+      - compare-type: REG_EXP
+        pattern: 'aws/*'
+
+    scm:
+      - lf-infra-gerrit-scm:
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+          git-url: '{git-url}/kni/installer.git'
+          refspec: '$GERRIT_REFSPEC'
+          branch: '$GERRIT_BRANCH'
+          submodule-recursive: '{submodule-recursive}'
+          submodule-timeout: '{submodule-timeout}'
+          choosing-strategy: default
+
+    gerrit_verify_triggers:
+      - patchset-created-event:
+          exclude-drafts: true
+          exclude-trivial-rebase: false
+          exclude-no-code-change: false
+      - draft-published-event
+      - comment-added-contains-event:
+          comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
+
+    triggers:
+      - gerrit:
+          server-name: '{gerrit-server-name}'
+          trigger-on: '{obj:gerrit_verify_triggers}'
+          projects:
+            - project-compare-type: ANT
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: ANT
+                  branch-pattern: '**/{branch}'
+              file-paths: '{obj:gerrit_trigger_file_paths}'
+
+    builders:
+      - lf-infra-pre-build
+      - config-file-provider:
+          files:
+            - file-id: kni-coreos-pull-secret
+              target: akraino-secrets/coreos-pull-secret
+            - file-id: kni-ssh-pub-key
+              target: akraino-secrets/ssh-pub-key
+      - shell: !include-raw-escape:
+          - ../shell/install_go.sh
+      - shell: !include-raw-escape:
+          - ../shell/kni_deploy_libvirt.sh
+
+    publishers:
+      - lf-infra-publish
+