Skip to content
Snippets Groups Projects
Commit 5083e2a7 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

jenkinsfile: prepare steps

Change-Id: If54b46f1f1c7629a728a97d0803d986d3d5cecd9
parent 31494c68
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,8 @@ pipeline { ...@@ -53,6 +53,8 @@ pipeline {
stages { stages {
stage('SCM Checkout') { stage('SCM Checkout') {
steps {
script {
deleteDir() deleteDir()
// Checkout jami-project to obtain daemon/LRC/client-qt repositories // Checkout jami-project to obtain daemon/LRC/client-qt repositories
sh """ sh """
...@@ -69,14 +71,23 @@ pipeline { ...@@ -69,14 +71,23 @@ pipeline {
git submodule update --init --recursive git submodule update --init --recursive
cd .. cd ..
""" """
topDir = pwd() + '/jami-project' }
}
} }
dir (topDir) {
stage('Building Docker Image') { stage('Building Docker Image') {
steps {
dir (pwd() + '/jami-project') {
script {
docker.build('client-validation', "-f client-qt/extras/build/docker/Dockerfile.client-qt-gnulinux --no-cache .") docker.build('client-validation', "-f client-qt/extras/build/docker/Dockerfile.client-qt-gnulinux --no-cache .")
} }
}
}
}
stage('Build project') {
steps {
script {
def jenkinsUID = sh(returnStdout: true, script: 'id -u jenkins').replaceAll("\n", '').trim() def jenkinsUID = sh(returnStdout: true, script: 'id -u jenkins').replaceAll("\n", '').trim()
def jenkinsGID = sh(returnStdout: true, script: 'id -g jenkins').replaceAll("\n", '').trim() def jenkinsGID = sh(returnStdout: true, script: 'id -g jenkins').replaceAll("\n", '').trim()
def jenkinsUser = jenkinsUID+':'+jenkinsGID def jenkinsUser = jenkinsUID+':'+jenkinsGID
...@@ -93,6 +104,8 @@ pipeline { ...@@ -93,6 +104,8 @@ pipeline {
def installDir = dockerTopDir + '/install' def installDir = dockerTopDir + '/install'
stage('Build Client') { stage('Build Client') {
steps {
script {
ansiColor('css') { ansiColor('css') {
exec_cmd(""" exec_cmd("""
cd ${clientDir} cd ${clientDir}
...@@ -108,8 +121,12 @@ pipeline { ...@@ -108,8 +121,12 @@ pipeline {
""") """)
} }
} }
}
}
stage('Run Tests') { stage('Run Tests') {
steps {
script {
ansiColor('css') { ansiColor('css') {
exec_cmd(""" exec_cmd("""
cd ${clientDir} cd ${clientDir}
...@@ -123,3 +140,8 @@ pipeline { ...@@ -123,3 +140,8 @@ pipeline {
} }
} }
} }
}
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment