VOL-2568 Move pyvoltha build to right stage

Change-Id: I8f421ad2f6288ca4598ac12c351074d348836fed
diff --git a/jjb/pipeline/voltha-bbsim-tests.groovy b/jjb/pipeline/voltha-bbsim-tests.groovy
index 515cc6d..6dbf5d2 100644
--- a/jjb/pipeline/voltha-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha-bbsim-tests.groovy
@@ -84,7 +84,14 @@
     stage('Build Images') {
       steps {
         sh """
-           if ! [[ "${gerritProject}" =~ ^(voltha-helm-charts|voltha-system-tests)\$ ]]; then
+           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
              cd $WORKSPACE/voltha/${gerritProject}/
              make DOCKER_REPOSITORY=voltha/ DOCKER_TAG=citest docker-build
            fi
@@ -95,14 +102,7 @@
     stage('Push 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
              export GOROOT=/usr/local/go
              export GOPATH=\$(pwd)
              docker images | grep citest