Add RCP_FEATURE_FILE parameter to jenkins file

Add a stage to overwrite the RCP feature.xml file if the
RCP_FEATURE_FILE string parameter is defined.

The string value should be the relative path to the feature.xml file
from the root of the RCP feature plug-in.

Change-Id: I617f5fba8240b34b511bdac8791f2fc4030337e3
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
diff --git a/jenkins/pipelines/tracecompass-jdk11.Jenkinsfile b/jenkins/pipelines/tracecompass-jdk11.Jenkinsfile
index 45c48b0..12ca64c 100644
--- a/jenkins/pipelines/tracecompass-jdk11.Jenkinsfile
+++ b/jenkins/pipelines/tracecompass-jdk11.Jenkinsfile
@@ -65,6 +65,16 @@
                 }
             }
         }
+        stage('RCP Feature File') {
+            when {
+                not { expression { return params.RCP_FEATURE_FILE == null || params.RCP_FEATURE_FILE.isEmpty() } }
+            }
+            steps {
+                container('tracecompass') {
+                    sh "cp -f ${WORKSPACE}/rcp/org.eclipse.tracecompass.rcp/${params.RCP_FEATURE_FILE} ${WORKSPACE}/rcp/org.eclipse.tracecompass.rcp/feature.xml"
+                }
+            }
+        }
         stage('Build') {
             steps {
                 container('tracecompass') {
diff --git a/jenkins/pipelines/tracecompass-jdk17.Jenkinsfile b/jenkins/pipelines/tracecompass-jdk17.Jenkinsfile
index 3f5fe15..feb2140 100644
--- a/jenkins/pipelines/tracecompass-jdk17.Jenkinsfile
+++ b/jenkins/pipelines/tracecompass-jdk17.Jenkinsfile
@@ -65,6 +65,16 @@
                 }
             }
         }
+        stage('RCP Feature File') {
+            when {
+                not { expression { return params.RCP_FEATURE_FILE == null || params.RCP_FEATURE_FILE.isEmpty() } }
+            }
+            steps {
+                container('tracecompass') {
+                    sh "cp -f ${WORKSPACE}/rcp/org.eclipse.tracecompass.rcp/${params.RCP_FEATURE_FILE} ${WORKSPACE}/rcp/org.eclipse.tracecompass.rcp/feature.xml"
+                }
+            }
+        }
         stage('Build') {
             steps {
                 container('tracecompass') {