Use a string to replace null value of PROFILE param

Jenkins does not allow null value for params.
A string is used to indicate the null value of PROFILE param.

Change-Id: I9d23a0d6dd206d8890d3ffb70023fe4b16e8cc09
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
diff --git a/jenkins/ci.jpl b/jenkins/ci.jpl
index dcc0fcf..7f36282 100644
--- a/jenkins/ci.jpl
+++ b/jenkins/ci.jpl
@@ -48,115 +48,115 @@
       build_params["ISOLATION_LEVEL"] == "1"     && \
       build_params["TEST_REGRESSION"] == "False" && \
       build_params["TEST_PSA_API"]    == "OFF"   && \
-      !build_params["TFM_PROFILE"]) {
+      build_params["PROFILE"]         == "N.A") {
         params += string(name: "PROJ_CONFIG", value: "ConfigDefault")
       }
-  if (build_params["BL2"]             == "True"  && \
+  else if (build_params["BL2"]        == "True"  && \
       build_params["NS"]              == "True"  && \
       build_params["PSA_API"]         == "True"  && \
       build_params["ISOLATION_LEVEL"] == "1"     && \
       build_params["TEST_REGRESSION"] == "False" && \
       build_params["TEST_PSA_API"]    == "OFF"   && \
-      !build_params["TFM_PROFILE"]) {
+      build_params["PROFILE"]         == "N.A") {
         params += string(name: "PROJ_CONFIG", value: "ConfigCoreIPC")
       }
-  if (build_params["BL2"]             == "True"  && \
+  else if (build_params["BL2"]        == "True"  && \
       build_params["NS"]              == "True"  && \
       build_params["PSA_API"]         == "True"  && \
       build_params["ISOLATION_LEVEL"] == "2"     && \
       build_params["TEST_REGRESSION"] == "False" && \
       build_params["TEST_PSA_API"]    == "OFF"   && \
-      !build_params["TFM_PROFILE"]) {
+      build_params["PROFILE"]         == "N.A") {
         params += string(name: "PROJ_CONFIG", value: "ConfigCoreIPCTfmLevel2")
       }
-  if (build_params["BL2"]             == "True"          && \
+  else if (build_params["BL2"]        == "True"          && \
       build_params["NS"]              == "True"          && \
       build_params["PSA_API"]         == "False"         && \
       build_params["ISOLATION_LEVEL"] == "1"             && \
-      build_params["TFM_PROFILE"]     == "profile_small" && \
+      build_params["PROFILE"]         == "profile_small" && \
       build_params["TEST_REGRESSION"] == "False"         && \
       build_params["TEST_PSA_API"]    == "OFF") {
         params += string(name: "PROJ_CONFIG", value: "ConfigDefaultProfileS")
       }
-  if (build_params["BL2"]             == "True"          && \
+  else if (build_params["BL2"]        == "True"          && \
       build_params["NS"]              == "True"          && \
       build_params["PSA_API"]         == "False"         && \
       build_params["ISOLATION_LEVEL"] == "1"             && \
-      build_params["TFM_PROFILE"]     == "profile_medium"&& \
+      build_params["PROFILE"]         == "profile_medium"&& \
       build_params["TEST_REGRESSION"] == "False"         && \
       build_params["TEST_PSA_API"]    == "OFF") {
         params += string(name: "PROJ_CONFIG", value: "ConfigDefaultProfileM")
       }
-  if (build_params["BL2"]             == "True"  && \
+  else if (build_params["BL2"]        == "True"  && \
       build_params["NS"]              == "True"  && \
       build_params["PSA_API"]         == "False" && \
       build_params["ISOLATION_LEVEL"] == "1"     && \
       build_params["TEST_REGRESSION"] == "True"  && \
       build_params["TEST_PSA_API"]    == "OFF"   && \
-      !build_params["TFM_PROFILE"]) {
+      build_params["PROFILE"]         == "N.A") {
         params += string(name: "PROJ_CONFIG", value: "ConfigRegression")
       }
-  if (build_params["BL2"]             == "True"  && \
+  else if (build_params["BL2"]        == "True"  && \
       build_params["NS"]              == "True"  && \
       build_params["PSA_API"]         == "True"  && \
       build_params["ISOLATION_LEVEL"] == "1"     && \
       build_params["TEST_REGRESSION"] == "True"  && \
       build_params["TEST_PSA_API"]    == "OFF"   && \
-      !build_params["TFM_PROFILE"]) {
+      build_params["PROFILE"]         == "N.A") {
         params += string(name: "PROJ_CONFIG", value: "ConfigRegressionIPC")
       }
-  if (build_params["BL2"]             == "True"  && \
+  else if (build_params["BL2"]        == "True"  && \
       build_params["NS"]              == "True"  && \
       build_params["PSA_API"]         == "True"  && \
       build_params["ISOLATION_LEVEL"] == "2"     && \
       build_params["TEST_REGRESSION"] == "True"  && \
       build_params["TEST_PSA_API"]    == "OFF"   && \
-      !build_params["TFM_PROFILE"]) {
+      build_params["PROFILE"]         == "N.A") {
         params += string(name: "PROJ_CONFIG", value: "ConfigRegressionIPCTfmLevel2")
       }
-  if (build_params["BL2"]             == "True"          && \
+  else if (build_params["BL2"]        == "True"          && \
       build_params["NS"]              == "True"          && \
       build_params["PSA_API"]         == "False"         && \
       build_params["ISOLATION_LEVEL"] == "1"             && \
-      build_params["TFM_PROFILE"]     == "profile_small" && \
+      build_params["PROFILE"]         == "profile_small" && \
       build_params["TEST_REGRESSION"] == "True"          && \
       build_params["TEST_PSA_API"]    == "OFF") {
         params += string(name: "PROJ_CONFIG", value: "ConfigRegressionProfileS")
       }
-  if (build_params["BL2"]             == "True"          && \
+  else if (build_params["BL2"]        == "True"          && \
       build_params["NS"]              == "True"          && \
       build_params["PSA_API"]         == "False"         && \
       build_params["ISOLATION_LEVEL"] == "1"             && \
-      build_params["TFM_PROFILE"]     == "profile_medium"&& \
+      build_params["PROFILE"]         == "profile_medium"&& \
       build_params["TEST_REGRESSION"] == "True"          && \
       build_params["TEST_PSA_API"]    == "OFF") {
         params += string(name: "PROJ_CONFIG", value: "ConfigRegressionProfileM")
       }
-  if (build_params["BL2"]             == "True"  && \
+  else if (build_params["BL2"]        == "True"  && \
       build_params["NS"]              == "True"  && \
       build_params["PSA_API"]         == "False" && \
       build_params["ISOLATION_LEVEL"] == "1"     && \
       build_params["TEST_REGRESSION"] == "False" && \
       build_params["TEST_PSA_API"]    != "OFF"   && \
-      !build_params["TFM_PROFILE"]) {
+      build_params["PROFILE"]         == "N.A") {
         params += string(name: "PROJ_CONFIG", value: "ConfigPsaApiTest")
       }
-  if (build_params["BL2"]             == "True"  && \
+  else if (build_params["BL2"]        == "True"  && \
       build_params["NS"]              == "True"  && \
       build_params["PSA_API"]         == "True"  && \
       build_params["ISOLATION_LEVEL"] == "1"     && \
       build_params["TEST_REGRESSION"] == "False" && \
       build_params["TEST_PSA_API"]    != "OFF"   && \
-      !build_params["TFM_PROFILE"]) {
+      build_params["PROFILE"]         == "N.A") {
         params += string(name: "PROJ_CONFIG", value: "ConfigPsaApiTestIPC")
       }
-  if (build_params["BL2"]             == "True"  && \
+  else if (build_params["BL2"]        == "True"  && \
       build_params["NS"]              == "True"  && \
       build_params["PSA_API"]         == "True"  && \
       build_params["ISOLATION_LEVEL"] == "2"     && \
       build_params["TEST_REGRESSION"] == "False" && \
       build_params["TEST_PSA_API"]    != "OFF"   && \
-      !build_params["TFM_PROFILE"]) {
+      build_params["PROFILE"]         == "N.A") {
         params += string(name: "PROJ_CONFIG", value: "ConfigPsaApiTestIPCTfmLevel2")
       }
   else {
diff --git a/tfm_ci_pylib/tfm_build_manager.py b/tfm_ci_pylib/tfm_build_manager.py
index b699b54..a05edb1 100644
--- a/tfm_ci_pylib/tfm_build_manager.py
+++ b/tfm_ci_pylib/tfm_build_manager.py
@@ -100,7 +100,7 @@
             "OTP={}",
             "BL2={}",
             "NS={}",
-            "PROFILE={} "
+            "PROFILE={}"
         ]
         print(
             "\n".join(argument_list)
@@ -116,7 +116,7 @@
                 config_details.with_otp,
                 config_details.with_bl2,
                 config_details.with_ns,
-                config_details.profile
+                "N.A" if not config_details.profile else config_details.profile
             )
             .strip()
         )
@@ -371,7 +371,7 @@
                             "with_otp": i.with_otp,
                             "with_bl2": i.with_bl2,
                             "with_ns": i.with_ns,
-                            "profile": i.profile}
+                            "profile": "" if i.profile=="N.A" else i.profile}
         build_cfg["config_template"] %= overwrite_params
         return build_cfg