Memory Footprint: Simplify logics to parse configs

Build configs are available via Jenkins env params. There is no need to
parse build configs with build manager, which makes the code hard to
understand.

Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I3299fd08f268e020c3f0bfb829f8acd4dd4de06c
diff --git a/jenkins/build-config.jpl b/jenkins/build-config.jpl
index 672d20e..d09a43c 100644
--- a/jenkins/build-config.jpl
+++ b/jenkins/build-config.jpl
@@ -40,13 +40,16 @@
         if (upstreamProject == "tf-m-build-and-test") {
           archiveArtifacts 'trusted-firmware-m/build/generated/**'
         }
-        if (env.SQUAD_CONFIGURATIONS != ""){
+        if (env.SQUAD_CONFIGURATIONS == "enabled"){
           //Creating a folder to store memory footprint artifacts and launching the memory footprint script.
           sh "mkdir tf-m-ci-scripts/Memory_footprint/"
           withCredentials([string(credentialsId: 'QA_REPORTS_TOKEN', variable: 'TOKEN')]) {
-            sh(script: "python3 tf-m-ci-scripts/memory_footprint.py ${env.WORKSPACE}/trusted-firmware-m/ ${env.CONFIG_NAME} \'${env.SQUAD_CONFIGURATIONS}\' ${TOKEN}", returnStdout: true)
+            output = sh(script: """python3 tf-m-ci-scripts/memory_footprint.py ${TOKEN}""", returnStdout: true).trim()
           }
           if (fileExists('tf-m-ci-scripts/Memory_footprint/filesize.json')) {
+            println("--- output from memory_footprint.py ---")
+            println(output)
+            println("--- end of output from lava_wait_jobs.py ---")
             archiveArtifacts 'tf-m-ci-scripts/Memory_footprint/filesize.json'
           }
         }