-
Bug
-
Resolution: Fixed
-
Minor
-
Jenkins:
Core: 2.89
Plugins: latest on experimental update center, including Blue Ocean 1.3.2
bitbucket-branch-source 2.2.7
Client:
Fedora Workstation 26
Chrome 62.0.3202.89
SCM:
Bitbucket Server 5.2.3
-
-
Pipeline - December
Summary:
After successfully connecting to a repo on a Bitbucket server which has code, but does not have a Jenkinsfile in it, attempting to create one fails in Blue Ocean. The only error message shown is the word "Found" in red text. This is caused by setting up the Bitbucket server with an HTTP URL, rather than an HTTPS URL. Changing from HTTP to HTTPS resolves the issue.
Routing:
It's unclear to me at the moment if this is an issue in bitbucket-branch-source, in BO itself, in the editor, or somewhere else.
Steps to recreate:
1. Make a local clone of the simple-maven-project-with-tests repo found here.
2. On your Bitbucket server, create a repository, which you'll use as a remote for this repo you just cloned:
3. Using Blue Ocean, connect to this Bitbucket server by providing your credentials. Shown below, I've gotten as far as having found the repo, but have not yet selected it:
4. Click "Create Pipeline." You'll be told there are no Jenkinsfiles, which is expected.
5. Click the second "Create Pipeline" button which was just generated, and you'll be taken to the editor:
6. Leave Agent set to any (the default), and click the button to create a stage. Add a Shell Script step, and enter mvn -X clean package as the step:
7. Click Save, enter a commit message, and leave the default setting of Commit to master. Click Save and Run, and notice the Error at the top of this same dialog:
8. This can also be recreated by using a different branch name than master.
Why this is a problem:
- I've been given no direction as far as what has gone wrong.
- There's nothing at all in the Jenkins log
Later this evening, I'll capture a HAR file while retracing my steps.
- mentioned in
-
Page Failed to load
kshultz Ah, problem found. Issue is really that bitbucket server is setup with https and it wants us to use https one. When you give http://bitbucket.beescloud.com as bb server endpoint url we check if its valid url and save this URL. Later on when pipeline editor tries to save Jenkinsfile, bb server api returns 302 that it fails to handle.
I think the fix is simply to handle 302. Please note this has nothing to do with bitbucket-branch-source latest version. This bug exists in all versions of blueocean. Its minor in nature as workaround is or perhaps right way is for users to setup bb server using https url.
To understand whats going on see the following call below sends 302 with location header pointing to correct https based url.