Jenkins Pipeline Wipe Out Workspace

0 votes
I started using the pipeline plugin and its amamzing. But the problem is, its taking too much space. Is there any plugin that's compatible with Pipeline that I can wipe out the workspace on a successful build?
Aug 6, 2018 in Jenkins by Hannah
• 18,520 points
9,906 views

1 answer to this question.

0 votes

You should probably put it in a post-built-step conditionlike always:

pipeline {
    agent any
    stages {
        stage('Example') {
            steps {
                echo 'Hello World'
            }
        }
    }
    post {
        always {
            cleanWs()
        }
    }
}
answered Aug 6, 2018 by Kalgi
• 52,350 points

Related Questions In Jenkins

0 votes
1 answer
0 votes
0 answers
0 votes
2 answers
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,019 views
+2 votes
1 answer
+1 vote
3 answers
0 votes
1 answer

Empty Jenkins Workspace causing Jenkins build failure

/tmp/hudson3579240812233061648.sh: line 3: cd: /jenkins/workspace/completeness_compiler_runtime_tests/TPS/qel/automation/tools The error is ...READ MORE

answered Aug 8, 2018 in Jenkins by Kalgi
• 52,350 points
9,425 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP