[AETHER-1265] Integrate Java profiler in TOST env
Add option to the CI jobs to enable the profiler agent
Change-Id: I45e7805af223f83948d77c67d22c552024840b62
diff --git a/jjb/pipeline/tost-onos-publish.groovy b/jjb/pipeline/tost-onos-publish.groovy
index 1579733..c0feef5 100644
--- a/jjb/pipeline/tost-onos-publish.groovy
+++ b/jjb/pipeline/tost-onos-publish.groovy
@@ -63,6 +63,11 @@
export DOCKER_TAG_BUILD_DATE="-$current_date"
fi
+ # Builds having the profiler enabled
+ if [ ! -z "$PROFILER" ]; then
+ export DOCKER_TAG_PROFILER="-profiler"
+ fi
+
# Build w/extraEnvironmentVars
echo "Building image with following vars $extraEnvironmentVars"
$extraEnvironmentVars make docker-build 2>&1 | tee "$WORKSPACE/docker-build.log"
@@ -88,10 +93,15 @@
export DOCKER_REGISTRY="$dockerRegistry/"
export DOCKER_REPOSITORY="$dockerRepo/"
- # Builds having a build date
- if [ ! -z "$buildDate" ]; then
- export DOCKER_TAG_BUILD_DATE="-$current_date"
- fi
+ # Builds having a build date
+ if [ ! -z "$buildDate" ]; then
+ export DOCKER_TAG_BUILD_DATE="-$current_date"
+ fi
+
+ # Builds having the profiler enabled
+ if [ ! -z "$PROFILER" ]; then
+ export DOCKER_TAG_PROFILER="-profiler"
+ fi
# Push w/extraEnvironmentVars
echo "Pushing image with following vars $extraEnvironmentVars"