Thank you for the clarification. I will share the error tomorrow regarding directory.
On Tue, 18 Apr 2023 at 5:59 PM, <[email protected]> wrote: > Hi Ashok > > > if I want to go to specific directory in jenkinsfile, how can we write > > groovy script > Jenkins pipeline aka jenkinsfile is a plain text file and does not have > directories inside - do I understand correctly that you want to refer to > some folder in build area or server/agent file system? I this is what you > want then the best option is definition of environment variables in your > pipeline/jenkinsfile and using them in scripts/definitions. Jenkins manual ( > https://www.jenkins.io/doc/book/pipeline/ ) has detailed information > about pipelines. > > As to cleaning the workspace: unfortunately, Jenkins plugin does NOT > support exclude filter. There are two options: > 1. cleanWs call should have an explicit list of the folders to clean - the > large number of the folders may be a proiblem > 2. Second apporach requires special structuring of the Jenkins build space > - the whole area defined for Jenkins build space is organised as set of > folders designated for individual jobs ans set of folders that keep data > persistent between jobs. For first set of the folders cleanWs can be used > without necessity to filter content, for second set of folders you may have > a separate housekeeping process. This approach would be my preferred option > as it provides greateer flexibility. With this approach you need to have a > set of the environment variables that enable the required structuring and > access. > > > Regards, > Nick > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKRLcHiYbYv%2B%3D%2BGx1nf2SRPA%3Dje5_3DEX6uzBqWY_VKxV_ZG-w%40mail.gmail.com.
