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

labels field is ignored when set through configuration-as-code

XMLWordPrintable

      Though everything looks fine, that field when set from the yaml is shown empty on the UI.
      I think something is wrong somewhere, not sure if on EC2 side, CasC, or both.

      Going to contribute a test case.

      The logs when starting up the instance:

      [INFO][2018-07-02 12:27:30] Setting hudson.model.Hudson@497e4c79.systemMessage = Welcome to Jenkins Essentials! (from org.jenkinsci.plugins.casc.BaseConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.AmazonEC2Cloud.cloudName = ec2 (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.AmazonEC2Cloud.useInstanceProfileForCredentials = true (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.AmazonEC2Cloud.privateKey = **** (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.AmazonEC2Cloud.instanceCapStr = 20 (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.SlaveTemplate.ami = ami-0c6bb742864ffa3f3 (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.SlaveTemplate.securityGroups = **** (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.SlaveTemplate.remoteFS = /home/ec2-user (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.SlaveTemplate.type = T2Xlarge (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.SlaveTemplate.description = EC2 Agent (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.SlaveTemplate.userData =  (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.SlaveTemplate.remoteAdmin = ec2-user (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting class hudson.plugins.ec2.AmazonEC2Cloud.templates = [{labels=agent}] (from org.jenkinsci.plugins.casc.DataBoundConfigurator configure)
      [INFO][2018-07-02 12:27:31] Setting hudson.model.Hudson@497e4c79.clouds = [hudson.plugins.ec2.AmazonEC2Cloud@26f61b7b] (from org.jenkinsci.plugins.casc.BaseConfigurator configure)
      

            francisu Francis Upton
            batmat Baptiste Mathus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: