Skip to content
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

[JENKINS-55595] Configuration as code support #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Holmistr
Copy link

@Holmistr Holmistr commented Jan 18, 2019

https://issues.jenkins-ci.org/browse/JENKINS-55595

I had to change the list implementation because there was no configurator for CopyOnWriteList. Anyway, I don't see why it should be used, but perhaps I'm missing something. Feel free to point me to the right direction.

@darxriggs
Copy link

darxriggs commented Apr 20, 2019

@Jimilian could you have a look at this?

@darxriggs
Copy link

darxriggs commented Apr 20, 2019

I suggest to also implement an import from YAML and export to YAML test.

See the official documentation for implementing these here.

@HardHero
Copy link

HardHero commented May 8, 2019

Not sure the status of this, but I would love to see this PR merged. Is there a timeline on for this project in merging all this stuff?

Trying to eliminate all the manual config setup for our Jenkins and this is one of the items on the list. So glad to see a solution waiting when I checked on here. 👍

@oleg-nenashev oleg-nenashev requested a review from Jimilian Sep 16, 2019
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

It is not going to work as is unfortunately. The persistency model is being changed without retaining compatibility. If the data type needs to be changes to make the code compatible with JCasC, there should be a graceful data migration imho

@Holmistr
Copy link
Author

Holmistr commented Sep 16, 2019

Hi @oleg-nenashev , thanks for the feedback. Actually, I'm not sure how to proceed. Can you point me into the right direction?

@kpucynski
Copy link

kpucynski commented Nov 28, 2019

In the meantime you can use workaround by writing initscript.
Here is example for jenkins helm chart:

  # List of groovy init scripts to be executed during Jenkins master start
  initScripts:
  #  - |
  #    print 'adding global pipeline libraries, register properties, bootstrap jobs...'
      s3-uploader: |
          import jenkins.model.*
          import hudson.plugins.s3.*
          
          instance  = Jenkins.instance
          new_name  = "s3"
          accessKey = "key"
          secretKey = "secret"
          useRole   = false
          S3Profile profile = new S3Profile(new_name, accessKey, secretKey, useRole, 60, "", "", "", "", false);
          
          publisher = hudson.plugins.s3.S3BucketPublisher
          des       = new hudson.plugins.s3.S3BucketPublisher.DescriptorImpl();
          s3Plugin  = instance.getDescriptor(S3BucketPublisher.class);
          
          new_profiles = [];
          des.getProfiles().each { if (it.name != new_name) { new_profiles.push(it) } }
          new_profiles.push(profile)
          
          s3Plugin.replaceProfiles(new_profiles)

@sanga
Copy link

sanga commented Jun 11, 2020

What's the status of this? The lack of casc support for this plugin is kind of a deal breaker for us.

@Holmistr
Copy link
Author

Holmistr commented Jun 12, 2020

I'm still happy to do the changes, but to be honest I don't know what's needed.

@oleg-nenashev I have to admit that I didn't fully understand your comment. So you're saying that I cannot change the List implementation as it creates incompatibility. The reason I changed it was that there was no configurator for CopyOnWriteList. How difficult would it be to implement the configurator? Wouln't that be a preferred solution?

@oleg-nenashev oleg-nenashev self-requested a review Jun 12, 2020
@oleg-nenashev
Copy link
Member

oleg-nenashev commented Jun 12, 2020

Sorry, I missed your previous comment. Added it to my review queue

@Holmistr
Copy link
Author

Holmistr commented Jun 12, 2020

No problem. I know that maintaining something is hard. Thanks for doing this! :)

@sanga
Copy link

sanga commented Aug 24, 2020

@Holmistr Just came here to check if there had been any progress on this and it appears you have a merge conflict here now

@Holmistr
Copy link
Author

Holmistr commented Aug 24, 2020

@sanga I'm waiting for @oleg-nenashev 's answer on the comment #118 (comment) .

@mortenbirkelund
Copy link

mortenbirkelund commented Apr 13, 2022

@oleg-nenashev @Holmistr sorry for just tagging you guys, but was wondering if there is any updates?

@Holmistr
Copy link
Author

Holmistr commented Apr 14, 2022

Unfortunately not from my side :-(

@HatsuneMiku3939
Copy link

HatsuneMiku3939 commented Oct 25, 2022

Is there any update on this PR?

@Holmistr
Copy link
Author

Holmistr commented Oct 25, 2022

@HatsuneMiku3939 Nothing from my side. I'm still happy to adapt the PR but I need some support from the Jenkins side. On the other hand, it's no longer a priority for me, so I'm not actively pushing for it. If you get the info "what should be done", I'm happy to do it :)

@HatsuneMiku3939
Copy link

HatsuneMiku3939 commented Oct 25, 2022

@Holmistr Thanks for your effort. I understand the current situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants