template for ecord jobs

Change-Id: I60e906c02447524842eb9f0d71a9b0384327291d
diff --git a/jjb/cord-test/ecord-build.yaml b/jjb/cord-test/ecord-build.yaml
index 9df3203..b1d4146 100644
--- a/jjb/cord-test/ecord-build.yaml
+++ b/jjb/cord-test/ecord-build.yaml
@@ -35,12 +35,13 @@
          fromBranch: 'cord-5.0'
 
       # ONLAB ECORD build jobs (ecord-global)
-      - 'build_pod_manual':
-         pod: 'onlab-ecord-global'
+      - 'build_ecord_pod_manual':
+         pod: 'onf-build'
          pod_config: 'onlab-ecord-global.yml'
          profile: 'ecord-global'
          branch: 'cord-4.1'
          Jenkinsfile: 'Jenkinsfile.newBuildSystem'
+         local_pod_name: 'onlab-ecord-global'
 
       # qct pod 3 test jobs (ecord-global)
       - 'build_pod_test':
@@ -66,12 +67,13 @@
          Jenkinsfile: 'Jenkinsfile-ecord-global'
 
       # ONLAB Global POD test jobs (ecord-global)
-      - 'build_pod_manual_test':
-         pod: 'onlab-ecord-global'
+      - 'build_ecord_pod_manual_test':
+         pod: 'onf-build'
          pod_config: 'onlab-ecord-global.yml'
          profile: 'ecord-global'
          branch: 'cord-4.1'
          Jenkinsfile: 'Jenkinsfile-ecord-global'
+         local_pod_name: 'onlab_ecord-global'
 
       # qct pod 3 build jobs (ecord-local)
       - 'build_pod_first':
@@ -99,26 +101,29 @@
          fromBranch: 'cord-5.0'
 
       # ONLAB LOCAL build jobs (ecord-local)
-      - 'build_pod_manual':
-         pod: 'onlab-ecord-local-pod1'
+      - 'build_ecord_pod_manual':
+         pod: 'onf-build'
          pod_config: 'onlab-ecord-local-pod1.yml'
          profile: 'ecord-local'
          branch: 'cord-4.1'
          Jenkinsfile: 'Jenkinsfile.newBuildSystem'
+         local_pod_name: 'onlab-ecord-local-pod1'
 
-      - 'build_pod_manual':
-         pod: 'onlab-ecord-local-pod2'
+      - 'build_ecord_pod_manual':
+         pod: 'onf-build'
          pod_config: 'onlab-ecord-local-pod2.yml'
          profile: 'ecord-local'
          branch: 'cord-4.1'
          Jenkinsfile: 'Jenkinsfile.newBuildSystem'
+         local_pod_name: 'onlab-ecord-local-pod2'
 
-      - 'build_pod_manual':
-         pod: 'onlab-ecord-local-pod3'
+      - 'build_ecord_pod_manual':
+         pod: 'onf-build'
          pod_config: 'onlab-ecord-local-pod3.yml'
          profile: 'ecord-local'
          branch: 'cord-4.1'
          Jenkinsfile: 'Jenkinsfile.newBuildSystem'
+         local_pod_name: 'onlab-ecord-local-pod3'
 
       # qct pod 3 test jobs (ecord-local)
       - 'build_pod_test':
@@ -143,23 +148,26 @@
          Jenkinsfile: 'Jenkinsfile-ecord-local'
 
       # ONLAB Local POD test jobs (ecord-local)
-      - 'build_pod_manual_test':
-         pod: 'onlab-ecord-local-pod1'
+      - 'build_ecord_pod_manual_test':
+         pod: 'onf-build'
          pod_config: 'onlab-ecord-local-pod1.yml'
          profile: 'ecord-local'
          branch: 'cord-4.1'
          Jenkinsfile: 'Jenkinsfile-ecord-local'
+         local_pod_name: 'onlab-ecord-local-pod1'
 
-      - 'build_pod_manual_test':
-         pod: 'onlab-ecord-local-pod2'
+      - 'build_ecord_pod_manual_test':
+         pod: 'onf-build'
          pod_config: 'onlab-ecord-local-pod2.yml'
          profile: 'ecord-local'
          branch: 'cord-4.1'
          Jenkinsfile: 'Jenkinsfile-ecord-local'
+         local_pod_name: 'onlab-ecord-local-pod2'
 
-      - 'build_pod_manual_test':
-         pod: 'onlab-ecord-local-pod3'
+      - 'build_ecord_pod_manual_test':
+         pod: 'onf-build'
          pod_config: 'onlab-ecord-local-pod3.yml'
          profile: 'ecord-local'
          branch: 'cord-4.1'
          Jenkinsfile: 'Jenkinsfile-ecord-local'
+         local_pod_name: 'onlab-ecord-local-pod3'
diff --git a/jjb/cord-test/nightly-build-pipeline.yaml b/jjb/cord-test/nightly-build-pipeline.yaml
index 0e53f9b..066a0f1 100644
--- a/jjb/cord-test/nightly-build-pipeline.yaml
+++ b/jjb/cord-test/nightly-build-pipeline.yaml
@@ -298,3 +298,114 @@
       - reverse:
           jobs: 'build_{profile}_{pod}_manual_{branch}'
           result: 'failure'
+
+- job-template:
+    name: 'build_{profile}_{local_pod_name}_{branch}'
+    id: build_ecord_pod_manual
+    description: |
+                  <!-- Managed by Jenkins Job Builder -->
+                  Manual Build on ECORD POD {pod} using {pod_config} <br /><br />
+                  Created from job-template {id} from ci-management/jjb/cord-test/cord-test-pipeline.yaml <br />
+                  Created by QA (Suchitra Vemuri - suchitra@opennetworking.org ) <br />
+                  Copyright (c) 2018 Open Networking Foundation (ONF)
+
+    <<: *test-pipe-job-boiler-plate
+
+    parameters:
+      - string:
+         name: devNodeName
+         default: '{pod}'
+         description: 'Jenkins node name of Dev Node'
+
+      - string:
+         name: configRepoUrl
+         default: 'https://gerrit.opencord.org/pod-configs'
+         description: 'The URL of the POD configs repository'
+
+      - string:
+         name: configRepoBaseDir
+         default: 'pod-configs/'
+         description: 'The directory inside the POD configs repository'
+
+      - string:
+         name: configRepoFile
+         default: 'deployment-configs/{pod_config}'
+         description: 'The deployment config file'
+
+      - string:
+         name: branch
+         default: '{branch}'
+
+      - string:
+         name: notificationEmail
+         default: 'kailash@opennetworking.org, you@opennetworking.org, suchitra@opennetworking.org'
+         description: ''
+
+    concurrent: true
+
+    pipeline-scm:
+      script-path: '{Jenkinsfile}'
+      scm:
+        - git:
+           url: '{gerrit-server-url}/cord'
+           branches:
+             - '{branch}'
+
+- job-template:
+    name: 'build_{profile}_{local_pod_name}_{branch}_test'
+    id: build_ecord_pod_manual_test
+    description: |
+                  <!-- Managed by Jenkins Job Builder -->
+                  Post Tests on {pod} triggered by build_{pod}_{branch} <br /><br />
+                  Created from job-template {id} from ci-management/jjb/cord-test/cord-test-pipeline.yaml <br />
+                  Created by QA (Suchitra Vemuri - suchitra@opennetworking.org) <br />
+                  Copyright (c) 2017 Open Networking Foundation (ONF)
+
+    branches: '{branch}'
+
+    <<: *test-pipe-job-boiler-plate
+
+    parameters:
+      - string:
+         name: devNodeName
+         default: '{pod}'
+         description: 'Jenkins node name of Dev Node'
+
+      - string:
+         name: configRepoUrl
+         default: 'https://gerrit.opencord.org/pod-configs'
+         description: 'The URL of the POD configs repository'
+
+      - string:
+         name: configRepoBaseDir
+         default: 'pod-configs/'
+         description: 'The directory inside the POD configs repository'
+
+      - string:
+         name: configRepoFile
+         default: 'deployment-configs/{pod_config}'
+         description: 'The deployment config file'
+
+      - string:
+         name: branch
+         default: '{branch}'
+
+      - string:
+         name: notificationEmail
+         default: 'kailash@opennetworking.org, you@opennetworking.org, suchitra@opennetworking.org'
+         description: ''
+
+    concurrent: true
+
+    pipeline-scm:
+      script-path: '{Jenkinsfile}'
+      scm:
+        - git:
+           url: '{gerrit-server-url}/cord-tester'
+           branches:
+             - '{branch}'
+
+    triggers:
+      - reverse:
+          jobs: 'build_{profile}_{pod}_manual_{branch}'
+          result: 'failure'