| |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | stage('Test') { |
---|
| | stage('Validate CSV') { |
---|
| | agent { |
---|
| | docker { |
---|
| | image 'cloudfluff/csvlint' |
---|
| | reuseNode true |
---|
| |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | stage('Upload draftset') { |
---|
| | stage('Upload Tidy Data') { |
---|
| | steps { |
---|
| | script { |
---|
| | jobDraft.replace() |
---|
| | uploadTidy(['out/observations.csv'], |
---|
| | "https://ons-opendata.github.io/${pipelineParams.refFamily}/columns.csv") |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | 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') { |
---|
| |
---|
| | post { |
---|
| | always { |
---|
| | script { |
---|
| | archiveArtifacts artifacts: 'out/*', excludes: 'out/*.html' |
---|
| | junit 'reports/**/*.xml' |
---|
| | publishHTML([ |
---|
| | allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, |
---|
| | reportDir: 'out', reportFiles: 'main.html', |
---|
| | reportName: 'Transform']) |
---|
| |
---|
| | } |
---|
| | |
---|
| | } |
---|
| | } |
---|
| | |
---|
| | |