summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml10
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/stylesheets/framework/logo.scss78
-rw-r--r--app/assets/stylesheets/framework/mixins.scss7
-rw-r--r--doc/ci/examples/README.md1
-rw-r--r--doc/ci/yaml/README.md2
-rw-r--r--lib/tasks/ce_to_ee_merge_check.rake4
-rw-r--r--lib/tasks/gitlab/dev.rake107
8 files changed, 168 insertions, 42 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7d19f55aca3..c3b864f16cf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -210,6 +210,13 @@ rake brakeman: *exec
rake flay: *exec
license_finder: *exec
rake downtime_check: *exec
+rake ce_to_ee_merge_check:
+ <<: *exec
+ only:
+ - branches
+ except:
+ - tags
+ allow_failure: yes
rake db:migrate:reset:
stage: test
@@ -302,6 +309,9 @@ coverage:
# Trigger docs build
trigger_docs:
stage: post-test
+ before_script: []
+ cache: {}
+ artifacts: {}
script:
- "curl -X POST -F token=${DOCS_TRIGGER_TOKEN} -F ref=master https://gitlab.com/api/v3/projects/38069/trigger/builds"
only:
diff --git a/CHANGELOG b/CHANGELOG
index 7f96a9cba4e..99bbd99726d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -29,6 +29,7 @@ v 8.13.0 (unreleased)
- Keep refs for each deployment
- Allow browsing branches that end with '.atom'
- Log LDAP lookup errors and don't swallow unrelated exceptions. !6103 (Markus Koller)
+ - Replace unique keyframes mixin with keyframe mixin with specific names (ClemMakesApps)
- Add more tests for calendar contribution (ClemMakesApps)
- Update Gitlab Shell to fix some problems with moving projects between storages
- Cache rendered markdown in the database, rather than Redis
diff --git a/app/assets/stylesheets/framework/logo.scss b/app/assets/stylesheets/framework/logo.scss
index 3ee3fb4cee5..c214eabcad7 100644
--- a/app/assets/stylesheets/framework/logo.scss
+++ b/app/assets/stylesheets/framework/logo.scss
@@ -1,15 +1,3 @@
-@mixin unique-keyframes {
- $animation-name: unique-id();
- @include webkit-prefix(animation-name, $animation-name);
-
- @-webkit-keyframes #{$animation-name} {
- @content;
- }
- @keyframes #{$animation-name} {
- @content;
- }
-}
-
@mixin tanuki-logo-colors($path-color) {
fill: $path-color;
transition: all 0.8s;
@@ -20,28 +8,6 @@
}
}
-@mixin tanuki-second-highlight-animations($tanuki-color) {
- @include unique-keyframes {
- 10%, 80% {
- fill: #{$tanuki-color}
- }
- 20%, 90% {
- fill: lighten($tanuki-color, 25%);
- }
- }
-}
-
-@mixin tanuki-forth-highlight-animations($tanuki-color) {
- @include unique-keyframes {
- 30%, 60% {
- fill: #{$tanuki-color};
- }
- 40%, 70% {
- fill: lighten($tanuki-color, 25%);
- }
- }
-}
-
.tanuki-logo {
.tanuki-left-ear,
@@ -67,7 +33,7 @@
}
.tanuki-left-cheek {
- @include unique-keyframes {
+ @include include-keyframes(animate-tanuki-left-cheek) {
0%, 10%, 100% {
fill: lighten($tanuki-yellow, 25%);
}
@@ -78,15 +44,29 @@
}
.tanuki-left-eye {
- @include tanuki-second-highlight-animations($tanuki-orange);
+ @include include-keyframes(animate-tanuki-left-eye) {
+ 10%, 80% {
+ fill: $tanuki-orange;
+ }
+ 20%, 90% {
+ fill: lighten($tanuki-orange, 25%);
+ }
+ }
}
.tanuki-left-ear {
- @include tanuki-second-highlight-animations($tanuki-red);
+ @include include-keyframes(animate-tanuki-left-ear) {
+ 10%, 80% {
+ fill: $tanuki-red;
+ }
+ 20%, 90% {
+ fill: lighten($tanuki-red, 25%);
+ }
+ }
}
.tanuki-nose {
- @include unique-keyframes {
+ @include include-keyframes(animate-tanuki-nose) {
20%, 70% {
fill: $tanuki-red;
}
@@ -97,15 +77,29 @@
}
.tanuki-right-eye {
- @include tanuki-forth-highlight-animations($tanuki-orange);
+ @include include-keyframes(animate-tanuki-right-eye) {
+ 30%, 60% {
+ fill: $tanuki-orange;
+ }
+ 40%, 70% {
+ fill: lighten($tanuki-orange, 25%);
+ }
+ }
}
.tanuki-right-ear {
- @include tanuki-forth-highlight-animations($tanuki-red);
+ @include include-keyframes(animate-tanuki-right-ear) {
+ 30%, 60% {
+ fill: $tanuki-red;
+ }
+ 40%, 70% {
+ fill: lighten($tanuki-red, 25%);
+ }
+ }
}
.tanuki-right-cheek {
- @include unique-keyframes {
+ @include include-keyframes(animate-tanuki-right-cheek) {
40% {
fill: $tanuki-yellow;
}
@@ -115,4 +109,4 @@
}
}
}
-} \ No newline at end of file
+}
diff --git a/app/assets/stylesheets/framework/mixins.scss b/app/assets/stylesheets/framework/mixins.scss
index 7c207969b0a..7fabf27a558 100644
--- a/app/assets/stylesheets/framework/mixins.scss
+++ b/app/assets/stylesheets/framework/mixins.scss
@@ -84,3 +84,10 @@
@content;
}
}
+
+@mixin include-keyframes($animation-name) {
+ @include webkit-prefix(animation-name, $animation-name);
+ @include keyframes($animation-name) {
+ @content;
+ }
+}
diff --git a/doc/ci/examples/README.md b/doc/ci/examples/README.md
index 08fbd9afa2f..ffc310ec8c7 100644
--- a/doc/ci/examples/README.md
+++ b/doc/ci/examples/README.md
@@ -13,6 +13,7 @@ Apart from those, here is an collection of tutorials and guides on setting up yo
- [Test a Scala application](test-scala-application.md)
- [Test a Phoenix application](test-phoenix-application.md)
- [Using `dpl` as deployment tool](deployment/README.md)
+- [Example project that shows how to use Review Apps](https://gitlab.com/gitlab-examples/review-apps-nginx/)
- [Blog post about using GitLab CI for iOS projects](https://about.gitlab.com/2016/03/10/setting-up-gitlab-ci-for-ios-projects/)
- [Repositories with examples for various languages](https://gitlab.com/groups/gitlab-examples)
- [The .gitlab-ci.yml file for GitLab itself](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml)
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index cdf5ecc7a84..59399861a97 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -594,6 +594,8 @@ create the `review-apps/branch-name` environment.
This environment should be accessible under `https://branch-name.review.example.com/`.
+You can see a simple example at https://gitlab.com/gitlab-examples/review-apps-nginx/.
+
### artifacts
>**Notes:**
diff --git a/lib/tasks/ce_to_ee_merge_check.rake b/lib/tasks/ce_to_ee_merge_check.rake
new file mode 100644
index 00000000000..424e7883060
--- /dev/null
+++ b/lib/tasks/ce_to_ee_merge_check.rake
@@ -0,0 +1,4 @@
+desc 'Checks if the branch would apply cleanly to EE'
+task ce_to_ee_merge_check: :environment do
+ Rake::Task['gitlab:dev:ce_to_ee_merge_check'].invoke
+end
diff --git a/lib/tasks/gitlab/dev.rake b/lib/tasks/gitlab/dev.rake
new file mode 100644
index 00000000000..47bdb2d32d2
--- /dev/null
+++ b/lib/tasks/gitlab/dev.rake
@@ -0,0 +1,107 @@
+namespace :gitlab do
+ namespace :dev do
+ desc 'Checks if the branch would apply cleanly to EE'
+ task ce_to_ee_merge_check: :environment do
+ return if defined?(Gitlab::License)
+ return unless ENV['CI']
+
+ ce_repo = ENV['CI_BUILD_REPO']
+ ce_branch = ENV['CI_BUILD_REF_NAME']
+
+ ee_repo = 'https://gitlab.com/gitlab-org/gitlab-ee.git'
+ ee_branch = "#{ce_branch}-ee"
+ ee_dir = 'gitlab-ee-merge-check'
+
+ puts "\n=> Cloning #{ee_repo} into #{ee_dir}\n"
+ `git clone #{ee_repo} #{ee_dir} --depth 1`
+ Dir.chdir(ee_dir) do
+ puts "\n => Fetching #{ce_repo}/#{ce_branch}\n"
+ `git fetch #{ce_repo} #{ce_branch} --depth 1`
+
+ # Try to merge the current tested branch to EE/master...
+ puts "\n => Merging #{ce_repo}/#{ce_branch} into #{ee_repo}/master\n"
+ `git merge FETCH_HEAD`
+
+ exit 0 if $?.success?
+
+ # Check if the <branch>-ee branch exists...
+ puts "\n => Check if #{ee_repo}/#{ee_branch} exists\n"
+ `git rev-parse --verify #{ee_branch}`
+
+ # The <branch>-ee doesn't exist
+ unless $?.success?
+ puts
+ puts <<-MSG.strip_heredoc
+ =================================================================
+ The #{ce_branch} branch cannot be merged without conflicts to the
+ current EE/master, and no #{ee_branch} branch was detected in
+ the EE repository.
+
+ Please create a #{ee_branch} branch that includes changes from
+ #{ce_branch} but also specific changes than can be applied cleanly
+ to EE/master.
+
+ You can create this branch as follows:
+
+ 1. In the EE repo:
+ $ git fetch origin
+ $ git fetch #{ce_repo} #{ce_branch}
+ $ git checkout -b #{ee_branch} FETCH_HEAD
+ $ git rebase origin/master
+ 2. At this point you will likely have conflicts, solve them, and
+ continue/finish the rebase. Note: You can squash the CE commits
+ before rebasing.
+ 3. You can squash all the original #{ce_branch} commits into a
+ single "Port of #{ce_branch} to EE".
+ 4. Push your branch to #{ee_repo}:
+ $ git push origin #{ee_branch}
+ =================================================================\n
+ MSG
+
+ exit 1
+ end
+
+ # Try to merge the <branch>-ee branch to EE/master...
+ puts "\n => Merging #{ee_repo}/#{ee_branch} into #{ee_repo}/master\n"
+ `git merge #{ee_branch} master`
+
+ # The <branch>-ee cannot be merged cleanly to EE/master...
+ unless $?.success?
+ puts
+ puts <<-MSG.strip_heredoc
+ =================================================================
+ The #{ce_branch} branch cannot be merged without conflicts to
+ EE/master, and even though the #{ee_branch} branch exists in the EE
+ repository, it cannot be merged without conflicts to EE/master.
+
+ Please update the #{ee_branch}, push it again to #{ee_repo}, and
+ retry this job.
+ =================================================================\n
+ MSG
+
+ exit 2
+ end
+
+ puts "\n => Merging #{ce_repo}/#{ce_branch} into #{ee_repo}/master\n"
+ `git merge FETCH_HEAD`
+ exit 0 if $?.success?
+
+ # The <branch>-ee can be merged cleanly to EE/master, but <branch> still
+ # cannot be merged cleanly to EE/master...
+ puts
+ puts <<-MSG.strip_heredoc
+ =================================================================
+ The #{ce_branch} branch cannot be merged without conflicts to EE, and
+ even though the #{ee_branch} branch exists in the EE repository and
+ applies cleanly to EE/master, it doesn't prevent conflicts when
+ merging #{ce_branch} into EE.
+
+ We may be in a complex situation here.
+ =================================================================\n
+ MSG
+
+ exit 3
+ end
+ end
+ end
+end