Skip to content

Commit

Permalink
Making Jenkins great again!
Browse files Browse the repository at this point in the history
  • Loading branch information
Halvor Platou committed Jun 21, 2019
1 parent f47cdaa commit 7d00c7f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
1 change: 1 addition & 0 deletions .dockerfiles/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RUN apt-get update && \
cmake \
doxygen \
git \
flex \
libboost-all-dev \
libevent-dev \
libzip-dev \
Expand Down
1 change: 1 addition & 0 deletions .dockerfiles/Dockerfile.conan-build
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN apt-get update && \
build-essential \
doxygen \
git \
flex \
python3-setuptools \
python3-wheel \
python3-pip \
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*.swp
build/
debug-build/
release-build/

# JetBrains CLion:
.idea/
Expand Down
32 changes: 14 additions & 18 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
pipeline {
agent none

environment {
CONAN_USER_HOME_SHORT = 'None'
OSP_CONAN_CREDS = credentials('jenkins-osp-conan-creds')
CSE_CONAN_CHANNEL = "${env.BRANCH_NAME}".replaceAll("/", "_")
}

options { checkoutToSubdirectory('cse-core') }

stages {
Expand All @@ -11,12 +17,9 @@ pipeline {
agent { label 'windows' }

environment {
CONAN_USER_HOME = "${env.BASE}\\conan-repositories\\${env.EXECUTOR_NUMBER}"
CONAN_USER_HOME_SHORT = "${env.CONAN_USER_HOME}"
OSP_CONAN_CREDS = credentials('jenkins-osp-conan-creds')
CSE_CONAN_CHANNEL = "${env.BRANCH_NAME}".replaceAll("/", "_")
CONAN_USER_HOME = "${env.SLAVE_HOME}/conan-repositories/${env.EXECUTOR_NUMBER}"
}

stages {
stage('Configure Conan') {
steps {
Expand Down Expand Up @@ -109,17 +112,15 @@ pipeline {
agent { label 'windows' }

environment {
CONAN_USER_HOME = "${env.BASE}\\conan-repositories\\${env.EXECUTOR_NUMBER}"
CONAN_USER_HOME_SHORT = "${env.CONAN_USER_HOME}"
OSP_CONAN_CREDS = credentials('jenkins-osp-conan-creds')
CSE_CONAN_CHANNEL = "${env.BRANCH_NAME}".replaceAll("/", "_")
CONAN_USER_HOME = "${env.SLAVE_HOME}/conan-repositories/${env.EXECUTOR_NUMBER}"
}

stages {
stage('Configure Conan') {
steps {
sh 'conan remote add osp https://osp-conan.azurewebsites.net/artifactory/api/conan/conan-local --force'
sh 'conan remote add helmesjo https://api.bintray.com/conan/helmesjo/public-conan --force'
sh 'conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan --force'
sh 'conan user -p $OSP_CONAN_CREDS_PSW -r osp $OSP_CONAN_CREDS_USR'
}
}
Expand All @@ -139,15 +140,12 @@ pipeline {
filename 'Dockerfile.conan-build'
dir 'cse-core/.dockerfiles'
label 'linux && docker'
args '-v ${HOME}/jenkins_slave/conan-repositories/${EXECUTOR_NUMBER}:/conan_repo'
args '-v ${SLAVE_HOME}/conan-repositories/${EXECUTOR_NUMBER}:/conan_repo'
}
}

environment {
CONAN_USER_HOME = '/conan_repo'
CONAN_USER_HOME_SHORT = 'None'
OSP_CONAN_CREDS = credentials('jenkins-osp-conan-creds')
CSE_CONAN_CHANNEL = "${env.BRANCH_NAME}".replaceAll("/", "_")
}

stages {
Expand Down Expand Up @@ -244,22 +242,20 @@ pipeline {
filename 'Dockerfile.conan-build'
dir 'cse-core/.dockerfiles'
label 'linux && docker'
args '-v ${HOME}/jenkins_slave/conan-repositories/${EXECUTOR_NUMBER}:/conan_repo'
args '-v ${SLAVE_HOME}/conan-repositories/${EXECUTOR_NUMBER}:/conan_repo'
}
}

environment {
CONAN_USER_HOME = '/conan_repo'
CONAN_USER_HOME_SHORT = 'None'
OSP_CONAN_CREDS = credentials('jenkins-osp-conan-creds')
CSE_CONAN_CHANNEL = "${env.BRANCH_NAME}".replaceAll("/", "_")
}

stages {
stage('Configure Conan') {
steps {
sh 'conan remote add osp https://osp-conan.azurewebsites.net/artifactory/api/conan/conan-local --force'
sh 'conan remote add helmesjo https://api.bintray.com/conan/helmesjo/public-conan --force'
sh 'conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan --force'
sh 'conan user -p $OSP_CONAN_CREDS_PSW -r osp $OSP_CONAN_CREDS_USR'
}
}
Expand Down Expand Up @@ -294,7 +290,7 @@ pipeline {
}
stage('Build Release') {
steps {
dir('release-build ') {
dir('release-build') {
sh 'cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install/linux/release -DCSECORE_USING_CONAN=FALSE -DCSECORE_BUILD_PRIVATE_APIDOC=ON ../cse-core'
sh 'cmake --build .'
sh 'cmake --build . --target install'
Expand Down

0 comments on commit 7d00c7f

Please sign in to comment.