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

mode should default to NORMAL when absent

XMLWordPrintable

    • Evergreen - Milestone 2
    • ec2-plugin 1.40

      When configuring an EC2 cloud using CasC, one must explicitly set mode so that the Cloud actually is usable.

      Here is the working yaml

      ---
      jenkins:   clouds:     - amazonEC2:
              cloudName: "ec2"
              instanceCapStr: 20
              zone: "us-east-1"
              useInstanceProfileForCredentials: true
              privateKey: "${PRIVATE_KEY}"
              templates:           - description: "EC2 Agent"
                  ami: "ami-0c6bb742864ffa3f3"
                  labels: "agent"
                  type: "T2Xlarge"
                  remoteFS: "/home/ec2-user"
                  remoteAdmin: "ec2-user"
                  ################            
                  # FIXME: without this, the whole setup will look like it's not even configured
                  mode: NORMAL 
      

      Expected behaviour

      If mode is not specified, it should default to NORMAL. Or if really we want to make it required, this should fail fast when absent, not stay null and make the whole settings broken.

      I had to run the code through a debugger to actually understand what was going on.

            ndeloof Nicolas De Loof
            batmat Baptiste Mathus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: