Get current git branch in plugin securely

11 views
Skip to first unread message

Dário Nascimento

unread,
Aug 14, 2018, 7:44:56 AM8/14/18
to jenkin...@googlegroups.com
Hi,

I want to execute a plugin using Jenkinsfile pipeline and I want that plugin to have the context (branch & job) without user interference. This plugin generates a token identifying the job so we can authenticate with other services.
If I allow users to set the branch as env var, then the token content is compromised and my plugin is insecure. This is critical to developing a secure self-service CI/CD. How can I do it?

Thanks

Daniel Beck

unread,
Aug 14, 2018, 8:21:16 AM8/14/18
to jenkin...@googlegroups.com

> On 12. Aug 2018, at 13:40, Dário Nascimento <dfrnas...@gmail.com> wrote:
>
> I want to execute a plugin using Jenkinsfile pipeline and I want that plugin to have the context (branch & job) without user interference. This plugin generates a token identifying the job so we can authenticate with other services.
> If I allow users to set the branch as env var, then the token content is compromised and my plugin is insecure. This is critical to developing a secure self-service CI/CD. How can I do it?
>

https://jenkins.io/blog/2018/05/15/incremental-deployment/ might help you.
Reply all
Reply to author
Forward
0 new messages