-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add secret variables expansion from CNode value #3
base: master
Are you sure you want to change the base?
Add secret variables expansion from CNode value #3
Conversation
2ba7033
to
f47a3d7
Compare
f47a3d7
to
8dc7868
Compare
could you review my pull request please ? |
Could You add an example to the |
I added demo file, as requested. |
When will you merge this and release a new version of the plugin? I really need this |
OK, I will try today's evening.
Honestly I am looking for a co-maintainer, because I heavily lack time
pon., 12 paź 2020 o 11:30 danielraq <[email protected]> napisał(a):
… When will you merge this and release a new version of the plugin? I really
need this
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC7SR3DBPZ4G4FAXLPOFMWDSKLEEJANCNFSM4JM4IHLQ>
.
|
THX |
@szandala I'll happily help get this over the line 👍 |
src/main/java/io/jenkins/plugins/cascgroovy/GroovyScriptCaller.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor nitpicks
src/main/java/io/jenkins/plugins/cascgroovy/GroovyScriptCaller.java
Outdated
Show resolved
Hide resolved
pom.xml
Outdated
@@ -58,7 +58,7 @@ | |||
<dependency> | |||
<groupId>io.jenkins</groupId> | |||
<artifactId>configuration-as-code</artifactId> | |||
<version>1.0</version> | |||
<version>1.32</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest bumping to 1.42 as ordinal was fixed in 1.41 and secret resolver was improved in 1.42
<version>1.32</version> | |
<version>1.42</version> |
Parent pom should be bumped as well
f5b73e4
to
316f5bf
Compare
Tried adding a simple test. The test only seem to work from script console. groovy:
- script: |
import jenkins.model.Jenkins;
def systemMessage = "Hello World";
def jenkins = Jenkins.get();
jenkins.setSystemMessage(systemMessage);
jenkins.save();
|
623e29c
to
9fee9aa
Compare
@szandala @ziouf @danielraq perhaps one of you would be willing to test the HPI: https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fconfiguration-as-code-groovy-plugin/detail/PR-3/15/artifacts I would love to have test that actually works 😓 |
I was in dire need of this functionality, so I tried to use this implementation, but sadly it is severely broken. It causes the entire CASC plugin to fail to load other configuration. I have not been able to determine the root cause yet, but I'm guessing it is the rewrite of the groovy code processing that causes it. So for now, I'll have to revert to the published version and use some other mechanisms to inject secrets. I will try to get more time to keep looking into what is causing the failure. The scary thing is that it doesn't fail in a clear and obvious way. Instead jenkins starts, its just that some configuration will simply not have been loaded. Looking in the logs, I can see that the CASC plugin doesn't know how to dispatch the configuration that fails to load. Reverting back to the published version and everything works again. |
Ya, would be nice to add tests to see if this actually works. I tried adding tests but I think I ran into the same problem your describing. |
Is there any work around for the lack of this functionality? Update/edit I'm using this as a work around:
|
@kylegibson , where does Btw. this functionality would still be nice, five years later. Appreciated if you could make time for it. |
@bn-jbischko I corrected the code snippet to address your question. Hopefully it makes sense now. |
I faced jCasC secrets variables expansion issue with jCasC-Groovy plugin.
So I made this PR to implement usage of jCasC secrets feature.
As an example, this allows to setup secret token in URL to authenticate remote server.
Before, the following example wasn't working.
Regards