Merge "[ta] Add TA verify and merge jobs"
authorEric Ball <eball@linuxfoundation.org>
Tue, 21 May 2019 20:41:29 +0000 (20:41 +0000)
committerGerrit Code Review <gerrit@akraino.org>
Tue, 21 May 2019 20:41:29 +0000 (20:41 +0000)
jjb/iec/iec-seba_on_arm.sh [new file with mode: 0644]
jjb/iec/iec.yaml
jjb/regional_controller/api-server-docker.yaml [new file with mode: 0644]
jjb/regional_controller/api-server.yaml [new file with mode: 0644]

diff --git a/jjb/iec/iec-seba_on_arm.sh b/jjb/iec/iec-seba_on_arm.sh
new file mode 100644 (file)
index 0000000..2db62c7
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/bash
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2019 Enea Software AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+export TERM="vt220"
+
+echo "JOB_NAME=${JOB_NAME}"
+
+case "${JOB_NAME}" in
+  *fuel*)
+    K8S_MASTER_IP=$(docker exec fuel cat /etc/hosts | grep iec01 \
+                    | awk '{print $1}')
+    # On Fuel deployements the K8s ssh key is the one used by the deploy job
+    K8S_SSH_KEY=${SSH_KEY}
+    IEC_DIR="/home/${K8S_SSH_USER}/iec"
+    ;;
+  *)
+    echo "Cannot determine installer from ${JOB_NAME}"
+    exit 1
+    ;;
+esac
+
+if [ -z "$K8S_SSH_USER" ]
+then
+  echo "K8S_SSH_USER not set, cannot ssh to install SEBA"
+  exit 1
+fi
+
+INSTALL_CMD="cd ${IEC_DIR}/src/use_cases/seba_on_arm/install; ./install.sh"
+
+if [ -n "${K8S_SSH_PASSWORD}" ]
+then
+  sshpass -o StrictHostKeyChecking=no -p "${K8S_SSH_PASSWORD}" \
+    "${K8S_SSH_USER}"@"${K8S_MASTER_IP}" "${INSTALL_CMD}"
+elif [ -n "${K8S_SSH_KEY}" ]
+then
+  ssh -o StrictHostKeyChecking=no -i "${K8S_SSH_KEY}" \
+    "${K8S_SSH_USER}"@"${K8S_MASTER_IP}" "${INSTALL_CMD}"
+else
+  echo "Neither K8S_SSH_USER or K8S_SSH_KEY set. Cannot ssh to K8S Master"
+  exit 1
+fi
+
+exit 0
index b0cc699..4cb9440 100644 (file)
           slave-label: 'aarch64_dev'
           scenario: 'k8-calico-iec-noha'
 
+    # -------------------------------
+    # USECASE DEFINITIONS
+    # -------------------------------
+    usecase:
+      - seba_on_arm:
+          slave-label: 'aarch64_dev'
+          scenario: 'k8-calico-iec-noha'
+
     jobs:
       - 'iec-{deploy-type}-daily-{stream}'
       - 'iec-deploy-{deploy-type}-daily-{stream}'
+      - 'iec-install-{usecase}-{deploy-type}-daily-{stream}'
 
 ##############
 # PARAMETERS #
@@ -44,7 +53,7 @@
           description: 'IP of the installer'
       - string:
           name: SSH_KEY
-          default: "/var/lib/opnfv/mcp.rsa"
+          default: '/var/lib/opnfv/mcp.rsa'
           description: 'Path to private SSH key to access environment nodes'
       - string:
           name: EXTERNAL_NETWORK
       - string:
           name: CI_DEBUG
           default: 'false'
-          description: "Show debug output information"
+          description: 'Show debug output information'
+- parameter:
+    name: 'seba_on_arm-defaults'
+    parameters:
+      - string:
+          name: K8S_SSH_USER
+          default: 'ubuntu'
+          description: 'SSH username to connect to the K8s master '
+      - string:
+          name: K8S_SSH_PASSWORD
+          default: ''
+          description: 'SSH password to connect to the K8s master'
+      - string:
+          name: K8S_SSH_KEY
+          default: ''
+          description: 'SSH key to connect to the K8s master'
 
 ########################
 # job templates
       - '{project}-defaults'
       - string:
           name: DEPLOY_SCENARIO
-          default: 'k8-calico-iec-noha'
+          default: '{scenario}'
 
     builders:
       - trigger-builds:
             current-parameters: false
             predefined-parameters: |
               DEPLOY_SCENARIO={scenario}
-              INSTALLER_VERSION={stream}
+            same-node: true
+            block: true
+          - project: 'iec-install-{usecase}-daily-{stream}'
+            current-parameters: false
             same-node: true
             block: true
 
       - '{project}-defaults'
       - string:
           name: DEPLOY_SCENARIO
-          default: 'k8-calico-iec-noha'
+          default: '{scenario}'
 
     wrappers:
       - build-name:
           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
 
-    scm:
+    scm: &scm
       - git:
           credentials-id: '{jenkins-ssh-credential}'
           url: '{git-url}/{project}.git'
       - email:
           recipients: armband@enea.com
 
+- job-template:
+    name: 'iec-install-{usecase}-{deploy-type}-daily-{stream}'
+    concurrent: true
+    node: '{slave-label}'
+    properties:
+      - throttle:
+          enabled: true
+          max-total: 4
+          max-per-node: 1
+          option: 'project'
+      - build-blocker:
+          use-build-blocker: true
+          blocking-jobs:
+            - '.*-deploy-{deploy-type}-daily-*'
+            - '.*-install-{usecase}-{deploy-type}-daily-*'
+          blocking-level: 'NODE'
+
+    parameters:
+      - lf-infra-parameters:
+          project: '{project}'
+          stream: '{stream}'
+          branch: '{branch}'
+      - '{project}-defaults'
+      - '{usecase}-defaults'
+
+    wrappers:
+      - build-name:
+          name: '$BUILD_NUMBER - Usecase: ${usecase} DeployType: ${deploy-type}'
+
+    scm: *scm
+
+    builders:
+      - shell:
+          !include-raw-escape: ./iec-{usecase}.sh
+
+    publishers:
+      - email:
+          recipients: armband@enea.com
+
 ########################
 # trigger macros
 ########################
diff --git a/jjb/regional_controller/api-server-docker.yaml b/jjb/regional_controller/api-server-docker.yaml
new file mode 100644 (file)
index 0000000..db6e2f3
--- /dev/null
@@ -0,0 +1,34 @@
+---
+#
+# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+#
+# 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.
+#
+- project:
+    name: regional_controller-api-server-docker
+    project: 'regional_controller/api-server'
+    project-name: regional_controller-api-server
+    global-settings-file: global-settings
+    build-node: ubuntu1604-docker-8c-8g
+    stream: master
+    java-version: openjdk8
+    mvn-version: mvn35
+    mvn-opts: ''
+    mvn-params: ''
+    mvn-settings: regional_controller-settings
+    build-timeout: 60
+    submodule-recursive: true
+    branch: master
+    jobs:
+      - 'akraino-project-stream-docker'
+      - 'akraino-project-stream-stage-docker'
diff --git a/jjb/regional_controller/api-server.yaml b/jjb/regional_controller/api-server.yaml
new file mode 100644 (file)
index 0000000..f98aabc
--- /dev/null
@@ -0,0 +1,30 @@
+---
+#
+# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+#
+# 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.
+#
+- project:
+    name: regional_controller-api-server
+    project: 'regional_controller/api-server'
+    project-name: regional_controller-api-server
+    mvn-settings: regional_controller-settings
+    mvn-params: ''
+    nexus-iq-namespace: 'akraino-'
+    build-node: centos7-builder-2c-1g
+    stream: master
+    jobs:
+      - '{project-name}-maven-jobs'
+      - gerrit-maven-sonar
+    views:
+      - project-view