Jenkinsfile and devops-stages scripts to incorporate LW-UI to the CI/CD 96/6296/2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 26 Jun 2018 13:04:27 +0000 (15:04 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 24 Aug 2018 10:02:18 +0000 (12:02 +0200)
Change-Id: I8207bb77e27993651793277c822faddcc98c0ae6
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Jenkinsfile [new file with mode: 0644]
devops-stages/stage-archive.sh [new file with mode: 0755]
devops-stages/stage-build.sh [new file with mode: 0755]
devops-stages/stage-test.sh [new file with mode: 0755]

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644 (file)
index 0000000..3c24813
--- /dev/null
@@ -0,0 +1,32 @@
+properties([
+    parameters([
+        string(defaultValue: env.BRANCH_NAME, description: '', name: 'GERRIT_BRANCH'),
+        string(defaultValue: 'osm/LW-UI', description: '', name: 'GERRIT_PROJECT'),
+        string(defaultValue: env.GERRIT_REFSPEC, description: '', name: 'GERRIT_REFSPEC'),
+        string(defaultValue: env.GERRIT_PATCHSET_REVISION, description: '', name: 'GERRIT_PATCHSET_REVISION'),
+        string(defaultValue: 'https://osm.etsi.org/gerrit', description: '', name: 'PROJECT_URL_PREFIX'),
+        booleanParam(defaultValue: false, description: '', name: 'TEST_INSTALL'),
+        string(defaultValue: 'artifactory-osm', description: '', name: 'ARTIFACTORY_SERVER'),
+    ])
+])
+
+def devops_checkout() {
+    dir('devops') {
+        git url: "${PROJECT_URL_PREFIX}/osm/devops", branch: params.GERRIT_BRANCH
+    }
+}
+
+node('docker') {
+    checkout scm
+    devops_checkout()
+
+    ci_helper = load "devops/jenkins/ci-pipelines/ci_stage_2.groovy"
+    ci_helper.ci_pipeline( 'LW-UI',
+                           params.PROJECT_URL_PREFIX,
+                           params.GERRIT_PROJECT,
+                           params.GERRIT_BRANCH,
+                           params.GERRIT_REFSPEC,
+                           params.GERRIT_PATCHSET_REVISION,
+                           params.TEST_INSTALL,
+                           params.ARTIFACTORY_SERVER)
+}
diff --git a/devops-stages/stage-archive.sh b/devops-stages/stage-archive.sh
new file mode 100755 (executable)
index 0000000..9809bb9
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "ARCHIVE DONE"
diff --git a/devops-stages/stage-build.sh b/devops-stages/stage-build.sh
new file mode 100755 (executable)
index 0000000..80fb644
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+#make clean all
+echo "BUILD DONE"
diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh
new file mode 100755 (executable)
index 0000000..984f19f
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "UNITTEST DONE"