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

buildWithParameters does not work when project has not been built before parameters configured

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Build is a github project on the latest everything.

      Jenkins v 2.45
      AWS Linux (centos fork)

      Attempting to build github branches with slashes in them returns a 403

      marc is missing the Job/Build permission

      Authorization is set so that

      Any logged in user can do anything

      This problem does not exist on branches without slashes in them.

        Attachments

        1. config.xml
          2 kB
        2. jenkins.gif
          jenkins.gif
          7.28 MB
        3. Screen Shot 2017-02-08 at 4.12.19 PM.png
          Screen Shot 2017-02-08 at 4.12.19 PM.png
          36 kB
        4. Screen Shot 2017-02-08 at 4.12.26 PM.png
          Screen Shot 2017-02-08 at 4.12.26 PM.png
          35 kB
        5. slash-params.gif
          slash-params.gif
          354 kB

          Issue Links

            Activity

            Hide
            stephenconnolly Stephen Connolly added a comment -

            So it works for me!

            What servlet container are you using?

            Show
            stephenconnolly Stephen Connolly added a comment - So it works for me! What servlet container are you using?
            Hide
            myoung34 marc young added a comment - - edited

            Stephen Connolly how do i check?

            It's jenkins 2.45 built via https://github.com/saltstack-formulas/jenkins-formula

            I installed from scratch on this demo.

            The only other thing is I'm using Jenkinsfile to define my parameters. Which means the first time it runs, it does not know about the parameters, after build #1 it knows.
            If you look at the gif i attached, towards the end, any branches with a

            /

            dont have the option to 'build with parameters' because I can't initially build it.

            Also: using this setup, no jobs allow me to build them. Slash or not, there is no "build" button for the job, so "Buidl with parameters" only shows up on parameterized builds. Is it an issue with state? It does not know about my parameters until it builds it, but i cannot build it because it doesn't have parameters?

            Show
            myoung34 marc young added a comment - - edited Stephen Connolly how do i check? It's jenkins 2.45 built via https://github.com/saltstack-formulas/jenkins-formula I installed from scratch on this demo. The only other thing is I'm using Jenkinsfile to define my parameters. Which means the first time it runs, it does not know about the parameters, after build #1 it knows. If you look at the gif i attached, towards the end, any branches with a / dont have the option to 'build with parameters' because I can't initially build it. Also: using this setup, no jobs allow me to build them. Slash or not, there is no "build" button for the job, so "Buidl with parameters" only shows up on parameterized builds. Is it an issue with state? It does not know about my parameters until it builds it, but i cannot build it because it doesn't have parameters?
            Hide
            stephenconnolly Stephen Connolly added a comment -

            So after chatting on IRC, this seems to be a confluence of different things:

            1. It is somewhat confusing in the UI differentiating between a branch that has never been built and a dead branch. (Hint: currently the dead branches cannot be built but can be deleted... live branches cannot be deleted but can be built)
            2. BuildWithParameters URL is not available until the Jenkinsfile has been loaded for the branch and the parameter definition applied

            Show
            stephenconnolly Stephen Connolly added a comment - So after chatting on IRC, this seems to be a confluence of different things: 1. It is somewhat confusing in the UI differentiating between a branch that has never been built and a dead branch. (Hint: currently the dead branches cannot be built but can be deleted... live branches cannot be deleted but can be built) 2. BuildWithParameters URL is not available until the Jenkinsfile has been loaded for the branch and the parameter definition applied
            Hide
            stephenconnolly Stephen Connolly added a comment -

            https://issues.jenkins-ci.org/browse/JENKINS-41927 created to help disambiguate orphaned items

            Show
            stephenconnolly Stephen Connolly added a comment - https://issues.jenkins-ci.org/browse/JENKINS-41927 created to help disambiguate orphaned items
            Hide
            jglick Jesse Glick added a comment -

            I think this should let you go ahead and submit parameters. Ditto here. ParametersAction already refuses to set environment variables for undeclared parameters, so there should no risk in that. Similarly, this should be more lenient. Of course for undeclared parameters we do not know the type, so we could just create StringParameterValue in all cases.

            Show
            jglick Jesse Glick added a comment - I think this should let you go ahead and submit parameters. Ditto here . ParametersAction already refuses to set environment variables for undeclared parameters, so there should no risk in that. Similarly, this should be more lenient. Of course for undeclared parameters we do not know the type, so we could just create StringParameterValue in all cases.

              People

              • Assignee:
                Unassigned
                Reporter:
                myoung34 marc young
              • Votes:
                4 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated: