VOL-4857 - add debugging
vars/installVoltctl.groovy
--------------------------
o Display release vars in a single statement to avoid jenkins inserting 'echo' between each.
vars/setOnosLogLevels.groovy
vars/volthaDeploy.groovy
vars/volthaInfraDeploy.groovy
vars/volthaStackDeploy.groovy
-----------------------------
o Added an ENTER/LEAVE printf to identify running script.
o Consistent use of a shebang path.
o Use pgrep to display port forwarding prior to termination
+ command pipeline can be shorted, let pgrep/pkill do heavy lifting.
o Inlined temporary debugging to view output pipelines are acting on.
+ Debugging etcd:port=null and a few other anomolies.
Change-Id: I40d6b87519cd0fc84406a8a8a76f244da0096496
diff --git a/vars/volthaInfraDeploy.groovy b/vars/volthaInfraDeploy.groovy
index a6870d8..189b562 100644
--- a/vars/volthaInfraDeploy.groovy
+++ b/vars/volthaInfraDeploy.groovy
@@ -1,3 +1,5 @@
+#!/usr/bin/env groovy
+
// usage
//
// stage('test stage') {
@@ -8,8 +10,11 @@
// }
// }
-
def call(Map config) {
+
+ String iam = 'vars/volthaInfraDeploy.groovy'
+ println("** ${iam}: ENTER")
+
// NOTE use params or directule extraHelmFlags??
def defaultConfig = [
onosReplica: 1,
@@ -50,6 +55,13 @@
kubeconfig = env.KUBECONFIG
}
+ /*
+ [joey] - should pre-existing hint the env is tainted (?)
+ 05:24:57 + kubectl create namespace infra
+ 05:24:57 Error from server (AlreadyExists): namespaces "infra" already exists
+ 05:24:57 error: failed to create configmap: configmaps "kube-config" already exists
+ */
+
sh """
kubectl create namespace ${cfg.infraNamespace} || true
kubectl create configmap -n ${cfg.infraNamespace} kube-config "--from-file=kube_config=${kubeconfig}" || true
@@ -72,4 +84,6 @@
--set etcd.replicaCount=${cfg.etcdReplica} \
-f $WORKSPACE/voltha-helm-charts/examples/${serviceConfigFile}-values.yaml ${cfg.extraHelmFlags}
"""
+
+ println("** ${iam}: LEAVE")
}