diff options
32 files changed, 210 insertions, 283 deletions
diff --git a/.gitignore b/.gitignore index 92ca729dc11..4f778371512 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ public/uploads.* public/assets/ .envrc dump.rdb +tags diff --git a/CHANGELOG b/CHANGELOG index 6667eceb94a..3f6cc3a8268 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -32,6 +32,7 @@ v 7.3.0 - Zen mode (fullscreen) for issues/MR/notes (Robert Schilling) - Add ability to configure webhook timeout via gitlab.yml (Wes Gurney) - Sort project merge requests in asc or desc order for updated_at or created_at field (sponsored by O'Reilly Media) + - Add Redis socket support to 'rake gitlab:shell:install' v 7.2.1 - Delete orphaned labels during label migration (James Brooks) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0613fcdf853..3c26b997149 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,7 @@ Please send a merge request with a tested solution or a merge request with a fai 1. **Output of checks** * Results of GitLab [Application Check](doc/install/installation.md#check-application-status) (`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`); we will only investigate if the tests are passing * Version of GitLab you are running; we will only investigate issues in the latest stable and development releases as per the [maintenance policy](MAINTENANCE.md) - * Add the last commit sha1 of the GitLab version you used to replicate the issue (obtainable from the help page) + * Add the last commit SHA-1 of the GitLab version you used to replicate the issue (obtainable from the help page) * Describe your setup (use relevant parts from `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`) 1. **Possible fixes**: If you can, link to the line of code that might be responsible for the problem @@ -76,7 +76,7 @@ If you can, please submit a merge request with the fix or improvements including The **official merge window** is in the beginning of the month from the 1st to the 7th day of the month. The best time to submit a MR and get feedback fast. Before this time the GitLab B.V. team is still dealing with work that is created by the monthly release such as assisting subscribers with upgrade issues, the release of Enterprise Edition and the upgrade of GitLab Cloud. After the 7th it is already getting closer to the release date of the next version. This means there is less time to fix the issues created by merging large new features. -Please keep the change in a single MR **as small as possible**. If you want to contribute a large feature think very hard what the minimum viable change is. Can you split functionality? Can you only submit the backend/API code? Can you start with a very simple UI? Can you do part of the refactor? The increased reviewability of small MR's that leads to higher code quality is more important to us than having a mimimal commit log. The smaller a MR is the more likely it is it will be merged (quickly), after that you can send more MR's to enhance it. +Please keep the change in a single MR **as small as possible**. If you want to contribute a large feature think very hard what the minimum viable change is. Can you split functionality? Can you only submit the backend/API code? Can you start with a very simple UI? Can you do part of the refactor? The increased reviewability of small MR's that leads to higher code quality is more important to us than having a minimal commit log. The smaller a MR is the more likely it is it will be merged (quickly), after that you can send more MR's to enhance it. For examples of feedback on merge requests please look at already [closed merge requests](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests?assignee_id=&label_name=&milestone_id=&scope=&sort=&state=closed). If you would like quick feedback on your merge request feel free to mention one of the Merge Marshalls of [the core-team](https://about.gitlab.com/core-team/). Please ensure that your merge request meets the following contribution acceptance criteria. @@ -86,7 +86,7 @@ For examples of feedback on merge requests please look at already [closed merge 1. Are there points in the code the reviewer needs to double check? 1. Why was this MR needed? 1. What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)? -1. Screenshots (If appropiate) +1. Screenshots (If appropriate) ## Contribution acceptance criteria @@ -115,4 +115,4 @@ For examples of feedback on merge requests please look at already [closed merge 1. [Shell commands](doc/development/shell_commands.md) created by GitLab contributors to enhance security 1. [Markdown](http://www.cirosantilli.com/markdown-styleguide) -This is also the style used by linting tools such as [Rubocop](https://github.com/bbatsov/rubocop), [PullReview](https://www.pullreview.com/) and [Hound CI](https://houndci.com). +This is also the style used by linting tools such as [RuboCop](https://github.com/bbatsov/rubocop), [PullReview](https://www.pullreview.com/) and [Hound CI](https://houndci.com). @@ -1 +1 @@ -7.3.0.rc1 +7.4.0-pre diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 9add1304dc7..6bae3d3c44f 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -15,7 +15,6 @@ #= require jquery.atwho #= require jquery.scrollTo #= require jquery.blockUI -#= require jquery.sticky #= require turbolinks #= require jquery.turbolinks #= require bootstrap diff --git a/app/assets/javascripts/diff.js.coffee b/app/assets/javascripts/diff.js.coffee index 78bb385b5bb..dbe00c487dc 100644 --- a/app/assets/javascripts/diff.js.coffee +++ b/app/assets/javascripts/diff.js.coffee @@ -34,8 +34,7 @@ class Diff $.get(link, params, (response) => target.parent().replaceWith(response) ) - ).ready => - $(".diff-header").sticky {responsiveWidth:true, getWidthFrom: ".diff-file"} + ) lineNumbers: (line) -> return ([0, 0]) unless line.children().length diff --git a/app/assets/javascripts/zen_mode.js.coffee b/app/assets/javascripts/zen_mode.js.coffee index aea707d8550..21ac212df0e 100644 --- a/app/assets/javascripts/zen_mode.js.coffee +++ b/app/assets/javascripts/zen_mode.js.coffee @@ -1,23 +1,28 @@ class @ZenMode @fullscreen_prefix = 'fullscreen_' - @ESC = 27 constructor: -> @active_zen_area = null @active_checkbox = null + @scroll_position = 0 + + $(window).scroll => + if not @active_checkbox + @scroll_position = window.pageYOffset $('body').on 'change', '.zennable input[type=checkbox]', (e) => - checkbox = e.currentTarget; + checkbox = e.currentTarget if checkbox.checked + # Disable other keyboard shortcuts in ZEN mode Mousetrap.pause() @udpateActiveZenArea(checkbox) else @exitZenMode() $(document).on 'keydown', (e) => - console.log("esc") - if e.keyCode is ZenMode.ESC + if e.keyCode is $.ui.keyCode.ESCAPE @exitZenMode() + e.preventDefault() $(window).on 'hashchange', @updateZenModeFromLocationHash @@ -27,7 +32,7 @@ class @ZenMode @active_zen_area = @active_checkbox.parent().find('textarea') @active_zen_area.focus() window.location.hash = ZenMode.fullscreen_prefix + @active_checkbox.prop('id') - + exitZenMode: => if @active_zen_area isnt null Mousetrap.unpause() @@ -35,6 +40,7 @@ class @ZenMode @active_zen_area = null @active_checkbox = null window.location.hash = '' + window.scrollTo(window.pageXOffset, @scroll_position) checkboxFromLocationHash: (e) -> id = $.trim(window.location.hash.replace('#' + ZenMode.fullscreen_prefix, '')) @@ -48,4 +54,4 @@ class @ZenMode if checkbox @udpateActiveZenArea(checkbox) else - @exitZenMode() + @exitZenMode() diff --git a/app/assets/stylesheets/generic/issuable.scss b/app/assets/stylesheets/generic/issuable.scss new file mode 100644 index 00000000000..f456b3ace1a --- /dev/null +++ b/app/assets/stylesheets/generic/issuable.scss @@ -0,0 +1,9 @@ +/** + * Styles that apply to both issues and merge requests. + */ + +.issue-form, .merge-request-form { + .description { + height: 20em; + } +} diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss index 918ac554ea3..edeebabe067 100644 --- a/app/assets/stylesheets/sections/projects.scss +++ b/app/assets/stylesheets/sections/projects.scss @@ -40,7 +40,7 @@ .star-fork-buttons { float: right; - width: 200px; + min-width: 200px; font-size: 14px; font-weight: bold; diff --git a/app/views/profiles/keys/index.html.haml b/app/views/profiles/keys/index.html.haml index aabfd57c286..a322f82f236 100644 --- a/app/views/profiles/keys/index.html.haml +++ b/app/views/profiles/keys/index.html.haml @@ -6,7 +6,7 @@ SSH keys allow you to establish a secure connection between your computer and GitLab %br Before you can add an SSH key you need to - = link_to "generate it", help_page_path("ssh", "README") + = link_to "generate it", help_page_path("ssh", "ssh") %hr diff --git a/app/views/projects/_issuable_form.html.haml b/app/views/projects/_issuable_form.html.haml index 402cdb44182..824460e7fed 100644 --- a/app/views/projects/_issuable_form.html.haml +++ b/app/views/projects/_issuable_form.html.haml @@ -7,12 +7,8 @@ .form-group.issuable-description = f.label :description, 'Description', class: 'control-label' .col-sm-10 - .zennable - %input#zen-toggle-comment{ tabindex: '-1', type: 'checkbox' } - .zen-backdrop - = f.text_area :description, rows: 14, class: 'form-control js-gfm-input markdown-area', placeholder: 'Leave a comment' - %label{ for: 'zen-toggle-comment', class: 'expand' } Edit in fullscreen - %label{ for: 'zen-toggle-comment', class: 'collapse' } + = render 'projects/zen', f: f, attr: :description, + classes: 'description form-control' .col-sm-12.hint .pull-left Parsed with diff --git a/app/views/projects/_zen.html.haml b/app/views/projects/_zen.html.haml new file mode 100644 index 00000000000..2bbc49e8eb5 --- /dev/null +++ b/app/views/projects/_zen.html.haml @@ -0,0 +1,7 @@ +.zennable + %input#zen-toggle-comment{ tabindex: '-1', type: 'checkbox' } + .zen-backdrop + - classes << ' js-gfm-input markdown-area' + = f.text_area attr, class: classes, placeholder: 'Leave a comment' + %label{ for: 'zen-toggle-comment', class: 'expand' } Edit in fullscreen + %label{ for: 'zen-toggle-comment', class: 'collapse' } diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml index 657a77eb758..64fc0160926 100644 --- a/app/views/projects/merge_requests/_new_submit.html.haml +++ b/app/views/projects/merge_requests/_new_submit.html.haml @@ -21,12 +21,8 @@ .form-group .light = f.label :description, "Description" - .zennable - %input#zen-toggle-comment{ tabindex: '-1', type: 'checkbox' } - .zen-backdrop - = f.text_area :description, class: 'form-control js-gfm-input markdown-area', rows: 10, placeholder: 'Leave a comment' - %label{ for: 'zen-toggle-comment', class: 'expand' } Edit in fullscreen - %label{ for: 'zen-toggle-comment', class: 'collapse' } + = render 'projects/zen', f: f, attr: :description, + classes: 'description form-control' .clearfix.hint .pull-left Description is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}. .pull-right Attach images (JPG, PNG, GIF) by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }. diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index 66b79e5026b..65d7f081545 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -14,13 +14,8 @@ Preview %div .note-write-holder - .zennable - %input#zen-toggle-comment{ tabindex: '-1', type: 'checkbox' } - .zen-backdrop - = f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input markdown-area', placeholder: 'Leave a comment' - %label{ for: 'zen-toggle-comment', class: 'expand' } Edit in fullscreen - %label{ for: 'zen-toggle-comment', class: 'collapse' } - + = render 'projects/zen', f: f, attr: :note, + classes: 'note_text js-note-text' .light.clearfix .pull-left Comments are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }} .pull-right Attach images (JPG, PNG, GIF) by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector', tabindex: -1 }. diff --git a/doc/development/README.md b/doc/development/README.md index 67ee828db6b..20db6662aca 100644 --- a/doc/development/README.md +++ b/doc/development/README.md @@ -3,3 +3,4 @@ - [Architecture](architecture.md) of GitLab - [Shell commands](shell_commands.md) in the GitLab codebase - [Rake tasks](rake_tasks.md) for development +- [CI setup](ci_setup.md) for testing GitLab diff --git a/doc/development/ci_setup.md b/doc/development/ci_setup.md new file mode 100644 index 00000000000..b3e84183a41 --- /dev/null +++ b/doc/development/ci_setup.md @@ -0,0 +1,41 @@ +# CI setup + +This document describes what services we use for testing GitLab and GitLab CI. + +We currently use three CI services to test GitLab: + +1. GitLab CI on [GitHost.io](https://gitlab-ce.githost.io/projects/2/) for the [GitLab.com repo](https://gitlab.com/gitlab-org/gitlab-ce) +2. GitLab CI at ci.gitlab.org to test the private GitLab B.V. repo at dev.gitlab.org +3. [Semephore](https://semaphoreapp.com/gitlabhq/gitlabhq/) for [GitHub.com repo](https://github.com/gitlabhq/gitlabhq) + +| Software @ configuration being tested | GitLab CI (ci.gitlab.org) | GitLab CI (GitHost.io) | Semaphore | +|---------------------------------------|---------------------------|------------------------|-----------| +| GitLab CE @ MySQL | ✓ | ✓ | | +| GitLab CE @ PostgreSQL | | | ✓ | +| GitLab EE @ MySQL | ✓ | | | +| GitLab CI @ MySQL | ✓ | | | +| GitLab CI @ PostgreSQL | | | ✓ | +| GitLab CI Runner | ✓ | | ✓ | +| GitLab Shell | ✓ | | ✓ | +| GitLab Shell | ✓ | | ✓ | + +We use [these build scripts](https://gitlab.com/gitlab-org/gitlab-ci/blob/master/doc/examples/build_script_gitlab_ce.md) for testing with GitLab CI. + +# Build configuration on [Semaphore](https://semaphoreapp.com/gitlabhq/gitlabhq/) for testing the [GitHub.com repo](https://github.com/gitlabhq/gitlabhq) + +Language: Ruby +Ruby verion: 2.1.2 +database.yml: pg + +Build commands + +```bash +sudo apt-get install cmake libicu-dev -y (Setup) +bundle install --deployment --path vendor/bundle (Setup) +cp config/gitlab.yml.example config/gitlab.yml (Setup) +bundle exec rake db:create (Setup) +bundle exec rake spinach (Thread #1) +bundle exec rake spec (Thread #2) +``` + +Use rubygems mirror. diff --git a/doc/install/installation.md b/doc/install/installation.md index 6a981984fea..bdedd590e09 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -139,7 +139,12 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da # Configure redis to use sockets sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig - sed -e 's/^# unixsocket /unixsocket /' -e 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf + + # Disable Redis listening on TCP by setting 'port' to 0 + sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf + + # Enable Redis socket for default Debian / Ubuntu path + echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf # Activate the changes to redis.conf sudo service redis-server restart @@ -210,7 +215,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da # Configure Redis connection settings sudo -u git -H cp config/resque.yml.example config/resque.yml - # Change the Redis socket path if necessary + # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration sudo -u git -H editor config/resque.yml **Important Note:** Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. @@ -252,7 +257,7 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da GitLab Shell is an SSH access and repository management software developed specially for GitLab. # Run the installation task for gitlab-shell (replace `REDIS_URL` if needed): - sudo -u git -H bundle exec rake gitlab:shell:install[v1.9.7] REDIS_URL=redis://localhost:6379 RAILS_ENV=production + sudo -u git -H bundle exec rake gitlab:shell:install[v2.0.0] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production # By default, the gitlab-shell config is generated from your main GitLab config. # You can review (and modify) the gitlab-shell config as follows: diff --git a/doc/install/requirements.md b/doc/install/requirements.md index fd2e29d3c52..49edf36f574 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -34,7 +34,7 @@ Please consider using a virtual machine to run GitLab. GitLab requires Ruby (MRI) 2.0 or 2.1 You will have to use the standard MRI implementation of Ruby. -We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab needs several Gems that have native extensions. +We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab needs several Gems that have native extensions. ## Hardware requirements diff --git a/doc/permissions/permissions.md b/doc/permissions/permissions.md index db22b7dbe56..d561868c8bb 100644 --- a/doc/permissions/permissions.md +++ b/doc/permissions/permissions.md @@ -27,11 +27,11 @@ If a user is a GitLab administrator they receive all permissions. | Create new milestones | | | | ✓ | ✓ | | Add new team members | | | | ✓ | ✓ | | Push to protected branches | | | | ✓ | ✓ | -| Enable/Disable branch protection | | | | ✓ | ✓ | +| Enable/disable branch protection | | | | ✓ | ✓ | | Rewrite/remove git tags | | | | ✓ | ✓ | | Edit project | | | | ✓ | ✓ | -| Add Deploy Keys to project | | | | ✓ | ✓ | -| Configure Project Hooks | | | | ✓ | ✓ | +| Add deploy keys to project | | | | ✓ | ✓ | +| Configure project hooks | | | | ✓ | ✓ | | Switch visibility level | | | | | ✓ | | Transfer project to another namespace | | | | | ✓ | | Remove project | | | | | ✓ | diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index 8200a8cf630..359c1f33082 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -6,8 +6,8 @@ A backup creates an archive file that contains the database, all repositories and all attachments. This archive will be saved in backup_path (see `config/gitlab.yml`). - The filename will be `[TIMESTAMP]_gitlab_backup.tar`. This timestamp can be used to restore an specific backup. +You can only restore a backup to exactly the same version of GitLab that you created it on, for example 7.2.1. ``` # omnibus-gitlab @@ -55,6 +55,8 @@ If you have a manual installation please consider backing up your gitlab.yml fil ## Restore a previously created backup +You can only restore a backup to exactly the same version of GitLab that you created it on, for example 7.2.1. + ``` # omnibus-gitlab sudo gitlab-rake gitlab:backup:restore diff --git a/doc/release/monthly.md b/doc/release/monthly.md index 2c26a90589d..b4dbfcd6100 100644 --- a/doc/release/monthly.md +++ b/doc/release/monthly.md @@ -10,11 +10,8 @@ NOTE: This is a guide for GitLab developers. A release manager is selected that coordinates the entire release of this version. The release manager has to make sure all the steps below are done and delegated where necessary. This person should also make sure this document is kept up to date and issues are created and updated. -### **3. Update Changelog** - -Any changes not yet added to the changelog are added by lead developer and in that merge request the complete team is asked if there is anything missing. - -### **4. Create an overall issue** +### **3. Create an overall issue** +Name it "Release x.x.x" for easier searching. ``` 15th: @@ -30,10 +27,11 @@ Any changes not yet added to the changelog are added by lead developer and in th 17th: * Create x.x.0.rc1 (#LINK) +* Build package for GitLab.com (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#build-a-package) 18th: -* Update GitLab.com with rc1 (#LINK) +* Update GitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package) * Regression issue and tweet about rc1 (#LINK) * Start blog post (#LINK) @@ -54,6 +52,10 @@ Any changes not yet added to the changelog are added by lead developer and in th * Deploy to GitLab.com (#LINK) ``` +### **4. Update Changelog** + +Any changes not yet added to the changelog are added by lead developer and in that merge request the complete team is asked if there is anything missing. + # **16th - Merge the CE into EE** Do this via a merge request. @@ -113,7 +115,8 @@ Check if any of these changed since last release: - <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/unicorn.rb.example> - <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/database.yml.mysql> - <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/database.yml.postgresql> -- <https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/initializers/rack_attack.rb.example> +- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/initializers/rack_attack.rb.example> +- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/resque.yml.example> #### 8. Need to update init script? @@ -127,9 +130,9 @@ Check if the `init.d/gitlab` script changed since last release: <https://gitlab. Make sure the code quality indicators are green / good. -- [](http://ci.gitlab.org/projects/1?ref=master) on ci.gitlab.org (master branch) +- [](http://ci.gitlab.org/projects/1?ref=master) on ci.gitlab.org (master branch) -- [](https://travis-ci.org/gitlabhq/gitlabhq) on travis-ci.org (master branch) +- [](https://semaphoreapp.com/gitlabhq/gitlabhq) (master branch) - [](https://codeclimate.com/github/gitlabhq/gitlabhq) @@ -149,6 +152,23 @@ Create an annotated tag that points to the version change commit: git tag -a vx.x.0.rc1 -m 'Version x.x.0.rc1' ``` +### **6. Create stable branches** + +For GitLab EE, append `-ee` to the branch. + +`x-x-stable-ee` + +``` +git checkout master +git pull +git checkout -b x-x-stable +git push <remote> x-x-stable +``` + +Now developers can use master for merging new features. +So you should use stable branch for future code chages related to release. + + # **18th - Release RC1** ### **1. Update GitLab.com** @@ -195,7 +215,7 @@ Merge CE into EE before doing the QA. ### **2. QA** -Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X release" in order to keep track of the progress. +Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X QA" in order to keep track of the progress. Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gitlab.org/gitlab/gitlab-ee/blob/master/doc/release/manual_testing.md). @@ -219,19 +239,26 @@ Note: Merge CE into EE if needed. - Change the GITLAB_SHELL_VERSION file in `master` of the CE repository if the version changed. - Change the GITLAB_SHELL_VERSION file in `master` of the EE repository if the version changed. -- Change the VERSION file in `master` branch of the CE repository and commit and push. -- Change the VERSION file in `master` branch of the EE repository and commit and push. +- Change the VERSION file in `master` branch of the CE repository and commit and push to origin. +- Change the VERSION file in `master` branch of the EE repository and commit and push to origin. + +### **2. Update installation.md** -### **2. Create x-x-stable branch and push to the repositories** +Update [installation.md](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md) to the newest version in master. + +### **3. Push latest changes from x-x-stable branch to dev.gitlab.org** ``` -git checkout master -git pull git checkout -b x-x-stable -git push <remote> x-x-stable +git push origin x-x-stable ``` -### **3. Create annotated tag vx.x.x** +### **4. Build the Omnibus packages** + +Follow the [release doc in the Omnibus repository](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md). +This can happen before tagging because Omnibus uses tags in its own repo and SHA1's to refer to the GitLab codebase. + +### **5. Create annotated tag vx.x.x** In `x-x-stable` branch check for the SHA-1 of the commit with VERSION file changed. Tag that commit, @@ -241,18 +268,7 @@ git tag -a vx.x.0 -m 'Version x.x.0' xxxxx where `xxxxx` is SHA-1. -### **4. Push the tag** - -``` -git push origin vx.x.0 -``` - -### **5. Build the Omnibus packages** - -Follow the [release doc in the Omnibus repository](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md). -This can happen before tagging because Omnibus uses tags in its own repo and SHA1's to refer to the GitLab codebase. - -### **6. Push to remotes** +### **6. Push the tag and x-x-stable branch to the remotes** For GitLab CE, push to dev, GitLab.com and GitHub. @@ -260,29 +276,37 @@ For GitLab EE, push to the subscribers repo. Make sure the branch is marked 'protected' on each of the remotes you pushed to. -### **7. Publish blog for new release** +``` +git push <remote> x-x-stable(-ee) +git push <remote> vx.x.0 +``` + +### **7. Publish packages for new release** + +Update `downloads/index.html` and `downloads/archive/index.html` in `www-gitlab-com` repository. + +### **8. Publish blog for new release** Merge the [blog merge request](#1-prepare-the-blog-post) in `www-gitlab-com` repository. -### **8. Tweet to blog** +### **9. Tweet to blog** Send out a tweet to share the good news with the world. List the most important features and link to the blog post. Proposed tweet for CE "GitLab X.X is released! It brings *** <link-to-blogpost>" -### **9. Send out the newsletter** +### **10. Send out the newsletter** Send out an email to the 'GitLab Newsletter' mailing list on MailChimp. Replicate the former release newsletter and modify it accordingly. +**Do not forget to edit `Subject line` and regenerate `Plain-Text Email` from HTML source** + Include a link to the blog post and keep it short. Proposed email text: "We have released a new version of GitLab. See our blog post(<link>) for more information." -### **10. Update installation.md** - -Update [installation.md](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md) to the newest version in master and cherry-pick that commit into the stable branch. # **23rd - Optional Patch Release** diff --git a/doc/security/README.md b/doc/security/README.md index b89e8cbe020..f88375f2afd 100644 --- a/doc/security/README.md +++ b/doc/security/README.md @@ -2,3 +2,4 @@ - [Password length limits](password_length_limits.md) - [Rack attack](rack_attack.md) +- [Information exclusivity](information_exclusivity.md) diff --git a/doc/security/information_exclusivity.md b/doc/security/information_exclusivity.md new file mode 100644 index 00000000000..127166ae2e7 --- /dev/null +++ b/doc/security/information_exclusivity.md @@ -0,0 +1,9 @@ +# Information exclusivity + +Git is a distributed version control system (DVCS). +This means that everyone that works with the source code has a local copy of the complete repository. +In GitLab every project member that is not a guest (so reporters, developers and masters) can clone the repository to get a local copy. +After obtaining this local copy the user can upload the full repository anywhere, including another project under their control or another server. +The consequense is that you can't build access controls that prevent the intentional sharing of source code by users that have access to the source code. +This is an inherent feature of a DVCS and all git management systems have this limitation. +Obviously you can take steps to prevent unintentional sharing and information destruction, this is why only some people are allowed to invite others and nobody can force push a protected branch. diff --git a/doc/update/6.0-to-7.3.md b/doc/update/6.0-to-7.3.md index 0f67209f8ff..ec4cac2f4fa 100644 --- a/doc/update/6.0-to-7.3.md +++ b/doc/update/6.0-to-7.3.md @@ -9,7 +9,7 @@ As of 6.1 issue numbers are project specific. This means all issues are renumber ## Editable labels In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it -possible to edit the label text and color. The characters '?', '&' and ',' are +possible to edit the label text and color. The characters `?`, `&` and `,` are no longer allowed however so those will be removed from your tags during the database migrations for GitLab 7.2. @@ -80,7 +80,6 @@ For GitLab Enterprise Edition: sudo -u git -H git checkout 7-3-stable-ee ``` - ## 4. Install additional packages ```bash @@ -95,21 +94,22 @@ sudo apt-get install pkg-config cmake # Configure redis to use sockets sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig - sed -e 's/^# unixsocket /unixsocket /' -e 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf + # Disable Redis listening on TCP by setting 'port' to 0 + sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf + # Enable Redis socket for default Debian / Ubuntu path + echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf # Activate the changes to redis.conf sudo service redis-server restart # Add git to the redis group sudo usermod -aG redis git - cd /home/git/gitlab # Configure Redis connection settings sudo -u git -H cp config/resque.yml.example config/resque.yml - # Change the Redis socket path if necessary + # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration sudo -u git -H editor config/resque.yml - cd /home/git/gitlab-shell # Configure gitlab-shell to use Redis sockets - sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' config.yml + sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml ## 6. Update gitlab-shell @@ -148,7 +148,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab ## 8. Update config files -TIP: to see what changed in gitlab.yml.example in this release use next command: +TIP: to see what changed in `gitlab.yml.example` in this release use next command: ``` git diff 6-0-stable:config/gitlab.yml.example 7-3-stable:config/gitlab.yml.example diff --git a/doc/update/7.1-to-7.2.md b/doc/update/7.1-to-7.2.md index ff5574114a8..699111f0143 100644 --- a/doc/update/7.1-to-7.2.md +++ b/doc/update/7.1-to-7.2.md @@ -3,7 +3,7 @@ ## Editable labels In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it -possible to edit the label text and color. The characters '?', '&' and ',' are +possible to edit the label text and color. The characters `?`, `&` and `,` are no longer allowed however so those will be removed from your tags during the database migrations for GitLab 7.2. @@ -46,7 +46,7 @@ sudo -u git -H git checkout 7-2-stable-ee ```bash cd /home/git/gitlab-shell sudo -u git -H git fetch -sudo -u git -H git checkout v1.9.7 +sudo -u git -H git checkout v1.9.8 ``` ### 4. Install new system dependencies @@ -81,9 +81,9 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab ### 6. Update config files -#### New configuration options for gitlab.yml +#### New configuration options for `gitlab.yml` -There are new configuration options available for gitlab.yml. View them with the command below and apply them to your current gitlab.yml. +There are new configuration options available for `gitlab.yml`. View them with the command below and apply them to your current `gitlab.yml`. ``` git diff 7-1-stable:config/gitlab.yml.example 7-2-stable:config/gitlab.yml.example diff --git a/doc/update/7.2-to-7.3.md b/doc/update/7.2-to-7.3.md index d4b83a45e68..713613cb455 100644 --- a/doc/update/7.2-to-7.3.md +++ b/doc/update/7.2-to-7.3.md @@ -1,7 +1,5 @@ # From 7.2 to 7.3 -# GitLab 7.3 has not been released yet! - ### 0. Backup ```bash @@ -70,21 +68,22 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab # Configure redis to use sockets sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig - sed -e 's/^# unixsocket /unixsocket /' -e 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf + # Disable Redis listening on TCP by setting 'port' to 0 + sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf + # Enable Redis socket for default Debian / Ubuntu path + echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf # Activate the changes to redis.conf sudo service redis-server restart # Add git to the redis group sudo usermod -aG redis git - cd /home/git/gitlab # Configure Redis connection settings sudo -u git -H cp config/resque.yml.example config/resque.yml - # Change the Redis socket path if necessary + # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration sudo -u git -H editor config/resque.yml - cd /home/git/gitlab-shell # Configure gitlab-shell to use Redis sockets - sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' config.yml + sudo -u git -H sed -i 's|^ # socket.*| socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml ### 6. Update config files @@ -96,15 +95,14 @@ There are new configuration options available for gitlab.yml. View them with the git diff 7-2-stable:config/gitlab.yml.example 7-3-stable:config/gitlab.yml.example ``` -* HTTP setups: Make `/etc/nginx/sites-available/nginx` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-3-stable/lib/support/nginx/gitlab but with your settings. -* HTTPS setups: Make `/etc/nginx/sites-available/nginx-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-3-stable/lib/support/nginx/gitlab-ssl but with your setting - -Update rack attack middleware config - ``` -sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb +# Use the default Unicorn socket backlog value of 1024 +sudo -u git -H sed -i 's|^:backlog => 64|:backlog => 1024|' config/unicorn.rb ``` +* HTTP setups: Make `/etc/nginx/sites-available/nginx` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-3-stable/lib/support/nginx/gitlab but with your settings. +* HTTPS setups: Make `/etc/nginx/sites-available/nginx-ssl` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-3-stable/lib/support/nginx/gitlab-ssl but with your setting + ### 7. Start application sudo service gitlab start diff --git a/doc/update/upgrader.md b/doc/update/upgrader.md index e8379fcc318..9943e9205db 100644 --- a/doc/update/upgrader.md +++ b/doc/update/upgrader.md @@ -47,12 +47,12 @@ If all items are green, then congratulations upgrade is complete! If the `gitlab:check` task reports an outdated version of `gitlab-shell` you should upgrade it. -Upgrade it by running the commands below after replacing 1.9.4 with the correct version number: +Upgrade it by running the commands below after replacing 2.0.0 with the correct version number: ``` cd /home/git/gitlab-shell sudo -u git -H git fetch -sudo -u git -H git checkout v1.9.4 +sudo -u git -H git checkout v2.0.0 ``` ## One line upgrade command diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md index 13c4de4301e..16817d1933d 100644 --- a/doc/web_hooks/web_hooks.md +++ b/doc/web_hooks/web_hooks.md @@ -124,12 +124,14 @@ Save the following file as `print_http_body.rb`. ```ruby require 'webrick' -server = WEBrick::HTTPServer.new(Port: ARGV.first) +server = WEBrick::HTTPServer.new(:Port => ARGV.first) server.mount_proc '/' do |req, res| puts req.body end -trap 'INT' do server.shutdown end +trap 'INT' do + server.shutdown +end server.start ``` diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature index a674800ccb8..e4f10c0de2e 100644 --- a/features/project/source/browse_files.feature +++ b/features/project/source/browse_files.feature @@ -13,7 +13,7 @@ Feature: Project Browse files Scenario: I browse file content Given I click on ".gitignore" file in repo - Then I should see it content + Then I should see its content Scenario: I browse raw file Given I visit blob file from repo diff --git a/features/steps/project/browse_files.rb b/features/steps/project/browse_files.rb index dd3f063da7f..9ea9c7cf138 100644 --- a/features/steps/project/browse_files.rb +++ b/features/steps/project/browse_files.rb @@ -20,7 +20,7 @@ class ProjectBrowseFiles < Spinach::FeatureSteps click_link ".gitignore" end - step 'I should see it content' do + step 'I should see its content' do page.should have_content "*.rbc" end diff --git a/lib/tasks/gitlab/shell.rake b/lib/tasks/gitlab/shell.rake index ece3ad58385..71716ae1856 100644 --- a/lib/tasks/gitlab/shell.rake +++ b/lib/tasks/gitlab/shell.rake @@ -24,8 +24,6 @@ namespace :gitlab do Dir.chdir(target_dir) do sh "git fetch origin && git reset --hard $(git describe #{args.tag} || git describe origin/#{args.tag})" - redis_url = URI.parse(ENV['REDIS_URL'] || "redis://localhost:6379") - config = { user: user, gitlab_url: gitlab_url, @@ -34,14 +32,21 @@ namespace :gitlab do auth_file: File.join(home_dir, ".ssh", "authorized_keys"), redis: { bin: %x{which redis-cli}.chomp, - host: redis_url.host, - port: redis_url.port, namespace: "resque:gitlab" }.stringify_keys, log_level: "INFO", audit_usernames: false }.stringify_keys + redis_url = URI.parse(ENV['REDIS_URL'] || "redis://localhost:6379") + + if redis_url.scheme == 'unix' + config['redis']['socket'] = redis_url.path + else + config['redis']['host'] = redis_url.host + config['redis']['port'] = redis_url.port + end + # Generate config.yml based on existing gitlab settings File.open("config.yml", "w+") {|f| f.puts config.to_yaml} diff --git a/vendor/assets/javascripts/jquery.sticky.js b/vendor/assets/javascripts/jquery.sticky.js deleted file mode 100755 index f7c9cd46ae9..00000000000 --- a/vendor/assets/javascripts/jquery.sticky.js +++ /dev/null @@ -1,170 +0,0 @@ -// Sticky Plugin v1.0.0 for jQuery -// ============= -// Author: Anthony Garand -// Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk) -// Improvements by Leonardo C. Daronco (daronco) -// Created: 2/14/2011 -// Date: 2/12/2012 -// Website: http://labs.anthonygarand.com/sticky -// Description: Makes an element on the page stick on the screen as you scroll -// It will only set the 'top' and 'position' of your element, you -// might need to adjust the width in some cases. - -(function($) { - var defaults = { - topSpacing: 0, - bottomSpacing: 0, - className: 'is-sticky', - wrapperClassName: 'sticky-wrapper', - center: false, - getWidthFrom: '', - responsiveWidth: false - }, - $window = $(window), - $document = $(document), - sticked = [], - windowHeight = $window.height(), - scroller = function() { - var scrollTop = $window.scrollTop(), - documentHeight = $document.height(), - dwh = documentHeight - windowHeight, - extra = (scrollTop > dwh) ? dwh - scrollTop : 0; - - for (var i = 0; i < sticked.length; i++) { - var s = sticked[i], - elementTop = s.stickyWrapper.offset().top, - etse = elementTop - s.topSpacing - extra; - - if (scrollTop <= etse) { - if (s.currentTop !== null) { - s.stickyElement - .css('position', '') - .css('top', ''); - s.stickyElement.trigger('sticky-end', [s]).parent().removeClass(s.className); - s.currentTop = null; - } - } - else { - var newTop = documentHeight - s.stickyElement.outerHeight() - - s.topSpacing - s.bottomSpacing - scrollTop - extra; - if (newTop < 0) { - newTop = newTop + s.topSpacing; - } else { - newTop = s.topSpacing; - } - if (s.currentTop != newTop) { - s.stickyElement - .css('position', 'fixed') - .css('top', newTop); - - if (typeof s.getWidthFrom !== 'undefined') { - s.stickyElement.css('width', $(s.getWidthFrom).width()); - } - - s.stickyElement.trigger('sticky-start', [s]).parent().addClass(s.className); - s.currentTop = newTop; - } - } - } - }, - resizer = function() { - windowHeight = $window.height(); - - for (var i = 0; i < sticked.length; i++) { - var s = sticked[i]; - if (typeof s.getWidthFrom !== 'undefined' && s.responsiveWidth === true) { - s.stickyElement.css('width', $(s.getWidthFrom).width()); - } - } - }, - methods = { - init: function(options) { - var o = $.extend({}, defaults, options); - return this.each(function() { - var stickyElement = $(this); - - var stickyId = stickyElement.attr('id'); - var wrapperId = stickyId ? stickyId + '-' + defaults.wrapperClassName : defaults.wrapperClassName - var wrapper = $('<div></div>') - .attr('id', stickyId + '-sticky-wrapper') - .addClass(o.wrapperClassName); - stickyElement.wrapAll(wrapper); - - if (o.center) { - stickyElement.parent().css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"}); - } - - if (stickyElement.css("float") == "right") { - stickyElement.css({"float":"none"}).parent().css({"float":"right"}); - } - - var stickyWrapper = stickyElement.parent(); - stickyWrapper.css('height', stickyElement.outerHeight()); - sticked.push({ - topSpacing: o.topSpacing, - bottomSpacing: o.bottomSpacing, - stickyElement: stickyElement, - currentTop: null, - stickyWrapper: stickyWrapper, - className: o.className, - getWidthFrom: o.getWidthFrom, - responsiveWidth: o.responsiveWidth - }); - }); - }, - update: scroller, - unstick: function(options) { - return this.each(function() { - var unstickyElement = $(this); - - var removeIdx = -1; - for (var i = 0; i < sticked.length; i++) - { - if (sticked[i].stickyElement.get(0) == unstickyElement.get(0)) - { - removeIdx = i; - } - } - if(removeIdx != -1) - { - sticked.splice(removeIdx,1); - unstickyElement.unwrap(); - unstickyElement.removeAttr('style'); - } - }); - } - }; - - // should be more efficient than using $window.scroll(scroller) and $window.resize(resizer): - if (window.addEventListener) { - window.addEventListener('scroll', scroller, false); - window.addEventListener('resize', resizer, false); - } else if (window.attachEvent) { - window.attachEvent('onscroll', scroller); - window.attachEvent('onresize', resizer); - } - - $.fn.sticky = function(method) { - if (methods[method]) { - return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); - } else if (typeof method === 'object' || !method ) { - return methods.init.apply( this, arguments ); - } else { - $.error('Method ' + method + ' does not exist on jQuery.sticky'); - } - }; - - $.fn.unstick = function(method) { - if (methods[method]) { - return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); - } else if (typeof method === 'object' || !method ) { - return methods.unstick.apply( this, arguments ); - } else { - $.error('Method ' + method + ' does not exist on jQuery.sticky'); - } - - }; - $(function() { - setTimeout(scroller, 0); - }); -})(jQuery); |
