fixing pipeline errors in bbsim script

Change-Id: I5d31e28b62e553bdabf75950d9aadbf2cb75abfd
diff --git a/jjb/bbsim-validation.yaml b/jjb/bbsim-validation.yaml
index 7b58804..f76172a 100644
--- a/jjb/bbsim-validation.yaml
+++ b/jjb/bbsim-validation.yaml
@@ -70,7 +70,7 @@
          default: '300s'
          description: 'timeout for each test case (increase as you scale up)'
 
-      - string:
+      - bool:
          name: ArchiveLogs
          default: false
          description: 'Archive all pod logs after test run. Default to false as logs are very large'
diff --git a/jjb/pipeline/bbsim-validation.groovy b/jjb/pipeline/bbsim-validation.groovy
index 4f95324..3dbd53e 100644
--- a/jjb/pipeline/bbsim-validation.groovy
+++ b/jjb/pipeline/bbsim-validation.groovy
@@ -151,10 +151,9 @@
             """
             }
         }
-  }
 
-    if ( params.ArchiveLogs ) {
         stage ('Archive Artifacts') {
+          when { expression { return params.ArchiveLogs } }
           steps {
             sh '''
                kubectl get pods --all-namespaces
@@ -175,8 +174,7 @@
                '''
                 }
             }
-        }
-
+    }
   post {
     always {
       sh '''