Added pre-build-script possibility to build package pipeline

Change-Id: I329e9e65bc485a600314be68f1612affdca93bd3
diff --git a/build-debian-packages-pipeline.groovy b/build-debian-packages-pipeline.groovy
index 8536b5e..91ddb16 100644
--- a/build-debian-packages-pipeline.groovy
+++ b/build-debian-packages-pipeline.groovy
@@ -62,6 +62,9 @@
     }
     stage("build-binary") {
       dsc = sh script: "ls build-area/*.dsc", returnStdout: true
+      if(common.validInputParam("PRE_BUILD_SCRIPT")) {
+        writeFile([file:"pre-build-script.sh", text: env['PRE_BUILD_SCRIPT']])
+      }
       debian.buildBinary(
         dsc.trim(),
         OS+":"+DIST,