0

I have an SVN repo that only a subset of user's are allowed to access. I would like to have Jenkins checkout the repo and build it according the groovy script in the repo. However, when setting this up like my other pipelines BuildSlave fails due to not having permission to checkout the repo. There is an existing set of users with access to the repo but they do not have permission to start JAgent. Is there a way I can set up Jenkins such that there is some way to checkout the repo without unauthorized users being able to see the the pipeline or the SVN?

I have found https://stackoverflow.com/questions/42426804/restricting-others-to-build-the-particular-job-in-jenkins

which pointed me towards https://plugins.jenkins.io/role-strategy/

I think if I created a group in Jenkins that I would be able to define who can see the pipeline but that doesn't solve the SVN access. I am wary of adding BuildSlave to the SVN repo's whitelist. There is already a group account. I have been told adding this group account to Jenkins would allow unauthorized users to see the account. Is there a way to combine these role strategies with the group account to get what I want?

My team is currently thinking of setting up a separate Jenkins server to deal with the restricted project. How does that solution compare to built-in alternatives?

0

In the pipeline post actions you can use this:

post {
  always {
    deleteDir() // clean up our workspace
  }
}

What way no files in the workspace remain. You have to either copy the file you want to keep or save them as artefacts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.