Commit Graph

38 Commits

Author SHA1 Message Date
Yorick Peterse d59ff8239c
Don't ignore conflicts in db/schema.rb
It's not entirely clear to me why we were ignoring db/schema.rb in the
first place, but this should not be done now that we merge CE into EE
automatically. Doing so can lead to changes being thrown away in the
event of a conflict, which can then lead to EE pipelines failing.
2019-01-04 16:22:00 +01:00
Bob Van Landuyt c53c805352 Don't ingore the `gitlab.pot` in ee_compat_check
If there are new strings in CE, they need to be added to EE
manually. As the `locale/gitlab.pot` file can't be merged
automatically during the upstream merge.
2019-01-04 15:27:03 +01:00
Mario de la Ossa 7dc70e0d67
Fix ee-compat-check by not modifying frozen strings 2018-10-23 09:15:17 -06:00
gfyoung c858f70d07 Enable frozen string for lib/gitlab/*.rb 2018-10-22 07:00:50 +00:00
Lin Jen-Shin e4047ad6f9 Find the EE branch by searching the branches
This uses a similar approach in ee_specific_check.rb
2018-07-11 01:49:35 +08:00
Rémy Coutable 9471c3f673
Try to fetch the CE branch in EE because sometimes it has the same name
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-05-24 19:29:31 +02:00
Bob Van Landuyt 3c57d68318 Ignore `locale/gitlab.pot` in ee_compat_check
Conflicts can be resolved by running
`bundle exec rake gettext:find; git checkout locale/*/gitlab.po`
2018-04-17 14:25:05 +02:00
Rémy Coutable 0241c18217 Improve the ee_compat_check_job to handle gitlab-ee forks
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-03-29 18:46:40 +02:00
Rémy Coutable 804c6f93b7
Ignore conflicts in db/schema.rb in Gitlab::EeCompatCheck
The conflicts are simple enought to resolve that we don't need to bother
developers with those.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-01-30 18:22:36 +01:00
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
Rémy Coutable aaf1699730
Move the "Limit conflicts with EE" doc to "Automatic CE-> EE merge"
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-12-05 17:49:49 +01:00
Rémy Coutable 3262378e24
In EeCompatCheck, always reset to canonical-ee/master when applying a patch
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-11-23 10:10:01 +01:00
Rémy Coutable f5ab0f52a1 Generate the patch against `origin/#{branch}` instead of just `#{branch}` 2017-11-22 23:26:36 +01:00
Rémy Coutable eceec26795 Try to always find the merge base using `origin/#{branch}` instead of just `#{branch}` 2017-11-22 23:26:32 +01:00
Rémy Coutable 05e0c4c1c5 Try to find the merge-base against the canonical master
Also, name the remotes in Gitlab::EeCompatCheck

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-11-22 12:23:24 +01:00
Rémy Coutable 54533920bc
Always fetch master from the canonical remote
This way, if a fork's master branch is far behind the canonical's
master, it won't use the tip of the fork's master branch as merge base
and thus won't create a huge and wrong patch file.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-11-15 15:18:07 +01:00
Rémy Coutable b2373e3d6c
Ensure the ee-compat-check uses the correct patch URL for forks
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-10-31 17:44:07 +01:00
Rémy Coutable c2efb6b193
Fix the ee_compat_check task for forks
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-10-06 12:20:03 +02:00
Lin Jen-Shin 8281865092 Update ee_compat_check for community contributors 2017-09-15 17:34:13 +08:00
Rémy Coutable 04c328f923 Fix ee_compat_check when EE branch uses a prefix
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 16:49:44 +02:00
Rémy Coutable 4fa83bbe90
Always fetch branches before finding the merge base, otherwise we could find an outdated merge base
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-01 13:52:44 +02:00
Rémy Coutable f9f33323aa
Developer can just download the patch from the `ee_compat_check` job's artifact
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-19 11:11:26 +02:00
Pedro Moreira da Silva 6bd83a7b22 Fix gitlab-ee reference in ee_compat_check 2017-07-07 14:46:36 +00:00
Rémy Coutable e69924c4c7
Fix an uncaught throw in the ee_compat_check job
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-21 19:23:51 +02:00
Rémy Coutable 4282e610f7
Generate patch with git diff instead of git format-patch
This will generate a patch:

- that is smaller
- that applies more cleanly since only the final diff will be applied
  instead of each commit's diff

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-09 17:50:53 +02:00
Robert Speicher 611c2fb0bc Fix invalid object reference in ee_compat_check script 2017-05-17 15:17:02 -04:00
Rémy Coutable 992dfd7eb4
Fetch CE/branch before running `git apply --check --3way patch`
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-16 15:52:32 +02:00
Luke "Jared" Bennett b3da5e15bd Update ee_compat_check.rb to include `git apply --reject` suggestion 2017-05-16 13:04:52 +00:00
Rémy Coutable 1dbd80d190 Fix Gitlab::EeCompatCheck: use `ee_branch_found` instead of `ee_branch`
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-28 09:26:47 +02:00
Rémy Coutable 98b87a6ebf Put banners in constants
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-23 23:30:27 +01:00
Rémy Coutable 8720f1d634 Fetch deeper the tested branch before fetching master
The tested branch is clone with a deep of 20 so if it has more than 20
commits, we need to deepen its hitory to be able to find the merge-base
with origin/master.

Also, detect prefixed EE branch as well, i.e. `ee-<branch>`.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-23 23:30:27 +01:00
Rémy Coutable 23e43ec5b1 Improve `Gitlab::EeCompatCheck` by using the `git apply --3way` flag
This should solve 99% of the false-positive of the `ee_compat_check` job.
2017-02-22 16:00:49 +00:00
Rémy Coutable cd78e02096
Ensure we sanitize branch names with path-unfriendly characters
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-23 10:55:28 +01:00
Rémy Coutable 88edbd11a9
Improve EeCompatCheck, cache EE repo and keep artifacts for the ee_compat_check task
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-10 10:40:47 +01:00
Rémy Coutable d38d4a9e8e
Disable Rails/Output cop since it makes no sense here
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-24 21:19:46 +02:00
Rémy Coutable 402dcab4f1
Use File.write instead of File.open + File#write
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-24 20:47:50 +02:00
Rémy Coutable c7af4cf830
Don't print out implementation detail step
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-24 20:29:00 +02:00
Rémy Coutable af669cbea3
Change the approach to check if patches apply cleanly
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-21 19:16:56 +02:00