Merge changes Ia5832bd2,Ic4b0c1a8
* changes:
[VOL-2585] Final changes
BBSIM Log Level Error Fix
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index 6a32bd4..9754d0d 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -90,7 +90,7 @@
# matching repos that should be version tagged by the version-tag job
# (basically the same as imagebuilder projects + helm charts + tools
- version-tag-projects-regexp: '^(xos.*|.*helm-charts|automation-tools|cord-tester|chameleon|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric.*|globalxos|hippie-oss|hss_db|hypercache|internetemulator|kubernetes-service|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|.*-workflow-driver|ves-agent|voltha-bbsim|openolt|sadis-server|kafka-topic-exporter|pyvoltha||plyxproto|voltha-protos|alpine-grpc-base|cordctl|voltha-go|voltha-onos|device-management|cord-workflow.*|voltha-system-tests|openairinterface|omec-.*|bbsim|omci-sim|ponsim|pppoel2relay|voltha-api-server|aaa|config|dhcpl2relay|igmp|igmpproxy|kafka-onos|mcast|olt|sadis|vtn|voltha-.*-adapter|voltha-lib-go|voltha-python-base|voltha-docker-tools|mn-stratum-siab|ofagent.*|bng|voltctl|openolt-scale-tester)$'
+ version-tag-projects-regexp: '^(xos.*|.*helm-charts|automation-tools|cord-tester|chameleon|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric.*|globalxos|hippie-oss|hss_db|hypercache|internetemulator|kubernetes-service|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|.*-workflow-driver|ves-agent|voltha-bbsim|openolt|sadis-server|kafka-topic-exporter|pyvoltha||plyxproto|voltha-protos|alpine-grpc-base|cordctl|voltha-go|voltha-onos|device-management|cord-workflow.*|voltha-system-tests|openairinterface|omec-.*|bbsim|omci-sim|ponsim|pppoel2relay|voltha-api-server|aaa|config|dhcpl2relay|igmp|igmpproxy|kafka-onos|mcast|olt|sadis|vtn|voltha-.*-adapter.*|voltha-lib-go|voltha-python-base|voltha-docker-tools|mn-stratum-siab|ofagent.*|bng|voltctl|openolt-scale-tester|nem-ondemand-proxy|multifabric|openolt-test|omci-lib-go)$'
# List of all repos that contribute to the CORD guide
cord-guide-projects-regexp: '^(att-workflow-driver|cord-tester|cordctl|exampleservice|fabric|fabric-crossconnect|hippie-oss|kubernetes-service|olt-service|onos-service|openolt|openstack|rcord|simpleexampleservice|vrouter|vtn-service|xos|xos-gui|xos-tosca)$'
diff --git a/jjb/pipeline/voltha-bbsim-tests.groovy b/jjb/pipeline/voltha-bbsim-tests.groovy
index 0b77619..1076a7c 100644
--- a/jjb/pipeline/voltha-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha-bbsim-tests.groovy
@@ -84,14 +84,7 @@
stage('Build Images') {
steps {
sh """
- if [ "${gerritProject}" = "pyvoltha" ]; then
- cd $WORKSPACE/voltha/pyvoltha/
- make dist
- cd $WORKSPACE/voltha/voltha-openonu-adapter
- export LOCAL_PYVOLTHA=$WORKSPACE/voltha/pyvoltha/
- make local-pyvoltha
- make DOCKER_REPOSITORY=voltha/ DOCKER_TAG=citest docker-build
- elif ! [[ "${gerritProject}" =~ ^(voltha-helm-charts|voltha-system-tests)\$ ]]; then
+ if ! [[ "${gerritProject}" =~ ^(voltha-helm-charts|voltha-system-tests)\$ ]]; then
cd $WORKSPACE/voltha/${gerritProject}/
make DOCKER_REPOSITORY=voltha/ DOCKER_TAG=citest docker-build
fi
@@ -131,8 +124,6 @@
IMAGES="afrouter afrouterd "
elif [ "${gerritProject}" = "bbsim" ]; then
IMAGES="bbsim "
- elif [ "${gerritProject}" = "pyvoltha" ]; then
- IMAGES="adapter_open_onu "
else
echo "No images to push"
fi
@@ -225,10 +216,10 @@
}
}
}
- EOF
- sshpass -p karaf ssh -p 30115 karaf@${deployment_config.nodes[0].ip} "cfg set org.opencord.olt.impl.OltFlowService enableDhcpOnProvisioning true"
- sshpass -p karaf ssh -p 30115 karaf@${deployment_config.nodes[0].ip} "cfg set org.opencord.olt.impl.OltFlowService enableDhcpV4 true"
- sshpass -p karaf ssh -p 30115 karaf@${deployment_config.nodes[0].ip} "cfg set org.opencord.olt.impl.OltFlowService enableEapol true"
+EOF
+ sshpass -p karaf ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 "cfg set org.opencord.olt.impl.OltFlowService enableDhcpOnProvisioning true"
+ sshpass -p karaf ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 "cfg set org.opencord.olt.impl.OltFlowService enableDhcpV4 true"
+ sshpass -p karaf ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 "cfg set org.opencord.olt.impl.OltFlowService enableEapol true"
else
echo "Using kind-voltha defaults"
fi
diff --git a/jjb/pipeline/voltha-go-tests.groovy b/jjb/pipeline/voltha-go-tests.groovy
index e339fcc..6593a95 100644
--- a/jjb/pipeline/voltha-go-tests.groovy
+++ b/jjb/pipeline/voltha-go-tests.groovy
@@ -74,7 +74,6 @@
sh """
cd kind-voltha/
JUST_K8S=y ./voltha up
- kail -n voltha -n default > $WORKSPACE/onos-voltha-combined.log &
./voltha up
"""
}
@@ -86,6 +85,10 @@
set +e
mkdir -p $WORKSPACE/RobotLogs
git clone https://gerrit.opencord.org/voltha-system-tests
+
+ cd $WORKSPACE/kind-voltha/scripts
+ ./log-collector.sh > /dev/null &
+
make -C $WORKSPACE/voltha-system-tests ${makeTarget} || true
'''
}
@@ -102,30 +105,15 @@
kubectl get pods -o wide
kubectl get pods -n voltha -o wide
- sync
- pkill kail || true
+ sleep 15 # Wait for log-collector to complete
+ cd $WORKSPACE/kind-voltha/scripts
+ timeout 10 ./log-combine.sh
- ## Pull out errors from log files
- extract_errors_go() {
- echo
- echo "Error summary for $1:"
- grep $1 $WORKSPACE/onos-voltha-combined.log | grep '"level":"error"' | cut -d ' ' -f 2- | jq -r '.msg'
- echo
- }
+ cd $WORKSPACE
+ cp $WORKSPACE/kind-voltha/scripts/logger/combined/*.0001 $WORKSPACE
+ tar czf container-logs.tgz *.0001
- extract_errors_python() {
- echo
- echo "Error summary for $1:"
- grep $1 $WORKSPACE/onos-voltha-combined.log | grep 'ERROR' | cut -d ' ' -f 2-
- echo
- }
-
- extract_errors_go voltha-rw-core > $WORKSPACE/error-report.log
- extract_errors_go adapter-open-olt >> $WORKSPACE/error-report.log
- extract_errors_python adapter-open-onu >> $WORKSPACE/error-report.log
- extract_errors_python voltha-ofagent >> $WORKSPACE/error-report.log
-
- gzip $WORKSPACE/onos-voltha-combined.log
+ gzip *-combined.log || true
## shut down voltha
cd $WORKSPACE/kind-voltha/
@@ -140,7 +128,7 @@
passThreshold: 100,
reportFileName: 'RobotLogs/report*.html',
unstableThreshold: 0]);
- archiveArtifacts artifacts: '*.log,*.gz'
+ archiveArtifacts artifacts: '*.log,*.gz,*.tgz'
}
}
diff --git a/jjb/pipeline/voltha-physical-functional-tests.groovy b/jjb/pipeline/voltha-physical-functional-tests.groovy
index f4ca083..633fccb 100644
--- a/jjb/pipeline/voltha-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha-physical-functional-tests.groovy
@@ -59,6 +59,8 @@
git clone -b ${branch} ${cordRepoUrl}/cord-tester
mkdir -p $WORKSPACE/bin
bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
+ cd $WORKSPACE
+ git clone https://github.com/ciena/kind-voltha.git
"""
}
}
@@ -70,7 +72,9 @@
}
steps {
sh """
- kail -n voltha -n default --since=20m > $WORKSPACE/Functional_onos-voltha-combined.log &
+ cd $WORKSPACE/kind-voltha/scripts
+ ./log-collector.sh > /dev/null &
+
mkdir -p $ROBOT_LOGS_DIR
if ( ${released} ); then
export ROBOT_MISC_ARGS="--removekeywords wuks -i released -i sanity -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE"
@@ -78,8 +82,6 @@
export ROBOT_MISC_ARGS="--removekeywords wuks -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE"
fi
make -C $WORKSPACE/voltha/voltha-system-tests voltha-test || true
- sync
- pkill kail || true
"""
}
}
@@ -95,12 +97,9 @@
}
steps {
sh """
- kail -n voltha -n default > $WORKSPACE/FailureScenarios_onos-voltha-combined.log &
mkdir -p $ROBOT_LOGS_DIR
export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -i functional -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE"
make -C $WORKSPACE/voltha/voltha-system-tests voltha-test || true
- sync
- pkill kail || true
"""
}
}
@@ -116,12 +115,9 @@
}
steps {
sh """
- kail -n voltha -n default > $WORKSPACE/ErrorScenarios_onos-voltha-combined.log &
mkdir -p $ROBOT_LOGS_DIR
export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -i functional -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE"
make -C $WORKSPACE/voltha/voltha-system-tests voltha-test || true
- sync
- pkill kail || true
"""
}
}
@@ -134,31 +130,15 @@
kubectl get nodes -o wide
kubectl get pods -n voltha -o wide
- sync
- pkill kail || true
+ sleep 15 # Wait for log-collector to complete
+ cd $WORKSPACE/kind-voltha/scripts
+ timeout 10 ./log-combine.sh
- ## Pull out errors from log files
- extract_errors_go() {
- echo
- echo "Error summary for $1:"
- grep $1 $WORKSPACE/*onos-voltha-combined.log | grep '"level":"error"' | cut -d ' ' -f 2- | jq -r '.msg'
- echo
- }
+ cd $WORKSPACE
+ cp $WORKSPACE/kind-voltha/scripts/logger/combined/*.0001 $WORKSPACE
+ tar czf container-logs.tgz *.0001
- extract_errors_python() {
- echo
- echo "Error summary for $1:"
- grep $1 $WORKSPACE/*onos-voltha-combined.log | grep 'ERROR' | cut -d ' ' -f 2-
- echo
- }
-
- extract_errors_go voltha-rw-core > $WORKSPACE/error-report.log
- extract_errors_go adapter-open-olt >> $WORKSPACE/error-report.log
- extract_errors_python adapter-open-onu >> $WORKSPACE/error-report.log
- extract_errors_python voltha-ofagent >> $WORKSPACE/error-report.log
-
- gzip $WORKSPACE/*onos-voltha-combined.log
-
+ gzip *-combined.log || true
'''
script {
deployment_config.olts.each { olt ->
@@ -178,7 +158,7 @@
reportFileName: '**/report*.html',
unstableThreshold: 0
]);
- archiveArtifacts artifacts: '*.log,*.gz'
+ archiveArtifacts artifacts: '*.log,*.gz,*.tgz'
}
unstable {
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false])
diff --git a/jjb/verify/omci-lib-go.yaml b/jjb/verify/omci-lib-go.yaml
new file mode 100644
index 0000000..e37dca1
--- /dev/null
+++ b/jjb/verify/omci-lib-go.yaml
@@ -0,0 +1,17 @@
+---
+# verification jobs for 'omci-lib-go' repo
+
+- project:
+ name: omci-lib-go
+ project: '{name}'
+
+ jobs:
+ - 'verify-omci-lib-go-jobs':
+ branch-regexp: '{all-branches-regexp}'
+
+- job-group:
+ name: 'verify-omci-lib-go-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'tag-collision-reject'
+ - 'make-unit-test'
diff --git a/jjb/verify/openolt-test.yaml b/jjb/verify/openolt-test.yaml
new file mode 100644
index 0000000..6a7bfae
--- /dev/null
+++ b/jjb/verify/openolt-test.yaml
@@ -0,0 +1,30 @@
+---
+# verification jobs for 'openolt-test' repo
+
+- project:
+ name: openolt-test
+ project: '{name}'
+
+ jobs:
+ - 'verify-openolt-test-jobs':
+ branch-regexp: '{all-branches-regexp}'
+ - 'publish-openolt-test-jobs'
+
+- job-group:
+ name: 'verify-openolt-test-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'tag-collision-reject'
+ - 'make-unit-test':
+ build-node: 'ubuntu16.04-basebuild-2c-4g'
+ build-timeout: 60
+ unit-test-targets: 'lint docker-build'
+ junit-allow-empty-results: true
+
+- job-group:
+ name: 'publish-openolt-test-jobs'
+ jobs:
+ - 'docker-publish':
+ build-timeout: 60
+ docker-repo: 'opencord'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/voltha-openonu-adapter-go.yaml b/jjb/verify/voltha-openonu-adapter-go.yaml
new file mode 100644
index 0000000..d3e9cba
--- /dev/null
+++ b/jjb/verify/voltha-openonu-adapter-go.yaml
@@ -0,0 +1,30 @@
+---
+# verification jobs for 'voltha-openonu-adapter-go' repo
+
+- project:
+ name: voltha-openonu-adapter-go
+ project: '{name}'
+
+ jobs:
+ - 'verify-voltha-openonu-adapter-go-jobs':
+ branch-regexp: '{all-branches-regexp}'
+ - 'publish-voltha-openonu-adapter-go-jobs':
+ branch-regexp: '{all-branches-regexp}'
+
+- job-group:
+ name: 'verify-voltha-openonu-adapter-go-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'tag-collision-reject'
+ - 'make-unit-test'
+# Add this job later when working with kind-voltha and bbsim
+# - 'voltha-patch-test':
+# pipeline-script: 'voltha-bbsim-tests.groovy'
+
+- job-group:
+ name: 'publish-voltha-openonu-adapter-go-jobs'
+ jobs:
+ - 'docker-publish':
+ build-timeout: 30
+ docker-repo: 'voltha'
+ dependency-jobs: 'version-tag'