Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDAP-53 Create jenkins build #6

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!groovy


pipeline{
agent any

parameters {
string(defaultValue: '', description: 'Branch of the incubator-sdap-nexusproto project to build against. Leave blank to use version from pip specified in requirements (this does not currently work).', name: 'buildNexusprotoBranch')
}

stages{
stage("Build nexusproto From Source"){
agent {
docker {
image 'maven:3-jdk-8'
args '-v $HOME/.m2:/root/.m2'
}
}
when{
expression { return params.buildNexusprotoBranch ==~ /SDAP-\d+/ }
}
steps{
git branch: "${params.buildNexusprotoBranch}", credentialsId: 'fgreg-github', url: 'https://github.com/apache/incubator-sdap-nexusproto'
sh './gradlew clean build tarPython'
stash includes: 'distribution/*.tar.gz', name: 'nexusproto'
}
}
stage("Build"){
agent {
docker {
image 'continuumio/miniconda3:latest'
args '-v $HOME/.conda:/.conda/pkgs'
}
}
steps{
unstash 'nexusproto'
sh "pip install distribution/*.tar.gz"
git branch: "${env.BRANCH_NAME}", credentialsId: 'fgreg-github', url: 'https://github.com/apache/incubator-sdap-ningesterpy'
sh 'python setup.py sdist'
}
}
}
post {
always {
archiveArtifacts artifacts: 'dist/*.tar.gz', fingerprint: true, onlyIfSuccessful: true
}
}
}