Newer
Older
DataReport / Jenkinsfile
pipeline {
    agent {
        label 'master'
    }
    triggers{
        cron('H 2 * * 0')
    }
    stages {
        stage('Clean') {
            steps {
                sh 'rm -rf out'
                sh 'mkdir out'
            }
        }
        stage('Family scope report') {
            agent {
                docker {
                    image 'gsscogs/databaker'
                    reuseNode true
                    alwaysPull true
                }
            }
            steps {
                sh 'jupyter-nbconvert --to html --output-dir=out --execute family-scope/family-scope.ipynb'
                sh 'jupyter-nbconvert --to html --output-dir=out --execute family-scope/geo-scope.ipynb'
                sh 'cp family-scope/*.html out/'
            }
        }
        stage('Dataset size report') {
            agent {
                dockerfile {
                    args '-u root:root'
                    reuseNode true
                }
            }
            steps {
                sh 'jupyter-nbconvert --to html --output-dir=out --execute dataset-stats/size.ipynb'
                sh 'cp dataset-stats/dataset-stats.html out/'
            }
        }
    }
    post {
        always {
            publishHTML([
                allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true,
                reportDir: 'out', reportFiles: 'dataset-dimensions.html,dataset-dimensions-geo.html,dataset-stats.html,size.html',
                reportName: 'Dataset Reports', reportTitles: 'Family Scope,Geo Scope,Size,Notebook'])
            archiveArtifacts 'out/*.html'
        }
    }
}