configuration-as-code-plugin icon indicating copy to clipboard operation
configuration-as-code-plugin copied to clipboard

AWS (S3 and credential) setting doesn't get created automatically after declaring in values.yaml

Open soham-chakraborty1 opened this issue 2 years ago • 0 comments

Your checklist for this issue

🚨 Please review the Support Policy

  • [x] The question was asked in the project's Gitter chat
  • [x] Jenkins version
  • [x] Plugin version
  • [x] OS
  • [x] Reproduction steps

Description

Please describe your issue here, and explain what you have already tried to resolve it.

Jenkins version: 2.361.2 configuration-as-code plugin version: 1559.v38a_b_2e3b_6b_b_7 OS: k8s 1.20.7 Reproduction steps: Jenkins is installed with helm chart with a customized values.yaml file. The relevant section of the AWS configuration that is not working is shown below:

controller:
  <OMITTED>

  JCasC:
    defaultConfig: true
    configScripts:
      jenkins-configuration: |
        jenkins:
          systemMessage: This Jenkins is configured and managed 'as code'
        <OMITTED>


  unclassified:
    artifactManager:
      artifactManagerFactories:
      - jclouds:
          provider: s3

  aws:
    awsCredentials:
      credentialsId: "Jenkins"
      region: "eu-west-1"
    s3:
      container: "jenkins-artifacts"

  ingress:
    enabled: true
    apiVersion: extensions/v1beta1
    hostName: jenkins.org.com
    annotations:
      kubernetes.io/ingress.class: nginx

agent:
  enabled: true
  <OMITTED>

The secret that I am creating is working and showing up, but the above values.yaml doesn't configure the AWS settings automatically. I have to go and login and go to Manage Jenkins --> AWS and set it up.

Any help would be appreciated. The complete yaml is here: https://gist.github.com/soham-chakraborty1/cf76c7a27bbd4346a30bd4b536e5ddd4

soham-chakraborty1 avatar Oct 21 '22 14:10 soham-chakraborty1