PHPCI icon indicating copy to clipboard operation
PHPCI copied to clipboard

Build Always Pulls master Branch

Open mikebronner opened this issue 9 years ago • 11 comments

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.)

mikebronner avatar Nov 13 '15 16:11 mikebronner

Seems to be pulling the correct branch for me on my gitlab and github projects

REBELinBLUE avatar Nov 13 '15 16:11 REBELinBLUE

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.

mikebronner avatar Nov 13 '15 16:11 mikebronner

Ah, I tried with an existing project. I'll try a new one

REBELinBLUE avatar Nov 13 '15 21:11 REBELinBLUE

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

REBELinBLUE avatar Nov 13 '15 21:11 REBELinBLUE

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 :)

mikebronner avatar Nov 13 '15 21:11 mikebronner

Yeah release was the default branch I set in PHPCI

REBELinBLUE avatar Nov 13 '15 21:11 REBELinBLUE

Actually yes I am having something similar

REBELinBLUE avatar Nov 18 '15 12:11 REBELinBLUE

Ah, this seem to happen if I use the "Rebuild" button, if I build manually it is fine

REBELinBLUE avatar Nov 18 '15 12:11 REBELinBLUE

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. 2016-08-08 14_06_25 2016-08-08 14_07_41- edit project

soulflyman avatar Aug 08 '16 12:08 soulflyman

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...

REBELinBLUE avatar Aug 08 '16 12:08 REBELinBLUE

My interpretation of the Default Branch option was: Build only this branch because thats my default.

soulflyman avatar Aug 08 '16 12:08 soulflyman