Merge "Clear the old OLT logs when olt processes are bring restarted"
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index ee26d34..107d452 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -89,16 +89,10 @@
     # matchs all project repos
     all-projects-regexp: '.*'
 
-    # for matching repos that build docker images with imagebuilder
-    # As of 2019-04-16 most of the services actively being developed use the
-    # make-based image generation process managed by the `docker-publish` job
-    imagebuilder-projects-regexp: '^(cord-tester|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|globalxos|hippie-oss|hss_db|hypercache|internetemulator|monitoring|openstack|progran|sdn-controller|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr)$'
-
     # strictness of version checks
     semver-strict: 0
 
     # 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: '^(?!aether)(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|pppoe.*|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|kind-voltha|voltha-docs|mac-learning|goloxi|device-management-interface|bbsim-sadis-server|olttopology|opendm-agent|opendevice-manager|.*-robot)$'
 
     # List of all repos that contribute to the CORD guide
diff --git a/jjb/imagebuilder.yaml b/jjb/imagebuilder.yaml
deleted file mode 100644
index 1c52e87..0000000
--- a/jjb/imagebuilder.yaml
+++ /dev/null
@@ -1,76 +0,0 @@
----
-# CORD docker image building + dockerhub publishing tasks
-
-- project:
-    name: imagebuilder
-
-    # add repos that have documentation to the project list in both jobs
-    jobs:
-      - 'publish-imagebuilder':
-          project-regexp: '{imagebuilder-projects-regexp}'
-          branch-regexp: '{supported-branches-regexp}'
-          dependency-jobs: 'version-tag'
-
-- job-template:
-    id: publish-imagebuilder
-    name: 'publish-imagebuilder'
-    description: |
-      Created by {id} job-template from ci-management/jjb/imagebuilder.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: 'imagebuilder'
-          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'
-
-      # NOTE: May need to parameters that give the ability to rebuild from a specific
-      # tag or commit on a branch.
-
-      - bool:
-          name: build
-          default: false
-          description: 'Rebuild all containers (same as "docker build --no-cache")'
-
-      - bool:
-          name: force
-          default: false
-          description: 'Force remove obsolete tags/images (same as "docker rmi --force")'
-
-      - 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/imagebuilder.groovy
-
diff --git a/jjb/pipeline/imagebuilder.groovy b/jjb/pipeline/imagebuilder.groovy
deleted file mode 100644
index 25891d3..0000000
--- a/jjb/pipeline/imagebuilder.groovy
+++ /dev/null
@@ -1,86 +0,0 @@
-/* imagebuilder 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}", \
-            currentBranch: true, \
-            destinationDir: 'cord', \
-            forceSync: true,
-            resetFirst: true, \
-            quiet: true, \
-            jobs: 4, \
-            showAllChanges: true] \
-          )
-      }
-    }
-
-    stage('imagebuilder'){
-      steps {
-        sh """
-           #!/usr/bin/env bash
-
-           mkdir "$WORKSPACE/ib_logs"
-           ib_args=""
-
-           if [ "${params.force}" = "true" ]; then
-             ib_args+="--force "
-           fi
-
-           if [ "${params.build}" = "true" ]; then
-             ib_args+="--build "
-           fi
-
-           pushd cord/automation-tools/developer
-           ./imagebuilder.py -vv \${ib_args} -c docker_images.yml \
-                             -a "$WORKSPACE/ib_actions.yml" \
-                             -l "$WORKSPACE/ib_logs" \
-                             -g "$WORKSPACE/ib_graph.dot"
-           popd
-           """
-      }
-    }
-
-    stage('push'){
-       steps {
-         script {
-          def ib_actions = readYaml( file:"$WORKSPACE/ib_actions.yml" )
-
-          withDockerRegistry([credentialsId: 'docker-artifact-push-credentials']) {
-            for(image in ib_actions.ib_built){
-              for(tag in image.tags){
-                push_tag = image.base + ":" + tag
-                echo "Pushing image: " + push_tag
-                docker.image(push_tag).push()
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-
-  post {
-    always {
-      archiveArtifacts artifacts: 'ib_actions.yml, ib_graph.dot, ib_logs/*', fingerprint: true
-      deleteDir()
-    }
-    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/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index 72f2ed0..80bde43 100755
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -24,7 +24,7 @@
       - 'voltha-periodic-test':
           name: 'periodic-voltha-test-bbsim'
           code-branch: 'master'
-          extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
+          extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master --set onos-classic.replicas=3,onos-classic.atomix.replicas=3 --set voltha.onos_classic.replicas=3 '
           time-trigger: "H H/23 * * *"
           testTargets: |
             - target: functional-single-kind
@@ -43,6 +43,10 @@
               workflow: att
               flags: ""
               teardown: false
+            - target: onos-ha-test
+              workflow: att
+              flags: ""
+              teardown: false
 
       - 'voltha-periodic-test':
           name: 'periodic-voltha-multiple-olts-test-bbsim'
diff --git a/jjb/voltha-scale.yaml b/jjb/voltha-scale.yaml
index 3149962..6effbd9 100644
--- a/jjb/voltha-scale.yaml
+++ b/jjb/voltha-scale.yaml
@@ -49,12 +49,13 @@
           withIgmp: false
           # extraHelmFlags: " -f /home/jenkins/voltha-scale/voltha-values.yaml --set etcd.persistence.enabled=true,etcd.persistence.storageClass=longhorn "
 
-      # GRPC jobs
+      # new OLT App jobs
       - 'voltha-scale-measurements':
           name: 'voltha-scale-measurements-master-2-16-32-att-subscribers-newoltapp'
           'disable-job': false
           build-node: 'voltha-scale-1'
-          time-trigger: "H H/4 * * *"
+          # time-trigger: "H H/4 * * *"
+          time-trigger: "H 0 29 2 *"
           logLevel: INFO
           olts: 2
           pons: 16
@@ -72,7 +73,8 @@
           name: 'voltha-scale-measurements-master-2-16-32-dt-subscribers-newoltapp'
           'disable-job': false
           build-node: 'voltha-scale-1'
-          time-trigger: "H H/4 * * *"
+          # time-trigger: "H H/4 * * *"
+          time-trigger: "H 0 29 2 *"
           logLevel: INFO
           olts: 2
           pons: 16
@@ -91,7 +93,8 @@
           name: 'voltha-scale-measurements-master-2-16-32-tt-subscribers-newoltapp'
           'disable-job': false
           build-node: 'voltha-scale-1'
-          time-trigger: "H H/4 * * *"
+          # time-trigger: "H H/4 * * *"
+          time-trigger: "H 0 29 2 *"
           logLevel: INFO
           olts: 2
           pons: 16
@@ -110,7 +113,7 @@
       # jobs for 1024 ONUs with openonu-go and clustered ONOS (2 OLTs)
       - 'voltha-scale-measurements':
           name: 'voltha-scale-measurements-master-2-16-32-att-subscribers'
-          'disable-job': false
+          'disable-job': true
           build-node: 'voltha-scale-1'
           time-trigger: "H H/4 * * *"
           olts: 2
@@ -125,7 +128,7 @@
 
       - 'voltha-scale-measurements':
           name: 'voltha-scale-measurements-master-2-16-32-dt-subscribers'
-          'disable-job': false
+          'disable-job': true
           build-node: 'voltha-scale-1'
           time-trigger: "H H/4 * * *"
           olts: 2
@@ -141,7 +144,7 @@
 
       - 'voltha-scale-measurements':
           name: 'voltha-scale-measurements-master-2-16-32-tt-subscribers'
-          'disable-job': false
+          'disable-job': true
           build-node: 'voltha-scale-1'
           time-trigger: "H H/4 * * *"
           olts: 2
@@ -218,7 +221,7 @@
       # voltha-2.8 Jobs
       - 'voltha-scale-measurements':
           name: 'voltha-scale-measurements-voltha-2.8-2-16-32-att-subscribers'
-          'disable-job': false
+          'disable-job': true
           pipeline-script: 'voltha/voltha-2.8/voltha-scale-test.groovy'
           build-node: 'voltha-scale-1'
           time-trigger: "H H/4 * * *"
@@ -242,7 +245,7 @@
 
       - 'voltha-scale-measurements':
           name: 'voltha-scale-measurements-voltha-2.8-2-16-32-dt-subscribers'
-          'disable-job': false
+          'disable-job': true
           pipeline-script: 'voltha/voltha-2.8/voltha-scale-test.groovy'
           build-node: 'voltha-scale-1'
           time-trigger: "H H/4 * * *"
@@ -267,7 +270,7 @@
 
       - 'voltha-scale-measurements':
           name: 'voltha-scale-measurements-voltha-2.8-2-16-32-tt-subscribers'
-          'disable-job': false
+          'disable-job': true
           pipeline-script: 'voltha/voltha-2.8/voltha-scale-test.groovy'
           build-node: 'voltha-scale-1'
           time-trigger: "H H/4 * * *"