Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,32 @@ It is also possible to whitelist all commits in a PR with the `needs-ci` tag.
However, this should be only used with trusted submitters since they can still
change the commits in the PR.

## Git workflow

1. Merge pull requests to master without merge commits to keep a less
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are branch protection rules in GitHub, I enabled:

"Require linear history
Prevent merge commits from being pushed to matching branches."

This should take care of this as far as I understand and also allow to use the web interface instead of git commands.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also adjusted the setting for the merge button to only allow rebase. The branch protection rule should probably also be added for production.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tyll, thanks, will it perform a fast-forward merge or do a rebase resulting in a new commit?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be a fast-forward merge

cluttered history.
1. Make sure that `production` is always an ancestor of `master` (or
equivalent to `master`). Having `production` as a side branch and
continuously merging from `master` would lead to a complicated
history and also would not ensure that `production` is in a state
that was previously tested on `master`.

Ad 1: when you want to merge a PR, fetch the branch with the PR,
checkout `master` and merge the branch using `git merge` with
`--ff-only`. This will refuse to merge the branch if not up-to-date,
in this case, rebase it first to `master`.

Example for PR #85: if you have the branch to be merged
(`ukulekek-pre-flight-checks-openshift`) checked out aready, do
```sh
git checkout master
git merge --ff-only ukulekek-pre-flight-checks-openshift
git push origin master
```

Ad 2: When updating `production` to `master`, reset it to `master`, or
fast-forward it to `master` (using `merge` with `--ff-only`).

## Deployment Workflow

To make changes to the CI environment, the changes should be first committed
Expand Down