Files
my-rook-config/Jenkinsfile
T
Bassam Tabbara e55fd55e7d build: rework release scripts and jenkinsfile
inital commit to convert release scripts to makefiles for improved maintenance.

now publishing to docker hub including manifest list support.

initial attempt at reworking the jenkinsfile to pipeline syntax.
2017-06-29 15:20:27 -07:00

57 lines
1.3 KiB
Groovy

// Rook build for Jenkins Pipelines
pipeline {
agent { label 'ec2-stateful' }
options {
timeout(time: 1, unit: 'HOURS')
timestamps()
}
environment {
PRUNE_HOURS = 48
PRUNE_KEEP = 48
}
stages {
stage('Build') {
steps {
sh 'build/run make -j\$(nproc) build.all'
}
}
stage('Unit Tests') {
steps {
sh 'build/run make -j\$(nproc) check'
}
}
stage('Publish') {
when {
anyOf {
branch 'master'
branch 'release-*'
}
}
environment {
DOCKER = credentials('rook-docker-hub')
QUAY = credentials('rook-quay-io')
AWS = credentials('rook-jenkins-aws')
}
steps {
sh 'docker login -u="${DOCKER_USR}" -p="${DOCKER_PSW}"'
sh 'docker login -u="${QUAY_USR}" -p="${QUAY_PSW}" quay.io'
sh 'build/run make -C build/release -j\$(nproc)'
sh 'build/run make -C build/release -j\$(nproc) publish'
}
}
}
post {
always {
sh 'make clean'
sh 'make prune'
deleteDir()
}
}
}