Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Rebase on top of master before running build
Browse files Browse the repository at this point in the history
This prevents scenarios where builds would succeed for pull requests
but failed after merging them into master, due to e.g. dependency
changes or code that looked auto mergable but wasn't.

The trade-off is that PR builds will fail faster / untimely, local
builds will however still succeed so people can rebase at their own
pace when they are ready for it.
  • Loading branch information
hiddeco committed Apr 18, 2019
1 parent ff93ae0 commit 9a9d42b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .circleci/config.yml
@@ -1,4 +1,5 @@
version: 2

jobs:
build:
working_directory: /go/src/github.com/weaveworks/flux
Expand All @@ -7,6 +8,10 @@ jobs:
- image: memcached
steps:
- checkout
# Rebase on target branch after checkout, so we test the result of a
# merge, and not just what is in the proposed change.
# Ref: https://discuss.circleci.com/t/1662
- run: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"
- setup_remote_docker

- run: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
Expand Down Expand Up @@ -44,6 +49,11 @@ jobs:
working_directory: ~/go/src/github.com/weaveworks/flux
steps:
- checkout
# Rebase on target branch after checkout, so we test the result of a
# merge, and not just what is in the proposed change.
# Ref: https://discuss.circleci.com/t/1662
- run: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"

- run: test/e2e/e2e-golang.sh
- run: test/e2e/e2e-flux-build.sh
- run: test/e2e/e2e-kind.sh
Expand Down

0 comments on commit 9a9d42b

Please sign in to comment.