Adding Maven environment variables 91/2591/4
authorVanessa Rene Valderrama <vvalderrama@linuxfoundation.org>
Thu, 1 Sep 2016 22:36:38 +0000 (17:36 -0500)
committerVanessa Rene Valderrama <vvalderrama@linuxfoundation.org>
Thu, 1 Sep 2016 23:18:52 +0000 (18:18 -0500)
Change-Id: I9c18f2219c811eaaa7dcada8af8c198a021fcb86
Signed-off-by: Vanessa Rene Valderrama <vvalderrama@linuxfoundation.org>
jjb/nsh_sfc/nsh_sfc.yaml
jjb/scripts/create_maven_env.sh [new file with mode: 0644]

index c9a9460..ee11c12 100644 (file)
             settings-type: cfp
             global-settings: 'global-settings'
             global-settings-type: cfp
+        - config-file-provider:
+            files:
+              - file-id: 'nsh_sfc-settings'
+                variable: 'SETTINGS_FILE'
+              - file-id: 'global-settings'
+                variable: 'GLOBAL_SETTINGS_FILE'
+        - shell:
+            !include-raw-escape: ../scripts/create_maven_env.sh
+        - inject:
+            properties-file: maven_env.txt
         - shell:
             !include-raw-escape:
                 - ../scripts/cleanup_vpp_plugin_dev_env.sh
             settings-type: cfp
             global-settings: 'global-settings'
             global-settings-type: cfp
+        - config-file-provider:
+            files:
+              - file-id: 'nsh_sfc-settings'
+                variable: 'SETTINGS_FILE'
+              - file-id: 'global-settings'
+                variable: 'GLOBAL_SETTINGS_FILE'
+        - shell:
+            !include-raw-escape: ../scripts/create_maven_env.sh
+        - inject:
+            properties-file: maven_env.txt
         - shell:
             !include-raw-escape:
                 - ../scripts/cleanup_vpp_plugin_dev_env.sh
             branch: '{branch}'
 
     builders:
+        - config-file-provider:
+            files:
+              - file-id: 'nsh_sfc-settings'
+                variable: 'SETTINGS_FILE'
+              - file-id: 'global-settings'
+                variable: 'GLOBAL_SETTINGS_FILE'
+        - shell:
+            !include-raw-escape: ../scripts/create_maven_env.sh
+        - inject:
+            properties-file: maven_env.txt
         - shell:
             !include-raw-escape:
                 - ../scripts/cleanup_vpp_plugin_dev_env.sh
diff --git a/jjb/scripts/create_maven_env.sh b/jjb/scripts/create_maven_env.sh
new file mode 100644 (file)
index 0000000..c74d546
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "MAVEN_SETTINGS_OPTIONS='-s \$SETTINGS_FILE -gs \$GLOBAL_SETTINGS_FILE'" > maven_env.txt