mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-07 00:05:54 +02:00
jenkinsfile: add minimum build
Change-Id: I2dfc7669e7587ed71410b48ac2d12ee4638638a1
This commit is contained in:
parent
dc77833c7e
commit
63f7fca2df
1 changed files with 41 additions and 35 deletions
76
extras/ci/client-qt-gnulinux/Jenkinsfile
vendored
76
extras/ci/client-qt-gnulinux/Jenkinsfile
vendored
|
@ -85,7 +85,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*stage('Build project') {
|
stage('Build project') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
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()
|
||||||
|
@ -95,44 +95,50 @@ pipeline {
|
||||||
|
|
||||||
docker.image('client-validation').withRun('-t -u '+jenkinsUser+' -v '+pwd()+':/foo:rw -w /foo -e BATCH_MODE=1', '/bin/bash') {
|
docker.image('client-validation').withRun('-t -u '+jenkinsUser+' -v '+pwd()+':/foo:rw -w /foo -e BATCH_MODE=1', '/bin/bash') {
|
||||||
container -> code:{
|
container -> code:{
|
||||||
def base_cmd = 'docker exec -t '+container.id+" sh -c '"
|
stages {
|
||||||
def exec_cmd = { cmd -> sh base_cmd+cmd+"'" }
|
stage('Build Client') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
def base_cmd = 'docker exec -t '+container.id+" sh -c '"
|
||||||
|
def exec_cmd = { cmd -> sh base_cmd+cmd+"'" }
|
||||||
|
|
||||||
def dockerTopDir = '/foo'
|
def dockerTopDir = '/foo'
|
||||||
def daemonDir = dockerTopDir + '/daemon'
|
def daemonDir = dockerTopDir + '/daemon'
|
||||||
def clientDir = dockerTopDir + '/client-qt'
|
def clientDir = dockerTopDir + '/client-qt'
|
||||||
def installDir = dockerTopDir + '/install'
|
def installDir = dockerTopDir + '/install'
|
||||||
|
ansiColor('css') {
|
||||||
stage('Build Client') {
|
exec_cmd("""
|
||||||
steps {
|
cd ${clientDir}
|
||||||
script {
|
mkdir build
|
||||||
ansiColor('css') {
|
cd build
|
||||||
exec_cmd("""
|
cmake .. -DCMAKE_INSTALL_PREFIX=${installDir}/client-qt \
|
||||||
cd ${clientDir}
|
-DLIBJAMI_INCLUDE_DIR=${daemonDir}/src/jami \
|
||||||
mkdir build
|
-DLIBJAMI_XML_INTERFACES_DIR=${daemonDir}/bin/dbus \
|
||||||
cd build
|
-DCMAKE_PREFIX_PATH=/usr/lib/libqt-jami \
|
||||||
cmake .. -DCMAKE_INSTALL_PREFIX=${installDir}/client-qt \
|
-DENABLE_TESTS=True
|
||||||
-DLIBJAMI_INCLUDE_DIR=${daemonDir}/src/jami \
|
make -j${cpuCount}
|
||||||
-DLIBJAMI_XML_INTERFACES_DIR=${daemonDir}/bin/dbus \
|
make install
|
||||||
-DCMAKE_PREFIX_PATH=/usr/lib/libqt-jami \
|
""")
|
||||||
-DENABLE_TESTS=True
|
}
|
||||||
make -j${cpuCount}
|
|
||||||
make install
|
|
||||||
""")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
stage('Run Tests') {
|
stage('Run Tests') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
ansiColor('css') {
|
def base_cmd = 'docker exec -t '+container.id+" sh -c '"
|
||||||
exec_cmd("""
|
def exec_cmd = { cmd -> sh base_cmd+cmd+"'" }
|
||||||
cd ${clientDir}
|
|
||||||
cd tests/qml
|
def dockerTopDir = '/foo'
|
||||||
../../../build/tests/qml_tests
|
def clientDir = dockerTopDir + '/client-qt'
|
||||||
""")
|
ansiColor('css') {
|
||||||
|
exec_cmd("""
|
||||||
|
cd ${clientDir}
|
||||||
|
cd tests/qml
|
||||||
|
../../../build/tests/qml_tests
|
||||||
|
""")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,6 +147,6 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue