Merge "fix config file for mcord pod4"
diff --git a/jjb/aaa.yaml b/jjb/aaa.yaml
index 398b4ff..f7c9d5b 100644
--- a/jjb/aaa.yaml
+++ b/jjb/aaa.yaml
@@ -3,26 +3,37 @@
 
 - project:
     name: aaa
-    project: '{name}'
+
+    project-name: '{name}'
 
     jobs:
       - 'aaa':
           branch-regexp: '{supported-branches-regexp}'
 
-- job-group:
-    name: 'aaa'
-    jobs:
-      - 'aaa-gerrit':
-            goals: 'clean install'
-      - 'verify-licensed'
 
 - job-template:
+    id: aaa
     name: 'aaa-gerrit'
-    builders:
-        - lf-maven-build:
-           mvn-goals: '{goals}'
-        - 'cord-infra-sonarqube':
-           project: '{name}'
+    description: |
+      <!-- Managed by Jenkins Job Builder -->
+      Created by {id} job-template from ci-management/jjb/aaa.yaml
+
+    node: 'ubuntu16.04-basebuild-1c-2g'
+    project-type: maven
+    maven:
+      root-pom: pom.xml
+      goals: 'clean install'
+
+    parameters:
+      - string:
+         name: GERRIT_BRANCH
+         default: 'master'
+         description: 'Use default when using "Build Now"'
+
+      - string:
+         name: GERRIT_REFSPEC
+         default: 'refs/heads/master'
+         description: 'Use default when using "Build Now"'
 
     triggers:
       - cord-infra-gerrit-trigger-patchset:
@@ -36,3 +47,13 @@
       - cord-infra-properties:
           build-days-to-keep: '{build-days-to-keep}'
           artifact-num-to-keep: '{artifact-num-to-keep}'
+
+    scm:
+      - git:
+          url: '{gerrit-server-url}/aaa'
+          branches:
+            - '$GERRIT_BRANCH'
+          refspec: '$GERRIT_RECSPEC'
+          choosing-strategy: 'gerrit'
+          do-not-fetch-tags: true
+          shallow-clone: true
diff --git a/jjb/helm.yaml b/jjb/helm.yaml
new file mode 100644
index 0000000..dbb08e3
--- /dev/null
+++ b/jjb/helm.yaml
@@ -0,0 +1,64 @@
+---
+# CORD helm chart publishing tasks
+
+- project:
+    name: helm-repo
+
+    # add repos that have documentation to the project list in both jobs
+    jobs:
+      - 'publish-helm-repo':
+          project-regexp: '^(helm-charts)$'
+          branch-regexp: '{supported-branches-regexp}'
+
+
+- job-template:
+    id: publish-helm-repo
+    name: 'publish-helm-repo'
+    description: |
+      Created by publish-helm-repo job-template from ci-management/jjb/helm.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}'
+
+    scm:
+      - lf-infra-gerrit-scm:
+          git-url: '$GIT_URL/$GERRIT_PROJECT'
+          refspec: ''
+          branch: '$GERRIT_BRANCH'
+          submodule-recursive: 'false'
+          choosing-strategy: default
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+    node: '{build-node}'
+    project-type: freestyle
+    concurrent: false
+
+    builders:
+      - shell: |
+          helm init --client-only
+          helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
+          ./scripts/helmrepo.sh
+
+# publish over ssh: https://docs.openstack.org/infra/jenkins-job-builder/publishers.html#publishers.ssh
+    publishers:
+      - ssh:
+          site: 'CORD Wiki'
+          source: 'chart_repo/**'
+          remove-prefix: 'chart_repo'
+          target: '//var/www/guide/charts/$GERRIT_BRANCH'
+
diff --git a/jjb/sonar.yaml b/jjb/sonar.yaml
index 8173268..344a1c2 100644
--- a/jjb/sonar.yaml
+++ b/jjb/sonar.yaml
@@ -57,10 +57,10 @@
     scm:
       - lf-infra-gerrit-scm:
           git-url: '$GIT_URL/$GERRIT_PROJECT'
-          refspec: '$GERRIT_REFSPEC'
+          refspec: ''
           branch: '$GERRIT_BRANCH'
           submodule-recursive: 'false'
-          choosing-strategy: gerrit
+          choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     node: 'ubuntu16.04-basebuild-1c-2g'
diff --git a/packer/provision/basebuild.sh b/packer/provision/basebuild.sh
index 2015ef3..b1ff0d4 100644
--- a/packer/provision/basebuild.sh
+++ b/packer/provision/basebuild.sh
@@ -143,6 +143,15 @@
     rm -rf helm.tgz ${HELM_PLATFORM}
     popd
 
+    # install kubectl
+    KUBECTL_VERSION="1.9.5"
+    KUBECTL_SHA256SUM="9c67b6e80e9dd3880511c7d912c5a01399c1d74aaf4d71989c7d5a4f2534bcd5"
+    curl -L -o /tmp/kubectl "https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
+    echo "$KUBECTL_SHA256SUM  /tmp/kubectl" | sha256sum -c -
+    mv /tmp/kubectl /usr/local/bin/kubectl
+    chmod a+x /usr/local/bin/kubectl
+    rm -f /tmp/kubectl
+
     # install minikube
     MINIKUBE_VERSION="0.26.1"
     MINIKUBE_DEB_VERSION="$(echo ${MINIKUBE_VERSION} | sed -n 's/\(.*\)\.\(.*\)/\1-\2/p')"