Cloud agent is not requested when correct label is used

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Using docker workflow 572.v950f58993843

      If I specificy a whole pipeline to run on a cloud agent (configured with ec2-fleet plugin with a label of ec2-generic) then an agent is never requested. If the entire job is instead requested to be on an agent with just the label, and without using the {{docker {} }} agent type then everything works OK.

      Example that fails to scale up the cloud agents:

      pipeline {
          agent {
              docker {
                  label "ec2-generic"
                  image "139506524607.dkr.ecr.eu-west-2.amazonaws.com/container:latest"
              }
          }
          stages {
              stage('Checkout Code') {
                  steps {
                      git branch: 'main',
                          credentialsId: 'github',
                          url: 'https://github.com/org/repo.git'
                  }
              }
          }
      }
      

       Example that works:

      pipeline {
          agent {
              label "ec2-generic"
          }
          stages {
              stage('Checkout Code') {
                  steps {
                      git branch: 'main',
                          credentialsId: 'github',
                          url: 'https://github.com/org/repo.git'
                  }
              }
          }
      }
      

            Assignee:
            Unassigned
            Reporter:
            Brian
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: