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

Unable to save Jenkinsfile for totally blank github repo

    Details

    • Similar Issues:
    • Sprint:
      1.0

      Description

      To reproduce: 

       

      • Create a brand new github repo with NO FILES or branches
      • Add it to blue ocean
      • Open editor and try to save

      You will see: 

      "Branch not found" error message. 

      https://files.gitter.im/jenkinsci/blueocean-plugin/y3q9/Jenkins-Blue-Ocean-2017-03-09-15-18-18.png

       

       

      If there is any content in the repo this is all ok, only for totally empty case. 

       

        Attachments

          Activity

          Hide
          jamesdumay James Dumay added a comment -

          I also verified that my token had the right scopes X-OAuth-Scopes: repo, user:email

          Show
          jamesdumay James Dumay added a comment - I also verified that my token had the right scopes X-OAuth-Scopes: repo, user:email
          Hide
          michaelneale Michael Neale added a comment -

          cc Vivek Pandey who was also taking a look at this. 

          the request: 

           

          1. Request URL:
            http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/multibranchorg/scm/content/

          2. Request Method:
            PUT

          3. Status Code:
            404 Not Found

          4. Remote Address:
            [::1]:8080
             
             
            {$class: "io.jenkins.blueocean.blueocean_github_pipeline.GithubScmSaveFileRequest",…}
            $class
            :
            "io.jenkins.blueocean.blueocean_github_pipeline.GithubScmSaveFileRequest"
            content
            :
            {message: "Vivek", path: "Jenkinsfile", branch: "master", repo: "nojfile",…}
            base64Data
            :
            "cGlwZWxpbmUgewogIGFnZW50IGFueQogIHN0YWdlcyB7CiAgICBzdGFnZSgnYnVpbGQnKSB7CiAgICAgIHN0ZXBzIHsKICAgICAgICBlY2hvICdoZWxsbyB3b3JsZCcKICAgICAgfQogICAgfQogIH0KfQ=="
            branch
            :
            "master"
            message
            :
            "Vivek"
            path
            :
            "Jenkinsfile"
            repo
            :
            "nojfile"

          Show
          michaelneale Michael Neale added a comment - cc Vivek Pandey who was also taking a look at this.  the request:    Request URL: http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/multibranchorg/scm/content/ Request Method: PUT Status Code: 404 Not Found Remote Address: [::1] :8080     {$class: "io.jenkins.blueocean.blueocean_github_pipeline.GithubScmSaveFileRequest",…} $class : "io.jenkins.blueocean.blueocean_github_pipeline.GithubScmSaveFileRequest" content : {message: "Vivek", path: "Jenkinsfile", branch: "master", repo: "nojfile",…} base64Data : "cGlwZWxpbmUgewogIGFnZW50IGFueQogIHN0YWdlcyB7CiAgICBzdGFnZSgnYnVpbGQnKSB7CiAgICAgIHN0ZXBzIHsKICAgICAgICBlY2hvICdoZWxsbyB3b3JsZCcKICAgICAgfQogICAgfQogIH0KfQ==" branch : "master" message : "Vivek" path : "Jenkinsfile" repo : "nojfile" …
          Hide
          michaelneale Michael Neale added a comment -

          Yep can confirm this works now. Nice one. 

          Show
          michaelneale Michael Neale added a comment - Yep can confirm this works now. Nice one. 

            People

            • Assignee:
              vivek Vivek Pandey
              Reporter:
              michaelneale Michael Neale
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: