Skip to content

joostvdg/mkdocs-docker-build-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MKDocs Docker Build Container

GitHub release license Docker Pulls

This is a docker container for being able to build a site with MKDocs.

It includes MKDocs Material which is a highly recommendable theme.

For more information, see the requirements.txt.

Buy Me a Coffee at ko-fi.com-

Jenkins 2.0 & Pipeline

This is image is made and maintained for the use in Jenkins pipelines.

Either via the Groovy based Pipeline DSL or the declarative pipeline syntax.

Groovy DSL

node('docker') {
    stage('SCM') {
        checkout scm
    }

    stage('Build Docs') {
        docker.image('caladreas/mkdocs-docker-build-container').inside {
            sh 'mkdocs build'
        }

    }
}

Declarative

pipeline {
    agent none
    options {
        timeout(time: 10, unit: 'MINUTES')
        timestamps()
        buildDiscarder(logRotator(numToKeepStr: '5'))
    }
    stages {
        stage('Checkout'){
            agent { label 'docker' }
            steps {
                checkout scm
            }
        }
        stage('Build Docs') {
            agent {
                docker {
                    image "caladreas/mkdocs-docker-build-container"
                    label "docker"
                }
            }
            steps {
                sh 'mkdocs build'
            }
        }
    }
}