jenkinsci / openstack-cloud-plugin

Provision nodes from OpenStack on demand
https://plugins.jenkins.io/openstack-cloud
MIT License
47 stars 83 forks source link

Jenkins configuration as code - filtering image, dropdown box(OpenStack cloud) #266

Closed MohammadRahaman closed 5 years ago

MohammadRahaman commented 5 years ago

@tgatinea @olivergondza @oleg-nenashev

here is my yaml file

jenkins:
  agentProtocols:
    - "JNLP4-connect"
    - "Ping"
  slaveAgentPort: "2255"
  clouds:
  - jClouds:
      name: "cloud"
      credentialId: "credential_Id"
      endPointUrl: "url"
      ignoreSsl: false
      slaveOptions:
        bootSource:
      templates:
      - labelString: "xyz"
        name: "abcd"
        slaveOptions:
          bootSource:
            image: 
              name: "image_name"
          hardwareId: ""
          networkId: "private"
          securityGroups: "ssh,ping"
          keyPairName: "keypair_name"
          fsRoot: "/home/jenkins"
          launcherFactory: 
            ssh: 
              credentialsId: "jenkins_master"
          retentionTime: 5

I am trying to apply configuration as code plugin but due to some issue not able to apply that please check this issue. I posted my yaml file on top.

In the boot source image name how we can filter the list of image from the dropdown box!! When I run my yml file I got the list of images on the fly but i want to make it specific something like below which is our goal-

windows-server-core-current
windows-server-core-prev
windows-server-core-1254ksjue

eg: for windows-server-core image which belongs to all of the windows-server-core image, if it is jenkins-master image which belongs to only jenkins-master image from where I can select my desired image from the dropdown box.

I didn't find anything which is support configuration as code (yml)!!

olivergondza commented 5 years ago

Hello again. I am sorry but I still do not understand what is the problem here.