PHPCI
PHPCI copied to clipboard
Build Always Pulls master Branch
I noticed that the build process appears to always pull master branch commits, and not develop branch even if that is specified in the project settings. Can someone confirm this is happening as well? (Want to make sure its not just me.)
Seems to be pulling the correct branch for me on my gitlab and github projects
I think the issue might be the build button on the project overview page. If I click the build button on a new project that has not been run it will build master, yet display develop (as that was configured). This gets remedied once you select the branch you want to build from the build drop-down. After that it appears to build as expected. Could this be because the build button builds on whatever branch it is already on, until such time that a branch is switched (either via the drop-down menu or via a web hook).
Does that make sense? These are just observations so far, so I'm not sure if this is what the code reflects.
Ah, I tried with an existing project. I'll try a new one
Still seems to be working for me
I set up a new project and set the default branch to release
, I clicked Build and it checked out the latest revision of release
as shown by the commit hash shown in the log
Is release
also your default branch in your repository?
I will try again on a new project as well and see if it happens again ... it may have been a perfect storm edge cases coming together to haunt me :)
Yeah release was the default branch I set in PHPCI
Actually yes I am having something similar
Ah, this seem to happen if I use the "Rebuild" button, if I build manually it is fine
at my git I have a master and a dev branch, and phpci build always the branch to who I commited last (commit is triggered by a webhock from gitlab), not the dev branch as specified in the config.
Uh, isn't that deliberate? Surely you want it to run the tests on the code you just changed? Not actually sure what the default branch is for...
My interpretation of the Default Branch option was: Build only this branch because thats my default.