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

A problem with jobs running on a controller even after we mention agent name in the pipeline

XMLWordPrintable

      A problem with jobs running on a controller even when the pipeline mentions a specific agent name

      Here is my Pipeline.

      // code placeholder
      pipeline {
          agent {label 'my-slave'}    stages {
              stage('Test') {
                  steps {
                      stackrox (
                          apiToken: 'xxxxx',
                          caCertPEM: """-----BEGIN CERTIFICATE-----
      MIIxxxxxxx
      -----END CERTIFICATE-----""",
                          enableTLSVerification: false,
                          failOnCriticalPluginError: true,
                          failOnPolicyEvalFailure: true,
                          portalAddress: 'https://mystackrox:443',
                          imageNames: "nginx:latest"
                      )
                  }
              }
          }
      }

       

      The pipeline was supposed to run on "my-agent" since we wanted to have restricted access to our stackrox only from the agent, but it's running on Controller/Master even though we've explicitly mentioned agent.

            janisz Tomasz Janiszewski
            pvimalmec Vimalraj
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: