Add jenkinsfile for pipeline build and dockerfile for build

master
Brian Rosenberger 2022-09-24 10:46:55 +02:00
parent 597abdf063
commit a31fbb9942
4 changed files with 76 additions and 11 deletions

7
.docker/Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM nvidia/cuda:11.4.0-devel-ubuntu20.04
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-11-jdk wget build-essential checkinstall zlib1g-dev libssl-dev
RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2.tar.gz && \
tar -xvf cmake-3.24.2.tar.gz && cd cmake-3.24.2 && \
./bootstrap && make && make install

View File

@ -134,6 +134,20 @@ allprojects { Project proj ->
} }
*/ */
/*
maven {
name = 'localGitea'
def releasesRepoUrl = 'http://bru3-pc.fritz.box:3000/api/packages/brutex/maven'
def snapshotsRepoUrl = 'http://bru3-pc.fritz.box:3000/api/packages/brutex/maven'
url = proj.version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
allowInsecureProtocol = true
credentials {
username = mavenuser
password = mavenpass
}
}
*/
} }
} }
} }

View File

@ -17,7 +17,7 @@ ext {
def javacv = [version:"1.5.6"] def javacv = [version:"1.5.6"]
def opencv = [version: "4.5.3"] def opencv = [version: "4.5.3"]
def leptonica = [version: "1.81.1"] def leptonica = [version: "1.81.1"]
def junit = [version: "5.7.1"] def junit = [version: "5.9.1"]
def flatbuffers = [version: "1.10.0"] def flatbuffers = [version: "1.10.0"]

44
jenkinsfile Normal file
View File

@ -0,0 +1,44 @@
pipeline {
agent {
dockerfile {
filename 'Dockerfile'
dir '.docker'
label 'linuxdocker'
//additionalBuildArgs '--build-arg version=1.0.2'
args '--gpus all'
}
}
stages {
stage('prep-build-environment') {
steps {
//git poll: false, url: 'http://bru3-pc.fritz.box:3000/Brutex/ci-deeplearning4j.git'
sh 'nvidia-smi'
sh 'nvcc --version'
sh 'gcc --version'
sh 'cmake --version'
checkout scm
}
}
stage('build') {
environment {
MAVEN = credentials('Internal Archiva')
OSSRH = credentials('OSSRH')
}
steps {
sh 'chmod u+x ./gradlew && ls -la'
sh './gradlew --version'
withGradle {
sh './gradlew build --stacktrace --no-watch-fs -x test -PCAVIS_CHIP=cuda -Pmavenuser=$MAVEN_USR -Pmavenpass=$MAVEN_PSW -PossrhUsername=$OSSRH_USR -PossrhPassword=$OSSRH_PSW'
}
}
}
}
}