[v2,10/12] CI: Add Jenkins pipeline configuration

Message ID 20230303144727.481716-11-amikan@ilbers.de
State Deferred
Headers show
Series Next avocado improvements​ | expand

Commit Message

Anton Mikanovich March 3, 2023, 2:47 p.m. UTC
Add pipeline configuration file for Jenkins CI: Jenkinsfile.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 Jenkinsfile | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 Jenkinsfile

Patch

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..addefa6
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,34 @@ 
+pipeline {
+    agent {
+      node {
+        label "built-in"
+        customWorkspace "/build/$JOB_NAME/$BUILD_ID"
+      }
+    }
+    options {
+        disableConcurrentBuilds()
+        timestamps()
+    }
+    parameters {
+        choice(name: 'TAGS', choices: ['dev', 'fast', 'full'], description: 'TAGS to execute')
+    }
+    environment {
+        DISTRO_APT_PREMIRRORS = 'deb.debian.org ftp.de.debian.org'
+    }
+    stages {
+        stage('Stage') {
+            parallel {
+                stage('Cleanup') {
+                    steps {
+                        sh "/home/workspace/bin/clean_task.sh"
+                    }
+                }
+                stage('Build and run') {
+                    steps {
+                        sh "/home/workspace/bin/build_task.sh '-T ${params.TAGS}'"
+                    }
+                }
+            }
+        }
+    }
+}