Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52304

Make the plugin fully configurable via configuration-as-code

    • Artifact Manager S3 1.0

      Hello, to be honest, I'm not 100% sure if this issue can be solved on CasC side alone. It seems not. I'm filing it here hoping this will be more obvious to the developer(s) of the plugin.

      So, I was able to configure the blob store itself, but didn't find a way to make Jenkins' artifactManager use it.

      unclassified:   s3blobstoreconfig:     container: "${ARTIFACT_MANAGER_S3_BUCKET_NAME}"
          region: "us-east-1"
          prefix: "twiddling/"
      

      And this worked fine, for the artifactManager part, though, I tried many combinations to no avail for now. I think I'd need some way to cross-reference the s3blobstoreconfig above, but I do not think it is possible and if this is the right path. Likely not.

      Does not work:

       artifactManager:    artifactManagerFactories:      - JCloudsArtifactManagerFactory
      

      NOTE: I have a testing image available if anyone needs anything.

          [JENKINS-52304] Make the plugin fully configurable via configuration-as-code

          Baptiste Mathus created issue -
          Baptiste Mathus made changes -
          Description Original: Hello, to be honest, I'm not 100% sure if this issue can be solved on CasC side alone. It seems not. I'm filing it here hoping this will be more obvious to the developer(s) of the plugin.

          So, I was able to configure the blob store itself, but didn't find a way to make Jenkins' {{artifactManager}} use it.

          {code:yaml}
          unclassified:
            s3blobstoreconfig:
              container: "${ARTIFACT_MANAGER_S3_BUCKET_NAME}"
              region: "us-east-1"
              prefix: "twiddling/"
          {code}

          And this worked fine, for the artifactManager part, though, I tried many combinations to no avail for now. I _think_ I'd need some way to cross-reference the s3blobstoreconfig above, but I do not think it is possible and if this is the right path. Likely not.

          Does not work:
          {code:yaml}
           artifactManager:
             artifactManagerFactories:
               - JCloudsArtifactManagerFactory
          {code}

          h3. What
          New: Hello, to be honest, I'm not 100% sure if this issue can be solved on CasC side alone. It seems not. I'm filing it here hoping this will be more obvious to the developer(s) of the plugin.

          So, I was able to configure the blob store itself, but didn't find a way to make Jenkins' {{artifactManager}} use it.

          {code:yaml}
          unclassified:
            s3blobstoreconfig:
              container: "${ARTIFACT_MANAGER_S3_BUCKET_NAME}"
              region: "us-east-1"
              prefix: "twiddling/"
          {code}

          And this worked fine, for the artifactManager part, though, I tried many combinations to no avail for now. I _think_ I'd need some way to cross-reference the s3blobstoreconfig above, but I do not think it is possible and if this is the right path. Likely not.

          Does not work:
          {code:yaml}
           artifactManager:
             artifactManagerFactories:
               - JCloudsArtifactManagerFactory
          {code}

          NOTE: I have a testing image available if anyone needs anything.
          Oleg Nenashev made changes -
          Labels Original: essentials essentials-triggered New: essentials essentials-triggered jcasc-compatibility
          Oleg Nenashev made changes -
          Link New: This issue relates to JENKINS-50571 [ JENKINS-50571 ]
          CloudBees Inc. made changes -
          Remote Link New: This issue links to "CloudBees Internal ARC-466 (Web Link)" [ 21146 ]

          Jesse Glick added a comment -

          S3BlobStoreConfig should have @Symbol("s3BlobStore") or similar to be pretty, and likewise JCloudsArtifactManagerFactory should have @Symbol("jclouds") to be pretty. Other than that, what you are missing is something to configure provider to refer to a S3BlobStore (which also ought to have @Symbol("s3")). IOW you should already be able to configure it, albeit using ugly symbols.

          Jesse Glick added a comment - S3BlobStoreConfig should have @Symbol("s3BlobStore") or similar to be pretty, and likewise JCloudsArtifactManagerFactory should have @Symbol("jclouds") to be pretty. Other than that, what you are missing is something to configure provider to refer to a S3BlobStore (which also ought to have @Symbol("s3") ). IOW you should already be able to configure it, albeit using ugly symbols.
          Baptiste Mathus made changes -
          Link New: This issue blocks JENKINS-50519 [ JENKINS-50519 ]

          Baptiste Mathus added a comment - - edited

          Added a PR showing what currently works, and what does not yet (https://github.com/jenkinsci/configuration-as-code-plugin/pull/347).

          Baptiste Mathus added a comment - - edited Added a PR showing what currently works, and what does not yet ( https://github.com/jenkinsci/configuration-as-code-plugin/pull/347 ).
          Baptiste Mathus made changes -
          Remote Link New: This issue links to "PR (Web Link)" [ 21165 ]
          Jesse Glick made changes -
          Assignee New: Jesse Glick [ jglick ]

            jglick Jesse Glick
            batmat Baptiste Mathus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: