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

Container selection should default to user container

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • kubernetes-plugin
    • None
    • 1.0

      It has happened multiple times in our company that people not familiar with this plugin will add a single container and then forget to define a container step.

      I believe it would be sensible to default to the users container instead of the jnlp container if there is no container step specified, especially when there is only one user container specified.
      This will allow them to not have to worry about the internals of how the plugin works, specifically that a jnlp container is added.

      It is especially confusing when the first example does not mention the container step

      podTemplate(label: 'mypod') {
          node('mypod') {
              stage('Run shell') {
                  sh 'echo hello world'
              }
          }
      }
      

      P.S This seems to be a duplicate of JENKINS-41109 but that was closed without a fix 8 months ago?

          [JENKINS-47760] Container selection should default to user container

          By default it uses the jnlp container so it behaves like any other Jenkins agent. The container step is limited in functionality

          Carlos Sanchez added a comment - By default it uses the jnlp container so it behaves like any other Jenkins agent. The container step is limited in functionality

          krish123 please ask your questions on jenkins-user mailing list https://jenkins.io/mailing-lists/ not in Jira

          Carlos Sanchez added a comment - krish123 please ask your questions on jenkins-user mailing list https://jenkins.io/mailing-lists/ not in Jira

          isn't this your question and my answer ? https://groups.google.com/forum/#!topic/jenkinsci-users/_PyvGx3JArs

          Even if you get no answer you need to be patient and not spam the Jira issue tracker with questions

          Carlos Sanchez added a comment - isn't this your question and my answer ? https://groups.google.com/forum/#!topic/jenkinsci-users/_PyvGx3JArs Even if you get no answer you need to be patient and not spam the Jira issue tracker with questions

          Rick added a comment -

          Can we discuss how to let this more convenient? Such as providing an option for the users that choose one container as the main execution container.

          Rick added a comment - Can we discuss how to let this more convenient? Such as providing an option for the users that choose one container as the main execution container.

          we can discuss it in the jenkins-dev mailing list

          Carlos Sanchez added a comment - we can discuss it in the jenkins-dev mailing list

          Felipe Santos added a comment -

          I created a separate issue for implementing the default container UI input at https://issues.jenkins.io/browse/JENKINS-64778.

          Felipe Santos added a comment - I created a separate issue for implementing the default container UI input at https://issues.jenkins.io/browse/JENKINS-64778 .

            csanchez Carlos Sanchez
            larslawoko Lars Lawoko
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: