Add new job to deploy kni on baremetal 31/2031/10
authorYolanda Robla <yroblamo@redhat.com>
Wed, 20 Nov 2019 16:16:55 +0000 (17:16 +0100)
committerYolanda Robla <yroblamo@redhat.com>
Tue, 17 Dec 2019 10:58:17 +0000 (11:58 +0100)
This commit add jobs for the kni blueprints to
be ran using the baremetal profile

Signed-off-by: Yolanda Robla <yroblamo@redhat.com>
Change-Id: I8449bbad86f6297717b508a2b608359e56f2aac5

jjb/akraino-templates/akraino-jjb-kni.yaml
jjb/kni/kni_installer.yaml

index 2be2952..1f64bcc 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-- job-template:
-    id: kni-installer-verify-installer
-    name: '{project-name}-verify-installer'
+- kni_common: &kni_common
+    name: kni-common
 
     ######################
     # Default parameters #
     ######################
 
-    build-node: centos7-builder-2c-1g
+    build-node: "{build-node}"
     build-days-to-keep: 30
     build-timeout: 60
     submodule-recursive: true
+    gerrit_trigger_file_paths: "{obj:gerrit_trigger_file_paths}"
 
     #####################
     # Job Configuration #
     #####################
 
     project-type: freestyle
-    node: '{build-node}'
-
+    node: "{build-node}"
     properties:
       - lf-infra-properties:
           build-days-to-keep: '{build-days-to-keep}'
           build-timeout: '{build-timeout}'
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
-    gerrit_trigger_file_paths:
-      - compare-type: ANT
-        pattern: '**'
-
     scm:
       - lf-infra-gerrit-scm:
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
                 - branch-compare-type: ANT
                   branch-pattern: '**/{branch}'
               file-paths: '{obj:gerrit_trigger_file_paths}'
-
-    builders:
-      - lf-infra-pre-build
-      - shell: !include-raw-escape:
-          - ../shell/install_go.sh
-      - shell: !include-raw-escape:
-          - ../shell/build_kni_installer.sh
-
     publishers:
       - lf-infra-publish
 
-- job-template:
-    id: kni-installer-verify-binary
-    name: '{project-name}-verify-binary'
-
-    ######################
-    # Default parameters #
-    ######################
-
-    build-days-to-keep: 30
-    build-timeout: 60
-    build-node: centos7-builder-8c-8g
-    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}'
-
-    gerrit_trigger_file_paths:
-      - compare-type: ANT
-        pattern: 'Makefile'
-      - compare-type: ANT
-        pattern: 'cmd/binary.go'
-
-    gerrit_verify_triggers:
-      - patchset-created-event:
-          execlude-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)$'
-
-    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}'
-          submodule-disable: false
-          choosing-strategy: default
-
-    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
-      - shell: !include-raw-escape:
-          - ../shell/install_go.sh
-      - shell: !include-raw-escape:
-          - ../shell/build_kni_binary.sh
-
-    publishers:
-      - lf-infra-publish
-
-- job-template:
-    id: kni-verify-deploy-aws
-    name: 'kni-{project-name}-verify-deploy-aws'
-
-    ######################
-    # 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}'
-
+- kni_common_deploy: &kni_common_deploy
+    name: kni-common-deploy
+    <<: *kni_common
     archive-artifacts: >
       **/*.log
 
           - ssh-user-private-key:
               credential-id: kni-secrets
               key-file-variable: KNI_KEY_PATH
-
-    gerrit_trigger_file_paths:
-      - compare-type: ANT
-        pattern: 'profiles/production.aws/**'
-      - compare-type: ANT
-        pattern: 'sites/testing.aws.edge-sites.net/**'
-      - compare-type: ANT
-        pattern: 'base/**'
-
-    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)$'
-
     scm:
       - akraino-lf-infra-gerrit-scm:
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
           submodule-disable: false
           choosing-strategy: default
           basedir: 'installer'
+
+- job-template:
+    id: kni-installer-verify-installer
+    name: '{project-name}-verify-installer'
+    gerrit_trigger_file_paths:
+      - compare-type: ANT
+        pattern: '**'
+    <<: *kni_common
+    build-node: centos7-builder-2c-1g
+
+    builders:
+      - lf-infra-pre-build
+      - shell: !include-raw-escape:
+          - ../shell/install_go.sh
+      - shell: !include-raw-escape:
+          - ../shell/build_kni_installer.sh
+
+- job-template:
+    id: kni-installer-verify-binary
+    name: '{project-name}-verify-binary'
+    <<: *kni_common
+    build-node: centos7-builder-8c-8g
+
+    gerrit_trigger_file_paths:
+      - compare-type: ANT
+        pattern: 'Makefile'
+      - compare-type: ANT
+        pattern: 'cmd/binary.go'
+
     triggers:
       - gerrit:
           server-name: '{gerrit-server-name}'
                   branch-pattern: '**/{branch}'
               file-paths: '{obj:gerrit_trigger_file_paths}'
 
+    builders:
+      - lf-infra-pre-build
+      - shell: !include-raw-escape:
+          - ../shell/install_go.sh
+      - shell: !include-raw-escape:
+          - ../shell/build_kni_binary.sh
+
+- job-template:
+    id: kni-installer-publish-openshift-install-libvirt-binary
+    name: '{project-name}-publish-openshift-install-libvirt-binary'
+    <<: *kni_common
+    build-node: centos7-builder-8c-8g
+
+    gerrit_trigger_file_paths: []
+    gerrit_build_triggers:
+      - comment-added-contains-event:
+          comment-contains-value: '^build-binary'
+    builders:
+      - lf-infra-pre-build
+      - shell: !include-raw-escape:
+          - ../shell/install_go.sh
+      - shell: !include-raw-escape:
+          - ../shell/build_openshift_install_libvirt_binary.sh
+
+- job-template:
+    id: kni-verify-deploy-aws
+    name: 'kni-{project-name}-verify-deploy-aws'
+    build-node: kni-libvirt
+    <<: *kni_common_deploy
+
+    gerrit_trigger_file_paths:
+      - compare-type: ANT
+        pattern: 'profiles/production.aws/**'
+      - compare-type: ANT
+        pattern: 'sites/testing.aws.edge-sites.net/**'
+      - compare-type: ANT
+        pattern: 'base/**'
+
     builders:
       - lf-infra-pre-build
       - config-file-provider:
           - ../shell/install_go.sh
       - shell: ./installer/ci/kni_deploy_aws.sh
 
-    publishers:
-      - lf-infra-publish
-
 - job-template:
     id: kni-verify-deploy-libvirt
     name: 'kni-{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}'
-      - string:
-          name: ARCHIVE_ARTIFACTS
-          default: '{archive-artifacts}'
-          description: Artifacts to archive to the logs server.
-
-    archive-artifacts: >
-      **/*.log
-
-    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
+    <<: *kni_common_deploy
 
     gerrit_trigger_file_paths:
       - compare-type: ANT
       - compare-type: ANT
         pattern: 'base/**'
 
-    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)$'
+    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: ./installer/ci/kni_deploy_libvirt.sh
 
-    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}'
+- job-template:
+    id: kni-verify-deploy-baremetal
+    name: 'kni-{project-name}-verify-deploy-baremetal'
+    <<: *kni_common_deploy
+    build-timeout: 120
+    build-node: kni-baremetal
+
+    gerrit_trigger_file_paths:
+      - compare-type: ANT
+        pattern: 'profiles/production.baremetal/**'
+      - compare-type: ANT
+        pattern: 'sites/testing.baremetal.edge-sites.net/**'
+      - compare-type: ANT
+        pattern: 'base/**'
 
     scm:
       - akraino-lf-infra-gerrit-scm:
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
-          git-url: '{git-url}/{project}.git'
+          git-url: 'https://github.com/yrobla/testing.baremetal.edge-sites.net'
           refspec: '$GERRIT_REFSPEC'
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
           submodule-disable: false
           choosing-strategy: default
-          basedir: '{project-name}'
+          basedir: 'testing.baremetal.edge-sites.net'
       - akraino-lf-infra-gerrit-scm:
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
           git-url: '{git-url}/kni/installer.git'
           submodule-disable: false
           choosing-strategy: default
           basedir: 'installer'
+
     builders:
       - lf-infra-pre-build
       - config-file-provider:
               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: ./installer/ci/kni_deploy_libvirt.sh
-
-    publishers:
-      - lf-infra-publish
-
-- job-template:
-    id: kni-installer-publish-openshift-install-libvirt-binary
-    name: '{project-name}-publish-openshift-install-libvirt-binary'
-
-    ######################
-    # Default parameters #
-    ######################
-
-    build-days-to-keep: 200
-    build-timeout: 60
-    build-node: centos7-builder-8c-8g
-    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}'
-
-    gerrit_build_triggers:
-      - comment-added-contains-event:
-          comment-contains-value: '^build-binary'
-
-    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}'
-          submodule-disable: false
-          choosing-strategy: default
-
-    triggers:
-      - gerrit:
-          server-name: '{gerrit-server-name}'
-          trigger-on: '{obj:gerrit_build_triggers}'
-          projects:
-            - project-compare-type: ANT
-              project-pattern: '{project}'
-              branches:
-                - branch-compare-type: ANT
-                  branch-pattern: '**/{branch}'
-
-    builders:
-      - lf-infra-pre-build
-      - shell: !include-raw-escape:
-          - ../shell/install_go.sh
-      - shell: !include-raw-escape:
-          - ../shell/build_openshift_install_libvirt_binary.sh
-
-    publishers:
-      - lf-infra-publish
+      - shell: sudo -E ./installer/ci/kni_deploy_baremetal.sh
index f3b41ff..82da1bd 100644 (file)
@@ -19,6 +19,7 @@
     jobs:
       - kni-verify-deploy-aws
       - kni-verify-deploy-libvirt
+      - kni-verify-deploy-baremetal
 
 - project:
     name: kni-blueprint-basic-3-masters
@@ -29,3 +30,4 @@
     jobs:
       - kni-verify-deploy-aws
       - kni-verify-deploy-libvirt
+      - kni-verify-deploy-baremetal