pipeline {
agent any
parameters {
string(name: 'GraphUri', defaultValue: 'https://w3id.org/data2services/graph/biolink/date', description: 'URI of the Graph to validate')
string(name: 'SparqlRepositoryUri', defaultValue: 'https://graphdb.dumontierlab.com/repositories/public/statements', description: 'URI of the repository used to insert the computed statistics')
string(name: 'TriplestoreUsername', defaultValue: 'import_user', description: 'Username for the triplestore')
string(name: 'TriplestorePassword', defaultValue: 'changeme', description: 'Password for the triplestore')
}
stages {
stage('Build and install') {
steps {
sh "git clone --recursive https://github.com/MaastrichtU-IDS/d2s-transform-repository.git"
sh 'docker pull umids/d2s-sparql-operations'
}
}
stage('Compute and insert statistics') {
steps {
sh "docker run -t --rm --volumes-from jenkins-container umids/d2s-sparql-operations -rq '$WORKSPACE/d2s-transform-repository/sparql/compute-statistics' -url '${params.SparqlRepositoryUri}' -un ${params.TriplestoreUsername} -pw ${params.TriplestorePassword} --var-input:${params.GraphUri}"
}
}
}
post {
always {
//archiveArtifacts artifacts: 'results/*', onlyIfSuccessful: true // archive contents in results folder
deleteDir()
cleanWs()
}
}
}