diff --git a/vars/transformPipeline.groovy b/vars/transformPipeline.groovy index 1ee1841..9e8446c 100644 --- a/vars/transformPipeline.groovy +++ b/vars/transformPipeline.groovy @@ -33,7 +33,7 @@ } } } - stage('Test') { + stage('Validate CSV') { agent { docker { image 'cloudfluff/csvlint' @@ -48,7 +48,7 @@ } } } - stage('Upload draftset') { + stage('Upload Tidy Data') { steps { script { jobDraft.replace() @@ -57,6 +57,26 @@ } } } + stage('Test draft dataset') { + agent { + docker { + image 'cloudfluff/gdp-sparql-tests' + reuseNode true + } + } + steps { + script { + pmd = pmdConfig("pmd") + String draftId = pmd.drafter.findDraftset(env.JOB_NAME).id + String endpoint = pmd.drafter.getDraftsetEndpoint(draftId) + String dspath = util.slugise(env.JOB_NAME) + String dsgraph = "${pmd.config.base_uri}/graph/${dspath}" + withCredentials([usernamePassword(credentialsId: pmd.config.credentials, usernameVariable: 'USER', passwordVariable: 'PASS')]) { + sh "sparql-test-runner -t /usr/local/tests -s ${endpoint} -a '${USER}:${PASS}' -p \"dsgraph=<${dsgraph}>\"" + } + } + } + } stage('Publish') { steps { script { @@ -69,6 +89,7 @@ always { script { archiveArtifacts artifacts: 'out/*', excludes: 'out/*.html' + junit 'reports/**/*.xml' publishHTML([ allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'out', reportFiles: 'main.html', @@ -84,4 +105,4 @@ } } -} \ No newline at end of file +}