Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-8809

Bitbucket Server does not trigger Bamboo on new commit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 4.11.0
    • 4.4.1, 4.5.1, 4.6.2, 4.7.1, 4.8.0, 4.9.0, 4.10.0
    • None

    Description

      Summary

      If Bamboo is configured with Tomcat HTTPS redirection or you're running Bamboo version >= 6.8, Bitbucket Server will not trigger Bamboo on new commit

      Environment

      With HTTPS redirection:

      • Bitbucket Server 4.6.2
      • Bamboo 5.12.2

      Regardless of HTTPS redirection:

      • Bitbucket Server < 4.11
      • Bamboo >= 6.8

      Steps to Reproduce

      1. Configure both Bamboo and Bitbucket Server to have two connectors HTTP and HTTPS, eg server.xml:
                <Connector port="80" protocol="HTTP/1.1"
                           connectionTimeout="20000"
                           useBodyEncodingForURI="true"
                           redirectPort="443"
                           compression="on"
                           compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript" />
        
                <Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
                           maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
                           clientAuth="false" sslProtocol="TLS" 
                           keystoreFile="/path/tokeystore.jks"
                		   keystorePass="changeit"
                		   keyAlias="test"
                		   keystoreType="JKS"/>
        
      2. Set both Bamboo and Bitbucket Server to redirect HTTP connection to HTTPS, eg WEB-INF/web.xml:
        	<security-constraint>
        		 <web-resource-collection>
        			 <web-resource-name>HTTPSOnly</web-resource-name>
        			 <url-pattern>/*</url-pattern>
        		 </web-resource-collection>
        		 <user-data-constraint>
        			 <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        		 </user-data-constraint>
        	</security-constraint>
        
      3. Restart Bamboo and Bitbucket Server
      4. Configure the Base URL for both Bamboo and Bitbucket Server to be HTTPS
      5. Create the Application Link between Bamboo and Bitbucket Server
      6. Add Bitbucket Server repo into Bamboo build plan
      7. Make sure that Bamboo build plan using "Bitbucket Server repository triggered"
      8. Push a new commit to Bitbucket Server

      Expected Results

      Bamboo will be triggered to build the new commit

      Actual Results

      Bamboo isn't triggered to build

      Notes

      • If Bitbucket Server have "org.apache.http.wire" debug logging, atlassian-bitbucket.log does not show any POST request to Bamboo when a new commit is pushed
      • If Bamboo have "org.apache.http.wire" debug logging, there is a POST request to Bitbucket Server after a build finish

      Workaround

      These do not apply to Bamboo versions >= 6.8. Bitbucket will need to be upgraded if using Bamboo >= 6.8.

      1. Remove HTTP->HTTPS redirection in Bamboo and then restart Bamboo and Bitbucket Server
        OR
      2. Add an additional Trigger "Repository polling" to all Plan Configuration

      Attachments

        Issue Links

          Activity

            People

              jthomas@atlassian.com Justin Thomas
              klfoong Foong (Inactive)
              Votes:
              22 Vote for this issue
              Watchers:
              46 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: