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

Allow the deletion/modification of EC2 clouds through groovy

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: ec2-plugin
    • Labels:
    • Environment:
      Jenkins version: 2.220
      ec2-plugin version: 1.49.1

    • Similar Issues:

      Description

      Since it is possible to script the configuration of EC2 clouds using groovy, it would be very useful to implement the functionality to delete/modify existing clouds. In the example provided here: https://github.com/jenkinsci/ec2-plugin

      It shows how to add a configuration using jenkins.clouds.add() method, however no method is specified for deleting/modifying existing clouds. In the scenario where you one wants to scripts this entire configuration, and the configuration changes over time, this is essential. 

      I am unsure if this functionality needs to be implemented in jenkins core or if it is possible through the plugin, so apologies if the labelling is off.

        Attachments

          Activity

          Hide
          palpatine John Doe added a comment - - edited

          This is apparently already possible. I was able to delete all existing clouds using the following snippet:

          Jenkins jenkins = Jenkins.getInstance()
          jenkins.clouds.each {
            jenkins.clouds.remove(it)
          }
          
          Show
          palpatine John Doe added a comment - - edited This is apparently already possible. I was able to delete all existing clouds using the following snippet: Jenkins jenkins = Jenkins.getInstance() jenkins.clouds.each {   jenkins.clouds.remove(it) }

            People

            • Assignee:
              thoulen FABRIZIO MANFREDI
              Reporter:
              palpatine John Doe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: