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

EC2-Plugin time range for minimum no of instances does not work with JCASC

XMLWordPrintable

      The feature for limiting the minimum instances alive for a time range (https://github.com/jenkinsci/ec2-plugin/pull/404/) is really neat, but it does not work with Jenkins configuration as code.

       

      Details

      Jenkins version: 2.204.1

      ec2-plugin version: 1.47

      configuration-as-code-plugin version: 1.34

       

      When running a configuration including this snippet:

       

      minimumNumberOfInstancesTimeRangeConfig:
        minimumNoInstancesActiveTimeRangeFrom: "08:00"
        minimumNoInstancesActiveTimeRangeTo: "19:00"
        minimumNoInstancesActiveTimeRangeDays:
          monday: true
          tuesday: true
          wednesday: true
          thursday: true
          friday: true
          saturday: false
          sunday: false
      

       

      Configuration fails with:

      io.jenkins.plugins.casc.ConfiguratorException: Invalid configuration elements for type class hudson.plugins.ec2.util.MinimumNumberOfInstancesTimeRangeConfig : minimumNoInstancesActiveTimeRangeDays.
      Available attributes : minimumNoInstancesActiveTimeRangeFrom, minimumNoInstancesActiveTimeRangeTo

      Looking at the logs:

      Jan 06, 2020 1:31:03 PM FINER io.jenkins.plugins.casc.BaseConfigurator describeProcessing minimumNoInstancesActiveTimeRangeDays property
      Jan 06, 2020 1:31:03 PM FINER io.jenkins.plugins.casc.BaseConfigurator describeminimumNoInstancesActiveTimeRangeDays is a Map<?,?>. We decided not to support Maps.
      Jan 06, 2020 1:31:03 PM FINER io.jenkins.plugins.casc.Attribute calculateIfSecret

       

       

       

            thoulen FABRIZIO MANFREDI
            luispiedra Luis Piedra-Márquez
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: