Merge "Automation adds integration-usecases-mdons.yaml"
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Thu, 2 Apr 2020 14:08:35 +0000 (14:08 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 2 Apr 2020 14:08:35 +0000 (14:08 +0000)
jjb/integration/emssimulator-swm-netconf_post.sh [new file with mode: 0644]
jjb/integration/integration-docker-compose.yaml
jjb/integration/integration-templates-docker.yaml
jjb/integration/simulators/integration-dc-simulator.yaml [new file with mode: 0644]
jjb/integration/simulators/integration-pnf-simulator.yaml [new file with mode: 0644]
jjb/portal-sdk/portal-sdk.yaml
jjb/portal/portal-docker.yaml
jjb/portal/portal.yaml
jjb/vnfsdk/vnfsdk-refrepo.yaml
jjb/vvp/pre-build-csv.sh

diff --git a/jjb/integration/emssimulator-swm-netconf_post.sh b/jjb/integration/emssimulator-swm-netconf_post.sh
new file mode 100644 (file)
index 0000000..b69d3c0
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# Copyright 2020 Samsung Electronics Co., Ltd.
+#
+# 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.
+
+echo "---> emssimulator-swm-netconf_post.sh"
+
+set -e # Exit with zero only if all commands succeed
+
+SERVICE_NAME="ems-netconf-swm"
+DOCKER_COMPOSE_LOG="/tmp/docker-compose.log"
+DOCKER_COMPOSE_LOG_MSG=( "INFO success:" "entered RUNNING state" )
+DOCKER_COMPOSE_SLEEP_INTERVAL=4
+
+pushd $DOCKER_ROOT
+
+# Dump container logs
+sleep ${DOCKER_COMPOSE_SLEEP_INTERVAL} # Hang for a while so the services settle
+docker-compose logs --no-color > ${DOCKER_COMPOSE_LOG}
+
+# Get the supervisord services running within container
+supervisord_services=($(docker-compose exec -T ${SERVICE_NAME} /bin/sh -c \
+    'cat /etc/supervisord.conf /etc/supervisord.d/*' | grep -ho "program:[-a-zA-Z0-9]*" | cut -d: -f 2))
+
+# Check all services are running and fail if not
+for service in ${supervisord_services[@]};
+do
+    if ! grep -q "${DOCKER_COMPOSE_LOG_MSG[0]} $service ${DOCKER_COMPOSE_LOG_MSG[1]}" ${DOCKER_COMPOSE_LOG};
+    then
+        echo "ERROR: Service $service is not running, failing the build."
+        exit 1
+    fi
+done
index 540ee4f..ae840f6 100644 (file)
@@ -16,3 +16,7 @@
       - 'netconf-pnp-simulator':
           pattern: 'test/mocks/netconf-pnp-simulator/modules/**'
           docker_root: 'test/mocks/netconf-pnp-simulator/modules'
+      - 'emssimulator-swm-netconf':
+          pattern: 'test/mocks/emssimulator/swm-netconf/**'
+          docker_root: 'test/mocks/emssimulator/swm-netconf'
+          post_script: !include-raw-escape: emssimulator-swm-netconf_post.sh
index caa0ad7..0ef7a52 100644 (file)
     description: 'This job validates Docker Compose based projects'
     node: 'ubuntu1804-docker-8c-8g'
     docker_root: '$WORKSPACE'
+    post_script: ''
 
     parameters:
       - lf-infra-parameters:
           properties-content: |
             DOCKER_ROOT={docker_root}
       - shell: '{script}'
+      - shell: '{post_script}'
 
     publishers:
       - integration-docker-compose-logs
diff --git a/jjb/integration/simulators/integration-dc-simulator.yaml b/jjb/integration/simulators/integration-dc-simulator.yaml
new file mode 100644 (file)
index 0000000..7d807dc
--- /dev/null
@@ -0,0 +1,33 @@
+---
+- project:
+    name: integration-simulators-dc-simulator-info
+    project-name: integration-simulators-dc-simulator
+    jobs:
+      - gerrit-info-yaml-verify
+    build-node: centos7-builder-2c-1g
+    project: integration/simulators/dc-simulator
+    branch: master
+
+- project:
+    name: integration-simulators-dc-simulator-linters
+    project: integration/simulators/dc-simulator
+    project-name: integration-simulators-dc-simulator
+    python-version: python3
+    jobs:
+      - '{project-name}-{stream}-{subproject}-lint'
+    subproject:
+      - 'yaml':
+          tox-dir: '.'
+          tox-envs: 'yaml'
+          pattern: '**/*.yaml'
+      - 'yml':
+          tox-dir: '.'
+          tox-envs: 'yaml'
+          pattern: '**/*.yml'
+      - 'json':
+          tox-dir: '.'
+          tox-envs: 'json'
+          pattern: '**/*.json'
+    stream:
+      - 'master':
+          branch: 'master'
diff --git a/jjb/integration/simulators/integration-pnf-simulator.yaml b/jjb/integration/simulators/integration-pnf-simulator.yaml
new file mode 100644 (file)
index 0000000..3e7c0f8
--- /dev/null
@@ -0,0 +1,34 @@
+---
+- project:
+    name: integration-simulators-pnf-simulator-info
+    project-name: integration-simulators-pnf-simulator
+    jobs:
+      - gerrit-info-yaml-verify
+    build-node: centos7-builder-2c-1g
+    project: integration/simulators/pnf-simulator
+    branch: master
+
+- project:
+    name: integration-simulators-pnf-simulator-linters
+    project: integration/simulators/pnf-simulator
+    project-name: integration-simulators-pnf-simulator
+    python-version: python3
+    jobs:
+      - '{project-name}-{stream}-{subproject}-lint'
+    subproject:
+      - 'yaml':
+          tox-dir: '.'
+          tox-envs: 'yaml'
+          pattern: '**/*.yaml'
+      - 'yml':
+          tox-dir: '.'
+          tox-envs: 'yaml'
+          pattern: '**/*.yml'
+      - 'json':
+          tox-dir: '.'
+          tox-envs: 'json'
+          pattern: '**/*.json'
+    stream:
+      - 'master':
+          branch: 'master'
+
index d6e1da8..dca6674 100644 (file)
@@ -24,8 +24,8 @@
     stream:
       - 'master':
           branch: 'master'
-      - 'release-2.6.0':
-          branch: 'release-2.6.0'
+      - 'release-3.2.0':
+          branch: 'release-3.2.0'
     mvn-settings: 'portal-sdk-settings'
     files: '**'
     archive-artifacts: ''
index 6f896ad..04a6374 100644 (file)
@@ -17,6 +17,8 @@
     stream:
       - 'master':
           branch: 'master'
+      - 'release-3.2.0':
+          branch: 'release-3.2.0'
     mvn-settings: 'portal-settings'
     files: '**'
     archive-artifacts: ''
index e50d6cc..325d79a 100644 (file)
@@ -21,6 +21,8 @@
     stream:
       - 'master':
           branch: 'master'
+      - 'release-3.2.0':
+          branch: 'release-3.2.0'
     mvn-settings: 'portal-settings'
     files: '**'
     archive-artifacts: ''
index 65f24c2..addc36e 100644 (file)
@@ -13,7 +13,7 @@
           sign-artifacts: true
           build-node: centos7-docker-8c-8g
           maven-versions-plugin: true
-          mvn-params: '-Dskip.docker.build=false -Dskip.docker.push=false -Dskip.docker.tag=false -Ddocker.push.registry=nexus3.onap.org:10003'
+          mvn-goals: 'clean package -Pdocker -DpushImageTag'
           container-public-registry: 'nexus3.onap.org:10001'
           container-staging-registry: 'nexus3.onap.org:10003'
       - '{project-name}-gerrit-release-jobs':
index ef6fedc..f17b3db 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-virtualenv -p python3.6 $WORKSPACE/venv-tox
+python3 -m venv $WORKSPACE/venv-tox
 source $WORKSPACE/venv-tox/bin/activate
 pip3 install --upgrade pip
 pip3 install --no-use-pep517 -r requirements.txt