Change post-merge PyPI job to be project specific

Change-Id: I25daf038f835a727509482fcf094931768ea83a4
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index edf86ea..784660a 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -79,15 +79,16 @@
     # (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|fabric-crossconnect|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|att-workflow-driver|ves-agent|voltha-bbsim|openolt|sadis-server|kafka-topic-exporter|pyvoltha|voltha-adtran-adapter|voltha-openolt-adapter|voltha-openonu-adapter|plyxproto)$'
 
-    # Projects that build modules sent to PyPI
-    pypi-projects-regexp: '^(plyxproto)$'
-
+    # PyPI related publishing variables
+    #
     # Pipe-separated list of directories relative to $WORKSPACE containing
-    # python modules to publish to PyPI.
+    # python modules to publish to PyPI. Default is current directory which is
+    # correct for simple modules
     pypi-module-dirs: '.'
 
     # Which PyPI index to use. Corresponds to values in ~/.pypirc
-    # 'pypi' and 'testpypi' are current options.
+    # 'pypi' and 'testpypi' are current options. Default to testpypi, override
+    # in the job once testing is completed
     pypi-index: 'testpypi'
 
     # for matching files with file-include-regexp
diff --git a/jjb/pypi-publish.yaml b/jjb/pypi-publish.yaml
index 9f34aac..b2076e9 100644
--- a/jjb/pypi-publish.yaml
+++ b/jjb/pypi-publish.yaml
@@ -1,20 +1,9 @@
 ---
 # publishing Python modules to PyPI
 
-- project:
-    name: pypi-publisher
-
-    branch-regexp: '{modern-branches-regexp}'
-    project-regexp: '{pypi-projects-regexp}'
-
-    # wait to run pypi-publish job until version-tag job has tagged the repo
-    jobs:
-      - 'pypi-publish':
-          dependency-jobs: 'version-tag'
-
 - job-template:
     id: pypi-publish
-    name: '{id}'
+    name: 'pypi-publish_{project}'
     description: |
       Created by {id} job-template from ci-management/jjb/pypi-publish.yaml
       When a patch is merged, publish python modules to PyPI
@@ -52,7 +41,7 @@
 
     builders:
       - inject:
-          properties-content:
+          properties-content: |
             PYPI_INDEX={pypi-index}
             PYPI_MODULE_DIRS={pypi-module-dirs}
 
diff --git a/jjb/verify/plyxproto.yaml b/jjb/verify/plyxproto.yaml
index 1445410..4eb2c32 100644
--- a/jjb/verify/plyxproto.yaml
+++ b/jjb/verify/plyxproto.yaml
@@ -8,6 +8,9 @@
     jobs:
       - 'verify-plyxproto-jobs':
           branch-regexp: '{supported-branches-regexp}'
+      - 'post-merge-plyxproto-jobs':
+          branch-regexp: '{supported-branches-regexp}'
+          pypi-index: 'pypi'
 
 - job-group:
     name: 'verify-plyxproto-jobs'
@@ -17,3 +20,10 @@
           dependency-jobs: 'verify_plyxproto_licensed'
       - 'python-unit-test':
           dependency-jobs: 'verify_plyxproto_sonarqube'
+
+- job-group:
+    name: 'post-merge-plyxproto-jobs'
+    jobs:
+      - 'pypi-publish':
+          project-regexp: '^{name}$'
+          dependency-jobs: 'version-tag'