Removing unused pipelines and job templates
Change-Id: I24ceaa50083c0c0b3e808aa743c9125e9d81ee94
diff --git a/jjb/device-management.yaml b/jjb/device-management.yaml
index 1c6d46f..08e62b5 100644
--- a/jjb/device-management.yaml
+++ b/jjb/device-management.yaml
@@ -1,22 +1,6 @@
---
# device-management tests
-- project:
- name: device-management-e2e
-
- project-name: '{name}'
-
- jobs:
- # Per-patchset Pod builds on Tucson pod
- - 'verify_physical_device-management_patchset_manual':
- name: 'verify_physical_device-management_patchset_manual'
- testvm: 'tucson-pod'
- config-pod: 'tucson-pod'
- branch: 'master'
- oltDebVersion: 'openolt_asfvolt16-3.3.3-1a5d68b50d8bcc5ba6cb1630d3294c30c37cd2f5-40G-NNI.deb'
- profile: 'Default'
- time-trigger: "@daily"
-
- job-template:
id: 'device-management-patch-test'
name: 'verify_{project}_sanity-test{name-extension}'
@@ -64,7 +48,7 @@
- string:
name: extraHelmFlags
default: '{extra-helm-flags}'
- description: 'Helm flags to pass to ./voltha up'
+ description: 'Helm flags to pass to every helm install command'
- string:
name: volthaSystemTestsChange
@@ -108,144 +92,3 @@
failed: '{skip-vote}'
unstable: '{skip-vote}'
notbuilt: '{skip-vote}'
-
-# POD Per Patchset Pipeline Jobs
-
-- job-template:
- name: '{name}'
- id: verify_physical_device-management_patchset_manual
- description: |
- <!-- Managed by Jenkins Job Builder -->
- Automated build on POD {config-pod} using {pipeline-script} <br /><br />
- Created from job-template {id} from ci-management/jjb/device-management.yaml <br />
- Created by Andy Bavier, andy@opennetworking.org <br />
- Copyright (c) 2019 Open Networking Foundation (ONF)
- sandbox: true
- pipeline-script: 'device-management-physical-build-and-tests.groovy'
-
- properties:
- - cord-infra-properties:
- build-days-to-keep: '{build-days-to-keep}'
- artifact-num-to-keep: '{artifact-num-to-keep}'
-
- parameters:
- - string:
- name: buildNode
- default: '{testvm}'
- description: 'Pod management node'
-
- - string:
- name: manifestUrl
- default: '{gerrit-server-url}/{voltha-test-manifest-repo}'
- description: 'URL to the repo manifest'
-
- - string:
- name: manifestBranch
- default: master
- description: 'Name of the repo branch to use'
-
- - string:
- name: gerritProject
- default: 'device-management'
- description: 'Name of the Gerrit project'
-
- - string:
- name: gerritRefSpec
- default: '$GERRIT_REFSPEC'
- description: 'Refspec for the Gerrit patchset'
-
- - string:
- name: gerritEventCommentText
- default: '$GERRIT_EVENT_COMMENT_TEXT'
- description: 'Comment text from gerrit commit'
-
- - string:
- name: cordRepoUrl
- default: '{gerrit-server-url}'
- description: 'The URL of the CORD Project repository'
-
- - string:
- name: podName
- default: '{config-pod}'
-
- - string:
- name: deploymentConfigFile
- default: 'pod-configs/deployment-configs/{config-pod}.yaml'
- description: 'Path of deployment config file'
-
- - string:
- name: kindVolthaValuesFile
- default: 'pod-configs/kubernetes-configs/voltha/{config-pod}.yml'
- description: 'Path of kind-voltha values override file'
-
- - string:
- name: sadisConfigFile
- default: 'voltha/voltha-system-tests/tests/data/{config-pod}-sadis.json'
- description: 'Path of SADIS config to load'
-
- - string:
- name: localConfigDir
- default: null
- description: 'If specified, config file paths are relative to this dir; otherwise $WORKSPACE'
-
- - string:
- name: configRepo
- default: 'pod-configs'
- description: 'A repository containing the config files, will be checked out if specified'
-
- - string:
- name: oltDebVersion
- default: '{oltDebVersion}'
- description: 'OLT Software version to install'
-
- - string:
- name: branch
- default: '{branch}'
-
- - string:
- name: profile
- default: '{profile}'
- description: 'Technology Profile pushed to the ETCD'
-
- - string:
- name: notificationEmail
- default: 'andy@opennetworking.org'
- description: ''
-
- - bool:
- name: reinstallOlt
- default: true
- description: "Re-install OLT software"
-
- - string:
- name: extraRobotArgs
- default: '-i sanity'
- description: 'Arguments to pass to robot'
-
- project-type: pipeline
- concurrent: true
-
- dsl: !include-raw-escape: pipeline/{pipeline-script}
-
- triggers:
- - gerrit:
- server-name: '{gerrit-server-name}'
- dependency-jobs: '{dependency-jobs}'
- silent-start: false
- successful-message: "PASSED hardware test"
- failure-message: "FAILED hardware test"
- unstable-message: "UNSTABLE hardware test"
- trigger-on:
- - comment-added-contains-event:
- comment-contains-value: '^hardware test$'
- - comment-added-contains-event:
- comment-contains-value: '^hardware test with delay$'
- projects:
- - project-compare-type: REG_EXP
- project-pattern: '^device-management$'
- branches:
- - branch-compare-type: PLAIN
- branch-pattern: 'master'
- - timed: |
- TZ=America/Los_Angeles
- {time-trigger}
diff --git a/jjb/pipeline/device-management-physical-build-and-tests.groovy b/jjb/pipeline/device-management-physical-build-and-tests.groovy
deleted file mode 100644
index 6579cc4..0000000
--- a/jjb/pipeline/device-management-physical-build-and-tests.groovy
+++ /dev/null
@@ -1,373 +0,0 @@
-// Copyright 2019-present Open Networking Foundation
-//
-// 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.
-
-// deploy VOLTHA built from patchset on a physical pod and run e2e test
-// uses kind-voltha to deploy voltha-2.X
-
-// Need this so that deployment_config has global scope when it's read later
-deployment_config = null
-localDeploymentConfigFile = null
-localKindVolthaValuesFile = null
-localSadisConfigFile = null
-
-pipeline {
-
- /* no label, executor is determined by JJB */
- agent {
- label "${params.buildNode}"
- }
- options {
- timeout(time: 90, unit: 'MINUTES')
- }
-
- environment {
- KUBECONFIG="$HOME/.kube/kind-config-voltha-minimal"
- VOLTCONFIG="$HOME/.volt/config-minimal"
- PATH="$WORKSPACE/voltha/kind-voltha/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- NAME="minimal"
- FANCY=0
- //VOL-2194 ONOS SSH and REST ports hardcoded to 30115/30120 in tests
- ONOS_SSH_PORT=30115
- ONOS_API_PORT=30120
- }
-
- stages {
- stage ('Initialize') {
- steps {
- sh returnStdout: false, script: """
- test -e $WORKSPACE/voltha/kind-voltha/voltha && cd $WORKSPACE/voltha/kind-voltha && ./voltha down
- cd $WORKSPACE
- rm -rf $WORKSPACE/*
- """
- script {
- if (env.configRepo && ! env.localConfigDir) {
- env.localConfigDir = "$WORKSPACE"
- sh returnStdout: false, script: "git clone -b master ${cordRepoUrl}/${configRepo}"
- }
- localDeploymentConfigFile = "${env.localConfigDir}/${params.deploymentConfigFile}"
- localKindVolthaValuesFile = "${env.localConfigDir}/${params.kindVolthaValuesFile}"
- localSadisConfigFile = "${env.localConfigDir}/${params.sadisConfigFile}"
- }
- }
- }
-
- stage('Repo') {
- steps {
- checkout(changelog: true,
- poll: false,
- scm: [$class: 'RepoScm',
- manifestRepositoryUrl: "${params.manifestUrl}",
- manifestBranch: "${params.manifestBranch}",
- currentBranch: true,
- destinationDir: 'voltha',
- forceSync: true,
- resetFirst: true,
- quiet: true,
- jobs: 4,
- showAllChanges: true]
- )
- }
- }
-
- stage('Patch') {
- steps {
- sh """
- pushd $WORKSPACE/
- git clone https://gerrit.opencord.org/${gerritProject}
- cd "${gerritProject}"
- if [[ ! -z "${gerritRefSpec}" ]]; then
- git fetch https://gerrit.opencord.org/${gerritProject} "${gerritRefSpec}" && git checkout FETCH_HEAD
- fi
- popd
- """
- }
- }
-
- stage('Check config files') {
- steps {
- script {
- try {
- deployment_config = readYaml file: "${localDeploymentConfigFile}"
- } catch (err) {
- echo "Error reading ${localDeploymentConfigFile}"
- throw err
- }
- sh returnStdout: false, script: """
- if [ ! -e ${localKindVolthaValuesFile} ]; then echo "${localKindVolthaValuesFile} not found"; exit 1; fi
- if [ ! -e ${localSadisConfigFile} ]; then echo "${localSadisConfigFile} not found"; exit 1; fi
- """
- }
- }
- }
-
- stage('Build olt addr list') {
- steps {
- script {
- sh """
- echo "ADDR_LIST:" > /tmp/robot_vars.yaml
- """
- deployment_config.olts.each { olt ->
- sh """
- echo " - ${olt.ip}:8888" >> /tmp/robot_vars.yaml
- """
- }
- sh """
- cat /tmp/robot_vars.yaml
- """
- }
- }
- }
-
- stage('Create KinD Cluster') {
- steps {
- sh returnStdout: false, script: """
- cd $WORKSPACE/voltha/kind-voltha/
- JUST_K8S=y ./voltha up
- """
- }
- }
-
- stage('Build Redfish Importer Image') {
- steps {
- sh """
- make -C $WORKSPACE/device-management/\$1 DOCKER_REPOSITORY=opencord/ DOCKER_TAG=citest docker-build-importer
- """
- }
- }
-
- stage('Build demo_test Image') {
- steps {
- sh """
- make -C $WORKSPACE/device-management/\$1/demo_test DOCKER_REPOSITORY=opencord/ DOCKER_TAG=citest docker-build
- """
- }
- }
-
- stage('Build mock-redfish-server Image') {
- steps {
- sh """
- make -C $WORKSPACE/device-management/\$1/mock-redfish-server DOCKER_REPOSITORY=opencord/ DOCKER_TAG=citest docker-build
- """
- }
- }
-
- stage('Push Images') {
- steps {
- sh '''
- docker images | grep citest
- for image in \$(docker images -f "reference=*/*citest" --format "{{.Repository}}"); do echo "Pushing \$image to nodes"; kind load docker-image \$image:citest --name voltha-\$NAME --nodes voltha-\$NAME-worker,voltha-\$NAME-worker2; done
- '''
- }
- }
-
- stage('Deploy Voltha') {
- environment {
- WITH_SIM_ADAPTERS="no"
- WITH_RADIUS="yes"
- DEPLOY_K8S="no"
- VOLTHA_LOG_LEVEL="DEBUG"
- }
- steps {
- script {
- sh returnStdout: false, script: """
- export EXTRA_HELM_FLAGS='--set log_agent.enabled=False -f ${localKindVolthaValuesFile} '
-
- cd $WORKSPACE/voltha/kind-voltha/
- echo \$EXTRA_HELM_FLAGS
- kail -n voltha -n default > $WORKSPACE/onos-voltha-combined.log &
- ./voltha up
- """
- }
- }
- }
-
- stage('Deploy Kafka Dump Chart') {
- steps {
- script {
- sh returnStdout: false, script: """
- helm repo add cord https://charts.opencord.org
- helm repo update
- helm del --purge voltha-kafka-dump || true
- helm install -n voltha-kafka-dump cord/voltha-kafka-dump
- """
- }
- }
- }
-
- stage('Push Tech-Profile') {
- when {
- expression { params.profile != "Default" }
- }
- steps {
- sh returnStdout: false, script: """
- etcd_container=\$(kubectl get pods -n voltha | grep voltha-etcd-cluster | awk 'NR==1{print \$1}')
- kubectl cp $WORKSPACE/voltha/voltha-system-tests/tests/data/TechProfile-${profile}.json voltha/\$etcd_container:/tmp/flexpod.json
- kubectl exec -it \$etcd_container -n voltha -- /bin/sh -c 'cat /tmp/flexpod.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/XGS-PON/64'
- """
- }
- }
-
- stage('Push Sadis-config') {
- steps {
- sh returnStdout: false, script: """
- curl -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:$ONOS_API_PORT/onos/v1/network/configuration --data @${localSadisConfigFile}
- """
- }
- }
-
- stage('Reinstall OLT software') {
- when {
- expression { params.reinstallOlt }
- }
- steps {
- script {
- deployment_config.olts.each { olt ->
- sh returnStdout: false, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service openolt stop' || true"
- sh returnStdout: false, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'killall dev_mgmt_daemon' || true"
- sh returnStdout: false, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'dpkg --remove asfvolt16 && dpkg --purge asfvolt16'"
- waitUntil {
- olt_sw_present = sh returnStdout: true, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'dpkg --list | grep asfvolt16 | wc -l'"
- return olt_sw_present.toInteger() == 0
- }
- sh returnStdout: false, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'dpkg --install ${oltDebVersion}'"
- waitUntil {
- olt_sw_present = sh returnStdout: true, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'dpkg --list | grep asfvolt16 | wc -l'"
- return olt_sw_present.toInteger() == 1
- }
- if ( olt.fortygig ) {
- // If the OLT is connected to a 40G switch interface, set the NNI port to be downgraded
- sh returnStdout: false, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'echo port ce128 sp=40000 >> /broadcom/qax.soc ; /opt/bcm68620/svk_init.sh'"
- }
- }
- }
- }
- }
-
- stage('Restart OLT processes') {
- steps {
- script {
- deployment_config.olts.each { olt ->
- sh returnStdout: false, script: """
- ssh-keyscan -H ${olt.ip} >> ~/.ssh/known_hosts
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service openolt stop' || true
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'killall dev_mgmt_daemon' || true
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'rm -f /var/log/openolt.log'
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'rm -f /var/log/dev_mgmt_daemon.log'
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service dev_mgmt_daemon start &'
- sleep 5
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service openolt start &'
- # restart redfish server
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service psme stop' || true
- sleep 10
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service psme start'
- sleep 10
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'ps auxw | grep -i psme'
- """
- // Note: ONU Discovery wait loop removed as it was not necessary
- }
- }
- }
- }
-
- stage('Run E2E Tests') {
- steps {
- sh '''
- mkdir -p $WORKSPACE/RobotLogs
- # tell the kubernetes script to use images tagged citest and pullPolicy:Never
- sed -i 's/master/citest/g' $WORKSPACE/device-management/kubernetes/deploy*.yaml
- sed -i 's/imagePullPolicy: Always/imagePullPolicy: Never/g' $WORKSPACE/device-management/kubernetes/deploy*.yaml
- # passing a list to robot framework on the command line is hard, so put the vars in a file
- make -C $WORKSPACE/device-management ROBOT_EXTRA_ARGS="-V /tmp/robot_vars.yaml" functional-physical-test-single || true
- '''
- }
- }
-
- stage('After-Test Delay') {
- when {
- expression { params.withPatchset }
- }
- steps {
- sh returnStdout: false, script: """
- # Note: Gerrit comment text will be prefixed by "Patch set n:" and a blank line
- REGEX="hardware test with delay\$"
- [[ "${gerritEventCommentText}" =~ \$REGEX ]] && sleep 10m || true
- """
- }
- }
- }
-
- post {
- always {
- sh returnStdout: false, script: '''
- set +e
- cp kind-voltha/install-minimal.log $WORKSPACE/
- kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\t'}{.imageID}{'\\n'}" | sort | uniq -c
- kubectl get nodes -o wide
- kubectl get pods -o wide
- kubectl get pods -n voltha -o wide
-
- sync
- pkill kail || true
-
- ## 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
- }
-
- 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
-
- ## collect events, the chart should be running by now
- kubectl get pods | grep -i voltha-kafka-dump | grep -i running
- if [[ $? == 0 ]]; then
- kubectl exec -it `kubectl get pods | grep -i voltha-kafka-dump | grep -i running | cut -f1 -d " "` ./voltha-dump-events.sh > $WORKSPACE/voltha-events.log
- fi
- '''
- script {
- deployment_config.olts.each { olt ->
- sh returnStdout: false, script: """
- sshpass -p ${olt.pass} scp ${olt.user}@${olt.ip}:/var/log/openolt.log $WORKSPACE/openolt-${olt.ip}.log || true
- sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/openolt-${olt.ip}.log # Remove escape sequences
- sshpass -p ${olt.pass} scp ${olt.user}@${olt.ip}:/var/log/dev_mgmt_daemon.log $WORKSPACE/dev_mgmt_daemon-${olt.ip}.log || true
- sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/dev_mgmt_daemon-${olt.ip}.log # Remove escape sequences
- """
- }
- }
- step([$class: 'RobotPublisher',
- disableArchiveOutput: false,
- logFileName: 'device-management/demo_test/functional_test/log*.html',
- otherFiles: '',
- outputFileName: 'device-management/demo_test/functional_test/output*.xml',
- outputPath: '.',
- passThreshold: 100,
- reportFileName: 'device-management/demo_test/functional_test/report*.html',
- unstableThreshold: 0]);
- archiveArtifacts artifacts: '*.log,*.gz'
- }
- }
-}
diff --git a/jjb/pipeline/voltha-atest-provisioning.groovy b/jjb/pipeline/voltha-atest-provisioning.groovy
deleted file mode 100755
index 297c27d..0000000
--- a/jjb/pipeline/voltha-atest-provisioning.groovy
+++ /dev/null
@@ -1,106 +0,0 @@
-/* voltha-atest-provisioning pipeline */
-
-pipeline {
-
- /* no label, executor is determined by JJB */
- agent {
- label "${params.buildNode}"
- }
-
- stages {
-
- stage ('Clean up') {
- steps {
- sh '''
- sudo rm -rf *
- sudo rm -rf /home/cord/cord*
- '''
- }
- }
-
- stage('Voltha Repo') {
- steps {
- checkout(changelog: false, \
- poll: false,
- scm: [$class: 'RepoScm', \
- manifestRepositoryUrl: "${params.manifestUrl}", \
- manifestBranch: "${params.manifestBranch}", \
- currentBranch: true, \
- destinationDir: 'cord', \
- forceSync: true,
- resetFirst: true, \
- quiet: true, \
- jobs: 4, \
- showAllChanges: true] \
- )
- }
- }
-
- stage ('Build Voltha and ONOS') {
- when { expression { return params.BuildVoltha } }
- steps {
- sh '''
- sudo service docker restart
- cd $WORKSPACE/cord/incubator/voltha
- repo download "${GERRIT_PROJECT}" "${gerritChangeNumber}/${gerritPatchsetNumber}"
- chmod +x env.sh
- source env.sh
- make fetch
- make clean
- make build
- '''
- }
- }
-
- stage ('Build BBSIM') {
- when { expression { return params.BuildBbsim } }
- steps {
- sh '''
- sudo service docker restart
- cd $WORKSPACE/cord/incubator/voltha-bbsim
- repo download "${GERRIT_PROJECT}" "${gerritChangeNumber}/${gerritPatchsetNumber}"
- make DOCKER_TAG=latest docker-build
- docker images | grep bbsim
- '''
- }
- }
-
- stage ('Start Voltha Test Suite') {
- steps {
- sh """
- cd $WORKSPACE/cord/incubator/voltha/tests/atests/common/
- ./run_robot.sh jenkinstest ${params.adapter} || true
- """
- }
- }
-
- stage('Publish') {
- steps {
- sh """
- if [ -d RobotLogs ]; then rm -r RobotLogs; fi; mkdir RobotLogs
- cp -r $WORKSPACE/cord/incubator/voltha/jenkinstest/ ./RobotLogs
- cp -r $WORKSPACE/cord/incubator/voltha/jenkinstest/voltha_test_results/*.log $WORKSPACE/
- """
-
- step([$class: 'RobotPublisher',
- disableArchiveOutput: false,
- logFileName: 'RobotLogs/jenkinstest/log*.html',
- otherFiles: '',
- outputFileName: 'RobotLogs/jenkinstest/output*.xml',
- outputPath: '.',
- passThreshold: 100,
- reportFileName: 'RobotLogs/jenkinstest/report*.html',
- unstableThreshold: 0]);
- }
- }
- }
-
- post {
- always {
- archiveArtifacts artifacts: '*.log'
- step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "gdepatie@northforgeinc.com, kailash@opennetworking.org", sendToIndividuals: false])
- }
- }
-}
-
-
diff --git a/jjb/pipeline/voltha-automated-build.groovy b/jjb/pipeline/voltha-automated-build.groovy
deleted file mode 100644
index 3b2ac05..0000000
--- a/jjb/pipeline/voltha-automated-build.groovy
+++ /dev/null
@@ -1,68 +0,0 @@
-/* voltha-automated-build pipeline */
-
-pipeline {
-
- /* no label, executor is determined by JJB */
- agent {
- label "${params.buildNode}"
- }
-
- stages {
-
- stage ('Cleanup workspace') {
- steps {
- sh 'rm -rf ./build ./component ./incubator ./onos-apps ./orchestration ./test ./.repo'
- }
- }
-
- stage('repo') {
- steps {
- checkout(changelog: false, \
- poll: false,
- scm: [$class: 'RepoScm', \
- manifestRepositoryUrl: "${params.manifestUrl}", \
- manifestBranch: "${params.manifestBranch}", \
- currentBranch: true, \
- destinationDir: 'cord', \
- forceSync: true,
- resetFirst: true, \
- quiet: true, \
- jobs: 4, \
- showAllChanges: true] \
- )
- }
- }
-
-
- stage ('Bring up voltha dev vm') {
- steps {
- sh '''
- pushd incubator/voltha
- vagrant up voltha
- popd
- '''
- }
- }
- stage ('Remove the pre-created venv-linux') {
- steps {
- sh 'vagrant ssh -c "rm -rf /cord/incubator/voltha/venv-linux"'
- }
- }
-
- stage ('Build voltha') {
- steps {
- sh 'vagrant ssh -c "cd /cord/incubator/voltha && source env.sh && make fetch-jenkins && make jenkins" voltha' }
- }
-
- stage ('Bring up voltha containers') {
- steps {
- sh 'vagrant ssh -c "cd /cord/incubator/voltha && source env.sh && docker-compose -f compose/docker-compose-docutests.yml up -d" voltha' }
- }
-
- stage ('Run Integration Tests') {
- steps {
- sh 'vagrant ssh -c "cd /cord/incubator/voltha && source env.sh && make jenkins-test" voltha' }
- }
-
- }
-}
diff --git a/jjb/pipeline/voltha-dt-physical-functional-tests-openonu-go.groovy b/jjb/pipeline/voltha-dt-physical-functional-tests-openonu-go.groovy
deleted file mode 100644
index f60bd3f..0000000
--- a/jjb/pipeline/voltha-dt-physical-functional-tests-openonu-go.groovy
+++ /dev/null
@@ -1,261 +0,0 @@
-// Copyright 2017-present Open Networking Foundation
-//
-// 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.
-
-node {
- // Need this so that deployment_config has global scope when it's read later
- deployment_config = null
-}
-
-pipeline {
- /* no label, executor is determined by JJB */
- agent {
- label "${params.buildNode}"
- }
- options {
- timeout(time: 60, unit: 'MINUTES')
- }
-
- environment {
- KUBECONFIG="$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf"
- VOLTCONFIG="$HOME/.volt/config-minimal"
- PATH="$WORKSPACE/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- }
-
- stages {
- stage('Clone kind-voltha') {
- steps {
- step([$class: 'WsCleanup'])
- checkout([
- $class: 'GitSCM',
- userRemoteConfigs: [[
- url: "https://gerrit.opencord.org/kind-voltha",
- refspec: "${kindVolthaChange}"
- ]],
- branches: [[ name: "master", ]],
- extensions: [
- [$class: 'WipeWorkspace'],
- [$class: 'RelativeTargetDirectory', relativeTargetDir: "kind-voltha"],
- [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
- ],
- ])
- }
- }
- stage('Clone voltha-system-tests') {
- steps {
- checkout([
- $class: 'GitSCM',
- userRemoteConfigs: [[
- url: "https://gerrit.opencord.org/voltha-system-tests",
- refspec: "${volthaSystemTestsChange}"
- ]],
- branches: [[ name: "${branch}", ]],
- extensions: [
- [$class: 'WipeWorkspace'],
- [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"],
- [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
- ],
- ])
- }
- }
- stage('Clone cord-tester') {
- steps {
- checkout([
- $class: 'GitSCM',
- userRemoteConfigs: [[
- url: "https://gerrit.opencord.org/cord-tester",
- refspec: "${cordTesterChange}"
- ]],
- branches: [[ name: "master", ]],
- extensions: [
- [$class: 'WipeWorkspace'],
- [$class: 'RelativeTargetDirectory', relativeTargetDir: "cord-tester"],
- [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
- ],
- ])
- }
- }
- // This checkout allows us to show changes in Jenkins
- // we only do this on master as we don't branch all the repos for all the releases
- // (we should compute the difference by tracking the container version, not the code)
- stage('Download All the VOLTHA repos') {
- when {
- expression {
- return "${branch}" == 'master';
- }
- }
- steps {
- checkout(changelog: true,
- poll: false,
- scm: [$class: 'RepoScm',
- manifestRepositoryUrl: "${params.manifestUrl}",
- manifestBranch: "${params.branch}",
- currentBranch: true,
- destinationDir: 'voltha',
- forceSync: true,
- resetFirst: true,
- quiet: true,
- jobs: 4,
- showAllChanges: true]
- )
- }
- }
- stage ('Initialize') {
- steps {
- sh returnStdout: false, script: "git clone -b master ${cordRepoUrl}/${configBaseDir}"
- script {
- deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
- }
- sh returnStdout: false, script: """
- mkdir -p $WORKSPACE/bin
- bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
- cd $WORKSPACE
- if [ "${params.branch}" != "master" ]; then
- cd $WORKSPACE/kind-voltha
- source releases/${params.branch}
- else
- VOLTCTL_VERSION=\$(curl -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')
- fi
-
- HOSTOS=\$(uname -s | tr "[:upper:]" "[:lower:"])
- HOSTARCH=\$(uname -m | tr "[:upper:]" "[:lower:"])
- if [ \$HOSTARCH == "x86_64" ]; then
- HOSTARCH="amd64"
- fi
- curl -o $WORKSPACE/bin/voltctl -sSL https://github.com/opencord/voltctl/releases/download/v\${VOLTCTL_VERSION}/voltctl-\${VOLTCTL_VERSION}-\${HOSTOS}-\${HOSTARCH}
- chmod 755 $WORKSPACE/bin/voltctl
- voltctl version --clientonly
-
-
- # Default kind-voltha config doesn't work on ONF demo pod for accessing kvstore.
- # The issue is that the mgmt node is also one of the k8s nodes and so port forwarding doesn't work.
- # We should change this. In the meantime here is a workaround.
- if [ "${params.branch}" == "master" ]; then
- set +e
-
-
- # Remove noise from voltha-core logs
- voltctl log level set WARN read-write-core#github.com/opencord/voltha-go/db/model
- voltctl log level set WARN read-write-core#github.com/opencord/voltha-lib-go/v3/pkg/kafka
- # Remove noise from openolt logs
- voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/db
- voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/probe
- voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/kafka
- fi
- """
- }
- }
-
- stage('Functional Tests') {
- environment {
- ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
- ROBOT_FILE="Voltha_DT_PODTests.robot"
- ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/FunctionalTests"
- }
- steps {
- timeout(time: 30, unit: 'MINUTES') {
- sh """
- cd $WORKSPACE/kind-voltha/scripts
- ./log-collector.sh > /dev/null &
- ./log-combine.sh > /dev/null &
-
- mkdir -p $ROBOT_LOGS_DIR
- if ( ${powerSwitch} ); then
- export ROBOT_MISC_ARGS="--removekeywords wuks -i PowerSwitch -i sanityDt -i functional -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE"
- else
- export ROBOT_MISC_ARGS="--removekeywords wuks -e PowerSwitch -i sanityDt -i functional -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-system-tests voltha-dt-test || true
- """
- }
- }
- }
- }
- post {
- always {
- sh returnStdout: false, script: '''
- set +e
- kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq
- kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq
- kubectl get nodes -o wide
- kubectl get pods -n voltha -o wide
-
- sleep 60 # Wait for log-collector and log-combine to complete
-
- # Clean up "announcer" pod used by the tests if present
- kubectl delete pod announcer || true
-
- ## Pull out errors from log files
- extract_errors_go() {
- echo
- echo "Error summary for $1:"
- grep '"level":"error"' $WORKSPACE/kind-voltha/scripts/logger/combined/$1*
- echo
- }
-
- extract_errors_python() {
- echo
- echo "Error summary for $1:"
- grep 'ERROR' $WORKSPACE/kind-voltha/scripts/logger/combined/$1*
- 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
- extract_errors_python onos >> $WORKSPACE/error-report.log
-
- gzip error-report.log || true
-
- cd $WORKSPACE/kind-voltha/scripts/logger/combined/
- tar czf $WORKSPACE/container-logs.tgz *
-
- cd $WORKSPACE
- gzip *-combined.log || true
-
- # collect ETCD cluster logs
- mkdir -p $WORKSPACE/etcd
- printf '%s\n' $(kubectl get pods -l app=etcd -o=jsonpath="{.items[*]['metadata.name']}") | xargs -I% bash -c "kubectl logs % > $WORKSPACE/etcd/%.log"
- '''
- script {
- deployment_config.olts.each { olt ->
- sh returnStdout: false, script: """
- sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/openolt.log $WORKSPACE/openolt-${olt.sship}.log || true
- sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/openolt-${olt.sship}.log # Remove escape sequences
- sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/dev_mgmt_daemon.log $WORKSPACE/dev_mgmt_daemon-${olt.sship}.log || true
- sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/dev_mgmt_daemon-${olt.sship}.log # Remove escape sequences
- sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/startup.log $WORKSPACE/startup-${olt.sship}.log || true
- sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/startup-${olt.sship}.log || true # Remove escape sequences
- sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/openolt_process_watchdog.log $WORKSPACE/openolt_process_watchdog-${olt.sship}.log || true
- sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/openolt_process_watchdog-${olt.sship}.log || true # Remove escape sequences
- """
- }
- }
- step([$class: 'RobotPublisher',
- disableArchiveOutput: false,
- logFileName: '**/log*.html',
- otherFiles: '',
- outputFileName: '**/output*.xml',
- outputPath: 'RobotLogs',
- passThreshold: 100,
- reportFileName: '**/report*.html',
- unstableThreshold: 0
- ]);
- archiveArtifacts artifacts: '*.log,*.gz,*.tgz,etcd/*.log'
- }
- unstable {
- step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false])
- }
- }
-}
diff --git a/jjb/pipeline/voltha-physical-functional-tests-openonu-go.groovy b/jjb/pipeline/voltha-physical-functional-tests-openonu-go.groovy
deleted file mode 100644
index 6850bc2..0000000
--- a/jjb/pipeline/voltha-physical-functional-tests-openonu-go.groovy
+++ /dev/null
@@ -1,273 +0,0 @@
-// Copyright 2017-present Open Networking Foundation
-//
-// 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.
-
-node {
- // Need this so that deployment_config has global scope when it's read later
- deployment_config = null
-}
-
-pipeline {
- /* no label, executor is determined by JJB */
- agent {
- label "${params.buildNode}"
- }
- options {
- timeout(time: 380, unit: 'MINUTES')
- }
-
- environment {
- KUBECONFIG="$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf"
- VOLTCONFIG="$HOME/.volt/config-minimal"
- PATH="$WORKSPACE/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- }
- stages {
- stage('Clone kind-voltha') {
- steps {
- step([$class: 'WsCleanup'])
- checkout([
- $class: 'GitSCM',
- userRemoteConfigs: [[
- url: "https://gerrit.opencord.org/kind-voltha",
- refspec: "${kindVolthaChange}"
- ]],
- branches: [[ name: "master", ]],
- extensions: [
- [$class: 'WipeWorkspace'],
- [$class: 'RelativeTargetDirectory', relativeTargetDir: "kind-voltha"],
- [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
- ],
- ])
- }
- }
- stage('Clone voltha-system-tests') {
- steps {
- checkout([
- $class: 'GitSCM',
- userRemoteConfigs: [[
- url: "https://gerrit.opencord.org/voltha-system-tests",
- refspec: "${volthaSystemTestsChange}"
- ]],
- branches: [[ name: "${branch}", ]],
- extensions: [
- [$class: 'WipeWorkspace'],
- [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"],
- [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
- ],
- ])
- }
- }
- stage('Clone cord-tester') {
- steps {
- checkout([
- $class: 'GitSCM',
- userRemoteConfigs: [[
- url: "https://gerrit.opencord.org/cord-tester",
- refspec: "${cordTesterChange}"
- ]],
- branches: [[ name: "master", ]],
- extensions: [
- [$class: 'WipeWorkspace'],
- [$class: 'RelativeTargetDirectory', relativeTargetDir: "cord-tester"],
- [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
- ],
- ])
- }
- }
- stage('Download All the VOLTHA repos') {
- when {
- expression {
- return "${branch}" == 'master';
- }
- }
- steps {
- checkout(changelog: true,
- poll: false,
- scm: [$class: 'RepoScm',
- manifestRepositoryUrl: "${params.manifestUrl}",
- manifestBranch: "${params.branch}",
- currentBranch: true,
- destinationDir: 'voltha',
- forceSync: true,
- resetFirst: true,
- quiet: true,
- jobs: 4,
- showAllChanges: true]
- )
- }
- }
- stage ('Initialize') {
- steps {
- sh returnStdout: false, script: "git clone -b master ${cordRepoUrl}/${configBaseDir}"
- script {
- deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
- }
- sh returnStdout: false, script: """
- mkdir -p $WORKSPACE/bin
- bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
- cd $WORKSPACE
- if [ "${params.branch}" != "master" ]; then
- cd $WORKSPACE/kind-voltha
- source releases/${params.branch}
- else
- VOLTCTL_VERSION=\$(curl -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')
- fi
-
- HOSTOS=\$(uname -s | tr "[:upper:]" "[:lower:"])
- HOSTARCH=\$(uname -m | tr "[:upper:]" "[:lower:"])
- if [ \$HOSTARCH == "x86_64" ]; then
- HOSTARCH="amd64"
- fi
- curl -o $WORKSPACE/bin/voltctl -sSL https://github.com/opencord/voltctl/releases/download/v\${VOLTCTL_VERSION}/voltctl-\${VOLTCTL_VERSION}-\${HOSTOS}-\${HOSTARCH}
- chmod 755 $WORKSPACE/bin/voltctl
- voltctl version --clientonly
-
- if [ "${params.branch}" == "master" ]; then
- # Default kind-voltha config doesn't work on ONF demo pod for accessing kvstore.
- # The issue is that the mgmt node is also one of the k8s nodes and so port forwarding doesn't work.
- # We should change this. In the meantime here is a workaround.
- set +e
-
- # Remove noise from voltha-core logs
- voltctl log level set WARN read-write-core#github.com/opencord/voltha-go/db/model
- voltctl log level set WARN read-write-core#github.com/opencord/voltha-lib-go/v3/pkg/kafka
- # Remove noise from openolt logs
- voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/db
- voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/probe
- voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/kafka
- fi
- """
- }
- }
-
- stage('Functional Tests') {
- environment {
- ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
- ROBOT_FILE="Voltha_PODTests.robot"
- ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/FunctionalTests"
- }
- steps {
- sh """
- cd $WORKSPACE/kind-voltha/scripts
- ./log-collector.sh > /dev/null &
- ./log-combine.sh > /dev/null &
-
- mkdir -p $ROBOT_LOGS_DIR
- if ( ${powerSwitch} ); then
- export ROBOT_MISC_ARGS="--removekeywords wuks -i PowerSwitch -i sanity -i functional -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE"
- else
- export ROBOT_MISC_ARGS="--removekeywords wuks -e PowerSwitch -i sanity -i functional -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-system-tests voltha-test || true
- """
- }
- }
-
- stage('Dataplane Tests') {
- environment {
- ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
- ROBOT_FILE="Voltha_PODTests.robot"
- ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/DataplaneTests"
- }
- steps {
- sh """
- mkdir -p $ROBOT_LOGS_DIR
- export ROBOT_MISC_ARGS="--removekeywords wuks -i dataplane -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE"
- make -C $WORKSPACE/voltha-system-tests voltha-test || true
- """
- }
- }
-
- }
- post {
- always {
- sh returnStdout: false, script: '''
- set +e
- kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq
- kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq
- kubectl get nodes -o wide
- kubectl get pods -n voltha -o wide
- kubectl get pods -o wide
-
- sleep 60 # Wait for log-collector and log-combine to complete
-
- # Clean up "announcer" pod used by the tests if present
- kubectl delete pod announcer || true
-
- ## Pull out errors from log files
- extract_errors_go() {
- echo
- echo "Error summary for $1:"
- grep '"level":"error"' $WORKSPACE/kind-voltha/scripts/logger/combined/$1*
- echo
- }
-
- extract_errors_python() {
- echo
- echo "Error summary for $1:"
- grep 'ERROR' $WORKSPACE/kind-voltha/scripts/logger/combined/$1*
- 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
- extract_errors_python onos >> $WORKSPACE/error-report.log
-
- gzip error-report.log || true
- rm error-report.log || true
-
- cd $WORKSPACE/kind-voltha/scripts/logger/combined/
- tar czf $WORKSPACE/container-logs.tgz *
- rm * || true
-
- cd $WORKSPACE
- gzip *-combined.log || true
- rm *-combined.log || true
-
- # collect ETCD cluster logs
- mkdir -p $WORKSPACE/etcd
- printf '%s\n' $(kubectl get pods -l app=etcd -o=jsonpath="{.items[*]['metadata.name']}") | xargs -I% bash -c "kubectl logs % > $WORKSPACE/etcd/%.log"
- '''
- script {
- deployment_config.olts.each { olt ->
- sh returnStdout: false, script: """
- sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/openolt.log $WORKSPACE/openolt-${olt.sship}.log || true
- sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/openolt-${olt.sship}.log # Remove escape sequences
- sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/dev_mgmt_daemon.log $WORKSPACE/dev_mgmt_daemon-${olt.sship}.log || true
- sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/dev_mgmt_daemon-${olt.sship}.log # Remove escape sequences
- sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/startup.log $WORKSPACE/startup-${olt.sship}.log || true
- sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/startup-${olt.sship}.log || true # Remove escape sequences
- sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/openolt_process_watchdog.log $WORKSPACE/openolt_process_watchdog-${olt.sship}.log || true
- sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/openolt_process_watchdog-${olt.sship}.log || true # Remove escape sequences
- """
- }
- }
- step([$class: 'RobotPublisher',
- disableArchiveOutput: false,
- logFileName: '**/log*.html',
- otherFiles: '',
- outputFileName: '**/output*.xml',
- outputPath: 'RobotLogs',
- passThreshold: 100,
- reportFileName: '**/report*.html',
- unstableThreshold: 0
- ]);
- archiveArtifacts artifacts: '*.log,*.gz,*.tgz,etcd/*.log'
- }
- unstable {
- step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false])
- }
- }
-}
diff --git a/jjb/pipeline/voltha-publish.groovy b/jjb/pipeline/voltha-publish.groovy
deleted file mode 100644
index 7af9a53..0000000
--- a/jjb/pipeline/voltha-publish.groovy
+++ /dev/null
@@ -1,85 +0,0 @@
-/* voltha-publish pipeline */
-pipeline {
-
- /* no label, executor is determined by JJB */
- agent {
- label "${params.buildNode}"
- }
- stages {
-
- stage('repo') {
- steps {
- checkout(changelog: false, \
- poll: false,
- scm: [$class: 'RepoScm', \
- manifestRepositoryUrl: "${params.manifestUrl}", \
- manifestBranch: "${params.manifestBranch}", \
- manifestGroup: 'voltha', \
- currentBranch: true, \
- destinationDir: 'cord', \
- forceSync: true, \
- resetFirst: true, \
- quiet: true, \
- jobs: 4, \
- showAllChanges: true] \
- )
- }
- }
-
- stage('build'){
- steps {
- sh """
- #!/usr/bin/env bash
-
- pushd cord/incubator/voltha
- if [ "${params.manifestBranch}" == "master" ]
- then
- TAG="latest"
- else
- TAG="${params.manifestBranch}"
- fi
- VOLTHA_BUILD=docker DOCKER_CACHE_ARG=--no-cache TAG=\$TAG make build
- popd
- """
- }
- }
-
- stage('push'){
- steps {
- withDockerRegistry([credentialsId: 'docker-artifact-push-credentials', url: '']) {
- sh """
- #!/usr/bin/env bash
-
- pushd cord/incubator/voltha
- if [ "${params.manifestBranch}" == "master" ]
- then
- TAG="latest"
- else
- TAG="${params.manifestBranch}"
- fi
-
- # Check for SemVer in VERSION (only numbers and dots)
- RELEASETAG=\$(cat voltha/VERSION|tr -d ' '|egrep '^[0-9]+(\\.[0-9]+)*\$'||true)
- if [ "\$RELEASETAG" != "" ]
- then
- VOLTHA_BUILD=docker TAG=\$TAG TARGET_REPOSITORY=voltha/ TARGET_TAG=\$RELEASETAG make push
- else
- VOLTHA_BUILD=docker TAG=\$TAG TARGET_REPOSITORY=voltha/ TARGET_TAG=\$TAG make push
- fi
- popd
- """
- }
- }
- }
- }
-
- post {
- failure {
- emailext (
- subject: "$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS",
- body: "Check console output at $BUILD_URL to view the results.",
- to: "${params.failureEmail}"
- )
- }
- }
-}
diff --git a/jjb/software-upgrades.yaml b/jjb/software-upgrades.yaml
index 971511d..687face 100644
--- a/jjb/software-upgrades.yaml
+++ b/jjb/software-upgrades.yaml
@@ -97,7 +97,7 @@
- string:
name: extraHelmFlags
default: ''
- description: 'Helm flags to pass to ./voltha up'
+ description: 'Helm flags to pass to every helm install command'
- string:
name: volthaSystemTestsChange
diff --git a/jjb/voltha-atest-provisioning.yaml b/jjb/voltha-atest-provisioning.yaml
deleted file mode 100644
index 703baf4..0000000
--- a/jjb/voltha-atest-provisioning.yaml
+++ /dev/null
@@ -1,80 +0,0 @@
----
-# VOLTHA-Automated-Tests
-
-- project:
- name: voltha-atests
-
- project-name: 'voltha'
-
- jobs:
- - 'voltha-atest-provisioning'
-
-- job-template:
- id: voltha-atest-provisioning
- name: 'voltha-atest-provisioning'
- description: |
- Created by {id} job-template from ci-management/jjb/voltha-atest-provisioning.yaml
- Voltha automated tests run per commit. Voltha testing with ponsim to validate voltha+ponsim
-
- triggers:
- - cord-infra-gerrit-trigger-patchset:
- gerrit-server-name: '{gerrit-server-name}'
- project-regexp: 'voltha'
- branch-regexp: '^(master|voltha-1.7)$'
- dependency-jobs: '{dependency-jobs}'
- file-include-regexp: '{all-files-regexp}'
-
- properties:
- - cord-infra-properties:
- build-days-to-keep: '{build-days-to-keep}'
- artifact-num-to-keep: '{artifact-num-to-keep}'
-
- wrappers:
- - lf-infra-wrappers:
- build-timeout: '{build-timeout}'
- jenkins-ssh-credential: '{jenkins-ssh-credential}'
-
- parameters:
- - string:
- name: buildNode
- default: 'qct-pod3-voltha-testing'
- description: 'Name of the Jenkins node to run the job on'
-
- - string:
- name: manifestUrl
- default: '{gerrit-server-url}/{cord-repo-manifest}'
- description: 'URL to the repo manifest'
-
- - string:
- name: manifestBranch
- default: 'master'
- description: 'Name of the repo branch to use'
-
- - string:
- name: gerritChangeNumber
- default: '$GERRIT_CHANGE_NUMBER'
- description: 'Changeset number in Gerrit'
-
- - string:
- name: gerritPatchsetNumber
- default: '$GERRIT_PATCHSET_NUMBER'
- description: 'PatchSet number in Gerrit'
-
- - string:
- name: adapter
- default: ''
- description: 'BLANK for ponsim'
- - bool:
- name: BuildVoltha
- default: true
- description: 'Build modified voltha component'
-
- - bool:
- name: BuildBbsim
- default: false
- description: 'Build modified bbsim component'
-
- project-type: pipeline
- concurrent: false
-
- dsl: !include-raw-escape: pipeline/voltha-atest-provisioning.groovy
diff --git a/jjb/voltha-automated-build.yaml b/jjb/voltha-automated-build.yaml
deleted file mode 100644
index a852607..0000000
--- a/jjb/voltha-automated-build.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
----
-# Run build+test of voltha
-
-- project:
- name: voltha-automated-build
-
- project-name: '{name}'
-
- jobs:
- - 'voltha-build'
-
-- job-template:
- id: voltha-build
- name: 'voltha-automated-build'
- description: |
- Created by {id} job-template from ci-management/jjb/voltha-automated-build.yaml
-
- triggers:
- - timed: |
- TZ=America/Los_Angeles
- H 2 * * *
-
- properties:
- - cord-infra-properties:
- build-days-to-keep: '{build-days-to-keep}'
- artifact-num-to-keep: '{artifact-num-to-keep}'
-
- wrappers:
- - lf-infra-wrappers:
- build-timeout: '60'
- jenkins-ssh-credential: '{jenkins-ssh-credential}'
-
- parameters:
- - string:
- name: buildNode
- default: 'onf-build'
- description: 'Name of the Jenkins node to run the job on'
-
- - string:
- name: manifestUrl
- default: '{gerrit-server-url}/{cord-repo-manifest}'
- description: 'URL to the repo manifest'
-
- - string:
- name: manifestBranch
- default: 'master'
- description: 'Name of the repo branch to use'
-
- project-type: pipeline
- concurrent: true
-
- dsl: !include-raw-escape: pipeline/voltha-automated-build.groovy
-
diff --git a/jjb/voltha-publish.yaml b/jjb/voltha-publish.yaml
deleted file mode 100644
index aa68028..0000000
--- a/jjb/voltha-publish.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-# CORD docker image building + dockerhub publishing tasks
-
-- project:
- name: voltha-publish
-
- # add repos that have documentation to the project list in both jobs
- jobs:
- - 'voltha-publish':
- project-regexp: 'voltha'
- branch-regexp: '^(master|voltha-1.6|voltha-1.7)$'
- build-node: 'ubuntu18.04-basebuild-1c-2g'
- dependency-jobs: ''
-
-- job-template:
- id: voltha-publish
- name: 'voltha-publish'
- description: |
- Created by {id} job-template from ci-management/jjb/voltha-publish.yaml
-
- triggers:
- - cord-infra-gerrit-trigger-merge:
- gerrit-server-name: '{gerrit-server-name}'
- project-regexp: '{project-regexp}'
- branch-regexp: '{branch-regexp}'
- file-include-regexp: '{all-files-regexp}'
- dependency-jobs: '{dependency-jobs}'
-
- properties:
- - cord-infra-properties:
- build-days-to-keep: '{build-days-to-keep}'
- artifact-num-to-keep: '{artifact-num-to-keep}'
-
- wrappers:
- - lf-infra-wrappers:
- build-timeout: '{build-timeout}'
- jenkins-ssh-credential: '{jenkins-ssh-credential}'
-
- parameters:
- - string:
- name: buildNode
- default: '{build-node}'
- description: 'Name of the Jenkins node to run the job on'
-
- - string:
- name: manifestUrl
- default: '{gerrit-server-url}/{cord-repo-manifest}'
- description: 'URL to the repo manifest'
-
- - string:
- name: manifestBranch
- default: '$GERRIT_BRANCH'
- description: 'Name of the repo branch to use'
-
- - string:
- name: failureEmail
- default: '{failure-email-address}, $GERRIT_PATCHSET_UPLOADER_EMAIL'
- description: 'On job failure, send an email to these addresses'
-
- project-type: pipeline
- concurrent: false
-
- dsl: !include-raw-escape: pipeline/voltha-publish.groovy