How to use Jenkinsfile in pipeline builds?

83 views
Skip to first unread message

Mark Allison

unread,
Jan 11, 2017, 3:10:36 PM1/11/17
to Jenkins Users
I have a pipeline build and I want to move it to source control. I've copied out the script from the the project into a Jenkinsfile and added it to git. In my pipeline I have code like this:

#!groovy​
node
{

        stage
('checkout') {

            deleteDir
()
            git
'http://git.server/markallison/my-project.git'
       
}
       
        stage
('build') {
           
// build code


           
}    

   
... etc

I like to have a clean workspace every time the build runs, so how do I do this without having to have a separate project for my Jenkinsfile?            

Mark Allison

unread,
Jan 11, 2017, 5:41:15 PM1/11/17
to Jenkins Users
Actually this works fine, ignore. I had misconfigured something.
Reply all
Reply to author
Forward
0 new messages