You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if you manually trigger a build, specifying both a branch and a commit-ish, the Agent treats the specified commit-ish as though it were in the specified branch.
In cases where you require specific things to happen on specific branches (i.e. deploy from master), this can cause issues.
A workaround for now is to implement a check in your own build scripts;
if! git branch -r --contains "${BUILDKITE_COMMIT}"| grep -q "origin/${BUILDKITE_BRANCH}"2> /dev/null;thenecho"The commit SHA ${BUILDKITE_COMMIT} was not found in ${BUILDKITE_BRANCH}. Exitting..."exit 1
fi
(thanks to Jacob from Envato for investigation of this issue)