I haven't found a way how to configure the plugin via CasC. There's nothing in the exported YAML or anywhere else.

       

      It would be great to have the support.

          [JENKINS-55595] S3 plugin Configuration as Code support

          Jiri Holusa added a comment -

          jimilian I was digging through the code.

          I tried following snippet:

          {color:#000080}s3upload:
          {color}{color:#000080}  profiles:
          {color}     - {color:#000080}name: {color}{color:#008000}"jenkins-profile"
          {color}       {color:#000080}accessKey: {color}{color:#008000}"haha"
          {color}       {color:#000080}secretKey: {color}{color:#008000}"haha"{color}
          
          

           

          But it didn't work with stacktrace:

          Invalid configuration elements for type class hudson.plugins.s3.S3BucketPublisher$DescriptorImpl : profiles.
          
          

           

          So kept digging. I think it's not possible because https://github.com/jenkinsci/s3-plugin/blob/master/src/main/java/hudson/plugins/s3/S3BucketPublisher.java#L394 , the field is private and there is no constructor for it. Now I'm stuck. I'm willing to invest some time into this and make it work, but I need some guidenance. Any thoughts? Or perhaps ndeloof ?

          Jiri Holusa added a comment - jimilian I was digging through the code. I tried following snippet: {color:#000080}s3upload: {color}{color:#000080}  profiles: {color}     - {color:#000080}name: {color}{color:#008000} "jenkins-profile" {color}       {color:#000080}accessKey: {color}{color:#008000} "haha" {color}       {color:#000080}secretKey: {color}{color:#008000} "haha" {color}   But it didn't work with stacktrace: Invalid configuration elements for type class hudson.plugins.s3.S3BucketPublisher$DescriptorImpl : profiles.   So kept digging. I think it's not possible because https://github.com/jenkinsci/s3-plugin/blob/master/src/main/java/hudson/plugins/s3/S3BucketPublisher.java#L394 , the field is private and there is no constructor for it. Now I'm stuck. I'm willing to invest some time into this and make it work, but I need some guidenance. Any thoughts? Or perhaps ndeloof ?

          Jiri Holusa added a comment -

          I figured it out and sent a PR: https://github.com/jenkinsci/s3-plugin/pull/118

          Jiri Holusa added a comment - I figured it out and sent a PR: https://github.com/jenkinsci/s3-plugin/pull/118

            jholusa Jiri Holusa
            jholusa Jiri Holusa
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: