mirror of https://github.com/citusdata/citus.git
Fail if merge to enterprise causes compilation issues (#4027)
* check compilation of enterprise job * test that enterprise merge job fails with compilation error * Revert "test that enterprise merge job fails with compilation error" This reverts commit 0eaccd58c207a4c15365186017bf47601cc95552. * Update readme and use citus extbuilder:13beta3pull/4083/head^2
parent
1c9dc80e8f
commit
2baf3e0bae
|
@ -488,7 +488,7 @@ jobs:
|
|||
|
||||
check-merge-to-enterprise:
|
||||
docker:
|
||||
- image: buildpack-deps:stretch
|
||||
- image: citus/extbuilder:13beta3
|
||||
working_directory: /home/circleci/project
|
||||
steps:
|
||||
- checkout
|
||||
|
|
|
@ -51,11 +51,13 @@ following:
|
|||
This check exists to make sure that we can always merge the `master` branch of
|
||||
`community` into the `enterprise-master` branch of the `enterprise` repo.
|
||||
There are two conditions in which this check passes:
|
||||
1. There are no merge conflicts between your PR branch and `enterprise-master`.
|
||||
|
||||
1. There are no merge conflicts between your PR branch and `enterprise-master` and after this merge the code compiles.
|
||||
2. There are merge conflicts, but there is a branch with the same name in the
|
||||
enterprise repo that:
|
||||
1. Contains the last commit of the community branch with the same name.
|
||||
2. Merges cleanly into `enterprise-master`
|
||||
3. After merging, the code can be compiled.
|
||||
|
||||
If the job already passes, you are done, nothing further required! Otherwise
|
||||
follow the below steps.
|
||||
|
|
|
@ -22,6 +22,12 @@ source ci/ci_helpers.sh
|
|||
# are not shown in CI output (even though it's also filtered out by CircleCI)
|
||||
set -x
|
||||
|
||||
check_compile () {
|
||||
echo "INFO: checking if merged code can be compiled"
|
||||
./configure --without-libcurl
|
||||
make -j10
|
||||
}
|
||||
|
||||
# Clone current git repo (which should be community) to a temporary working
|
||||
# directory and go there
|
||||
GIT_DIR_ROOT="$(git rev-parse --show-toplevel)"
|
||||
|
@ -47,7 +53,9 @@ git fetch enterprise enterprise-master
|
|||
git checkout "enterprise/enterprise-master"
|
||||
|
||||
if git merge --no-commit "origin/$PR_BRANCH"; then
|
||||
echo "INFO: community PR branch could be merged into enterprise-master, so everything is good"
|
||||
echo "INFO: community PR branch could be merged into enterprise-master"
|
||||
# check that we can compile after the merge
|
||||
check_compile
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -73,3 +81,5 @@ fi
|
|||
# Now check if we can merge the enterprise PR into enterprise-master without
|
||||
# issues.
|
||||
git merge --no-commit "enterprise/$PR_BRANCH"
|
||||
# check that we can compile after the merge
|
||||
check_compile
|
||||
|
|
Loading…
Reference in New Issue