Jenkins configuration in JCAS

20 views
Skip to first unread message

Anu S

unread,
Jun 17, 2021, 3:51:39 AMJun 17
to Jenkins Users
Hi Everyone, 

i need one info to proceed with my work.

currently the new jenkins which my team is having - entire configuration is in JCAS(jenkins configuration as code) in a yaml stored in gitlab.

now for our current scenario  - we need to define, 3 jenkins global variable which will decide the job has to run or not.

to define it as global variable - i can do in yaml. - the thing is - we are going to change the values every now and then.

1. either change the value in yaml everytime - this might introduce any config error. any way we can avoid doing the change in yaml by changing it manually under manage jenkins - configure system. (the concern here is - any update in yaml will reset the value back to default for the 3 variable and the manual configuration will go off)

so any other way we can change the jenkins global variable value configured in JCAS? without any impact or change?

Regards,
Anu

Liejun Tao

unread,
Jun 17, 2021, 2:56:30 PMJun 17
to jenkins...@googlegroups.com
I assume when you put full configurations into JCasc, you already have a way to inject secrets into the config.
You may treat the (changeable) global variable as a secret which could be changed from outside (the secret management system).


--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1915a5af-c73d-4882-b4a8-4c62fd514786n%40googlegroups.com.


--
Thanks,
Baibai

Anu S

unread,
Jun 18, 2021, 12:49:46 AMJun 18
to jenkins...@googlegroups.com
Hi Liejun Tao,

let me check on this secret management system,
Any links to guide me on this?

thanks & Regards,
Anu

Liejun Tao

unread,
Jun 18, 2021, 11:12:11 AMJun 18
to jenkins...@googlegroups.com
The JCasC doc is here.
https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/features/secrets.adoc
It depends on whether you already have an external secret system. 




--
Thanks,
Baibai
Reply all
Reply to author
Forward
0 new messages