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

Restrict pipeline support to authorized folders not working correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • kubernetes-plugin
    • None
    • RHEL6, Java 8, Jenkins Master 2.138.4 running in Tomcat 8.5.30, Kubernetes Plugin 1.14.9, Folders Plugin 6.7, AWS EKS cluster 1.11+

      I have a Jenkins Master v2.138.4 running kubernetes plugin v1.14.9 connected to an AWS EKS cluster 1.11+.

      1. I check "Restrict pipeline support to authorized folders" in the managed Jenkins page under the Kubernetes cloud config.
      2. I then configure Kubernetes Pod Template with the Name, Namespace, and Label use the "Raw yaml for the Pod" section.
      3. Then after, I purposely do not configure the folder containing my Jenkins Declarative pipeline.
      4. When I click "Build Now" on my pipeline, the plugin does not seem to be Restricting my pipeline from running or using the Kubernetes Cloud.

      The is also true when configuring the Kubernetes Pod and Container Template directly in the UI Jenkins manage page. 

      I read the instructions on the plugin READ.md: https://github.com/jenkinsci/kubernetes-plugin#restricting-what-jobs-can-use-your-configured-cloud

      Jenkinsfile:

      pipeline {
        agent { label('aws-jenkins-kube-agent') }
      
        options {
          ansiColor('xterm')
          timestamps()
          buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '10', numToKeepStr: '10')
          disableConcurrentBuilds()
        }
      
        stages {
          stage ("Run Maven"){
            steps {
              container('maven') {
                stage('Get Maven Version') {
                  sh '''
                    mvn -v
                '''
                }
              }
            }
          }
        }
      }

       

      Any thoughts?

       

            Unassigned Unassigned
            abermudez Angel Bermudez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: