1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-03 14:25:38 +02:00

jenkinsfile: add minimum build

Change-Id: I2dfc7669e7587ed71410b48ac2d12ee4638638a1
This commit is contained in:
Sébastien Blin 2022-12-02 11:45:34 -05:00
parent dc77833c7e
commit 63f7fca2df

View file

@ -85,7 +85,7 @@ pipeline {
}
}
/*stage('Build project') {
stage('Build project') {
steps {
script {
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') {
container -> code:{
def base_cmd = 'docker exec -t '+container.id+" sh -c '"
def exec_cmd = { cmd -> sh base_cmd+cmd+"'" }
stages {
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 daemonDir = dockerTopDir + '/daemon'
def clientDir = dockerTopDir + '/client-qt'
def installDir = dockerTopDir + '/install'
stage('Build Client') {
steps {
script {
ansiColor('css') {
exec_cmd("""
cd ${clientDir}
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${installDir}/client-qt \
-DLIBJAMI_INCLUDE_DIR=${daemonDir}/src/jami \
-DLIBJAMI_XML_INTERFACES_DIR=${daemonDir}/bin/dbus \
-DCMAKE_PREFIX_PATH=/usr/lib/libqt-jami \
-DENABLE_TESTS=True
make -j${cpuCount}
make install
""")
def dockerTopDir = '/foo'
def daemonDir = dockerTopDir + '/daemon'
def clientDir = dockerTopDir + '/client-qt'
def installDir = dockerTopDir + '/install'
ansiColor('css') {
exec_cmd("""
cd ${clientDir}
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${installDir}/client-qt \
-DLIBJAMI_INCLUDE_DIR=${daemonDir}/src/jami \
-DLIBJAMI_XML_INTERFACES_DIR=${daemonDir}/bin/dbus \
-DCMAKE_PREFIX_PATH=/usr/lib/libqt-jami \
-DENABLE_TESTS=True
make -j${cpuCount}
make install
""")
}
}
}
}
}
stage('Run Tests') {
steps {
script {
ansiColor('css') {
exec_cmd("""
cd ${clientDir}
cd tests/qml
../../../build/tests/qml_tests
""")
stage('Run Tests') {
steps {
script {
def base_cmd = 'docker exec -t '+container.id+" sh -c '"
def exec_cmd = { cmd -> sh base_cmd+cmd+"'" }
def dockerTopDir = '/foo'
def clientDir = dockerTopDir + '/client-qt'
ansiColor('css') {
exec_cmd("""
cd ${clientDir}
cd tests/qml
../../../build/tests/qml_tests
""")
}
}
}
}
@ -141,6 +147,6 @@ pipeline {
}
}
}
}*/
}
}
}