Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

jenkinsfile docker

pipeline {
    agent { label 'master' }
    stages {
        stage('build') {
            steps {
                script {
                    def disk_size = sh(script: "df / --output=avail | tail -1", returnStdout: true).trim() as Integer
                    println("disk_size = ${disk_size}")
                }
            }
        }
    }
}
Source by code-maven.com #
 
PREVIOUS NEXT
Tagged: #jenkinsfile #docker
ADD COMMENT
Topic
Name
6+2 =