Commit Graph
28431 Commits
Author SHA1 Message Date
Felipe Artur f04c5b27f0 current_user.confirmed_at.present? => current_user.confirmed? 2016-05-20 13:52:42 -04:00
Robert Speicher 5d031c868a Merge branch 'fix/url-refactor-from-ee' into 'master'
Update CE code to include some refactor done in EE to do with import url

This is simply updating the code to match EE and avoid further conflicts related to `import_data` and `import_url` changes made on EE only.

See merge request !4223
2016-05-20 17:10:28 +00:00
Jeroen van Baarsen c5a5d54842 Merge branch 'update-db-schema' into 'master'
Updated the DB schema

This updates `db/schema.rb` which apparently wasn't fully updated in the recent merge requests.

See merge request !4222
2016-05-20 16:18:32 +00:00
James Lopez 341c1181d9 refactor project to include some nicer EE stuff 2016-05-20 14:55:27 +02:00
Yorick Peterse 1472bb9247 Updated the DB schema 2016-05-19 23:13:51 -05:00
Robert Speicher f26389a02a Merge branch 'feature/runner-config-untagged-jobs' into 'master'
Add config for CI Runner that prevents it from picking untagged jobs

Closes #3456

See merge request !4039
2016-05-19 21:54:33 +00:00
Rémy Coutable f73def90a8 Merge branch 'fix-ci-commit-creation' into 'master'
Fix creation of Ci::Commit object which can lead to pending, failed in some scenarios

## What does this MR do?

If we use a new `project.ci_commits` it will add it to array, and some other services which can do a save on a project can lead to a scenario when `ci_commit` will be saved, where it should not be.

## What are the relevant issue numbers?

https://gitlab.com/gitlab-com/support-forum/issues/717 https://gitlab.com/gitlab-com/support-forum/issues/715 https://gitlab.com/gitlab-org/gitlab-ce/issues/17596 https://gitlab.com/gitlab-com/support-forum/issues/714 https://gitlab.com/gitlab-org/gitlab-ce/issues/13402

cc @rymai 


See merge request !4214
2016-05-19 21:42:24 +00:00
Jeroen van Baarsen fa7a682bb0 Merge branch 'fix-generator-templates-directory' into 'master'
Move generator templates to generator_templates/



See merge request !4217
2016-05-19 21:24:05 +00:00
Douwe Maan 3f6f2bbe14 Merge branch 'create-todo-on-failing-build' into 'master'
Create a todo on failing MR build

Implements #14067. I worked on this with @DouweM (any mistakes are mine).

When a build fails for a commit, create a todo for the author of the merge request that commit is the HEAD of. If the commit isn't the HEAD commit of any MR, don't do anything. If there already is a todo for that user and MR, don't do anything.

Current limitations:
- This isn't configurable by project.
- The author of a merge request might not be the person who pushed the breaking commit.
- I haven't tested this with a working CI setup, just with the unit tests below and by modifying my DB directly.


See merge request !3177
2016-05-19 21:18:22 +00:00
Douwe Maan 18ef054bc7 Merge branch '17464-backport-email-syntax-highlighting' into 'master'
Syntax-highlight diffs in push emails

![image](/uploads/8ecbabc65382214b8de63aae24f66cea/image.png)

Based on:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/151



See merge request !4147
2016-05-19 21:12:53 +00:00
Jeroen van Baarsen c50e7b1202 Merge branch 'fix/after-script-documentation-update' into 'master'
Update 'after_script' introduction note

Related to gitlab-org/gitlab-ci-multi-runner#1321

See merge request !4205
2016-05-19 21:00:12 +00:00
Kamil Trzcinski b876993677 Fix creation of Ci::Commit object which can lead to pending, failed in some scenarios 2016-05-19 15:51:41 -05:00
Douwe Maan bd0cecfdf6 Merge branch 'with-pipeline-view' into 'master'
Add pipeline view

This is continuation of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3653

cc @DouweM @grzesiek 

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/17551
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/15625


See merge request !3703
2016-05-19 20:42:43 +00:00
Robert Speicher 53e2d30af4 Merge branch 'fix-migration-helper-comment' into 'master'
Removed outdated comment from migration helpers

[ci skip]

See merge request !4213
2016-05-19 20:38:32 +00:00
Yorick Peterse e3aaab2d26 Updated Rubocop for generator_templates/ 2016-05-19 15:32:07 -05:00
Grzegorz Bizon 52c8b9da37 Use migration helper to prevent downtime migration 2016-05-19 22:11:40 +02:00
Grzegorz Bizon 4cc77c3bf8 Minor runner-related code refactorings 2016-05-19 22:01:53 +02:00
Grzegorz Bizon c3c503d259 Rename method that validates runner tag constrains 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 52ba3a2d05 Display validation errors when admin edits a runner 2016-05-19 22:01:53 +02:00
Grzegorz Bizon bf9cc351c2 Add minor corrections related to config of runner 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 0fd100d28d Improve setting default runner attrs when using API 2016-05-19 22:01:53 +02:00
Grzegorz Bizon f6dd8a5257 Move runner validator to separate private method 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 8ab4a67ca6 Use form errors helper in CI runner edit form 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 3b0eeccc03 Add not null constraint to run untagged runner option 2016-05-19 22:01:53 +02:00
Grzegorz Bizon b8cf2a340b Set run untagged option when registering a runner 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 9ba72378fc Refactor CI API specs for creating runner 2016-05-19 22:01:53 +02:00
Grzegorz Bizon b253aa32c7 Add docs for a new configuration setting for runner 2016-05-19 22:01:53 +02:00
Grzegorz Bizon da8b72d453 Extend runner options that are configurable via API 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 7b607cf4f0 Add Changelog entry for new runner configuration 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 8001eed06e Add method that check if build has tags 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 8252333183 Extend CI runners specs 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 9fd6f1b600 Improve displaying validation messages for runner 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 2ee24bd9ec Update specs to be valid only for tagged runner 2016-05-19 22:01:53 +02:00
Grzegorz Bizon dd8e9e2d7a Add custom validator to runner model 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 9129c37c5b Add CI API tests for runner config and untagged jobs 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 83df638455 Disallow runner to pick untagged build if configured 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 2aa5707194 Extend runner config options for untagged jobs 2016-05-19 22:01:53 +02:00
Grzegorz Bizon a8a205cd5c Add form for runner config to run untagged jobs 2016-05-19 22:01:53 +02:00
Grzegorz Bizon d0032935a1 Add runner db field for ability to run untagged jobs 2016-05-19 22:01:53 +02:00
Yorick Peterse 9429da3ae2 Move generator templates to generator_templates/
Since we eager load everything in lib/ putting ERB code in .rb files
will result in syntax errors. By moving the templates to
./generator_templates we can work around this.
2016-05-19 14:58:35 -05:00
Rémy Coutable e4a1af8353 Merge branch '12724-wrong-sorting-of-commit-order-in-mr-view' into 'master'
Resolve "Wrong sorting of commit order in MR view?"

!4052 fixed this for the most obvious cases, but there were still some problems.

Here's my test case: I have a branch where I was suffering from an unfortunate
issue. Every other commit I made had its commit date set to one day before it
should have been. (Perhaps my system clock was misbehaving.)

```shell
for i in {1..10}
do
  echo $i > $i
  git add $i
  GIT_COMMITTER_DATE=`date -v -$((i % 2))d` git commit -m $i
done
```

The git CLI still gives me the commits in the right order, but I can see that
the timestamps alternate between two values:

```shell
$ git log --format='%h %ct %p %s' master...HEAD
f0c3108 1463646313 3d38a13 10
3d38a13 1463559913 67f419b 9
67f419b 1463646313 74330c0 8
74330c0 1463559913 56361d7 7
56361d7 1463646313 ba1b60c 6
ba1b60c 1463559913 f91497d 5
f91497d 1463646313 79c5e57 4
79c5e57 1463559913 b953cef 3
b953cef 1463646313 12fc411 2
12fc411 1463559913 835715b 1
```

Unfortunately, GitLab didn't like this _at all_. Here's what the commits on my
MR from that branch looked like:
![image](/uploads/fdc38e932eeedcb77de9ec4b50ad1476/image.png)

That's because we were sorting the commits by date, which is safe if they are in
that order anyway. If they aren't, then because Ruby's sorting isn't stable, we
lose even the ordering among the correctly-ordered commits with the same
timestamp.

After these changes (and reloading the MR's diff), this looks like:
![image](/uploads/b09fb0f51359c1c89484e713e859512b/image.png)

The commits view was also wrong, but in a slightly different way. In table form:

| View | Before | After |
| --- | --- | --- |
| Commit list | 10, 8, 6, 4, 2, 9, 7, 5, 3, 1 | 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 |
| MR commits | 10, 2, 8, 4, 6, 5, 7, 3, 9, 1 | 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 |

Closes #12724

See merge request !4208
2016-05-19 19:04:29 +00:00
Jacob Schatz 0d5766e6f3 Merge branch 'deploy-key-alert-color' into 'master'
Fixed project settings alert colors

In another MR, the class name was changed making all the alert messages have no background color

![Screen_Shot_2016-05-16_at_15.41.23](/uploads/58c9cb8016c4cdd0b7a02609554d3598/Screen_Shot_2016-05-16_at_15.41.23.png)![Screen_Shot_2016-05-16_at_15.41.15](/uploads/03e0a9f6d2b6c583cef79efbb3fc73cc/Screen_Shot_2016-05-16_at_15.41.15.png)![Screen_Shot_2016-05-16_at_15.41.31](/uploads/41481ab2a4069def0e44c4bb8784fbb3/Screen_Shot_2016-05-16_at_15.41.31.png)

See merge request !4161
2016-05-19 18:56:15 +00:00
Jacob Schatz 86b22b4f15 Merge branch 'project-variables-ui' into 'master'
Project variables UI

![Screen_Shot_2016-04-27_at_09.01.23](/uploads/cb9b1ac42aa734cfd3271c03dfaccc12/Screen_Shot_2016-04-27_at_09.01.23.png)

![Screen_Shot_2016-04-27_at_09.01.29](/uploads/4f317014d60f205a0e29497ad20f8a2e/Screen_Shot_2016-04-27_at_09.01.29.png)

Closes #14091

See merge request !3942
2016-05-19 18:09:04 +00:00
Jacob Schatz 5566c9e706 Merge branch 'simplify-animation-css' into 'master'
Replace animate.css with a smaller subset of animations.

As discussed in #15667. This saves ~50KB uncompressed.

cc: @jschatz1 

See merge request !3937
2016-05-19 17:38:49 +00:00
Yorick Peterse c22be75794 Removed outdated comment from migration helpers 2016-05-19 12:36:02 -05:00
Jeroen van Baarsen dea3680006 Merge branch 'doc-broken-links' into 'master'
Fix broken documentation links

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15249

- [x] `/help/ui`- This is working for me
- [x] `/help/ci/examples/deployment/README.md` - Fixed
- [x] `/help/ci/api/projects.md` - Fixed
- [x] `/help/markdown/LICENSE` - Cannot do much to fix it, added a note.
- [x] `/help/ci/ssh/README.md` - Cannot find this link referenced anywhere.

See merge request !3903
2016-05-19 17:32:04 +00:00
Rémy Coutable f780bac0cc Merge branch 'patch-1' into 'master'
Fixed advice on invalid permissions on upload path

When running the checks, my upload path has wrong permissions, the advice could not fix it because it does not change the permission of this directory (only sub-directories).
```
Uploads directory setup correctly? ... no
  Try fixing it:
  sudo find /home/git/gitlab/public/uploads -type d -not -path /home/git/gitlab/public/uploads -exec chmod 0700 {} \;
  For more information see:
  doc/install/installation.md in section "GitLab"
  Please fix the error above and rerun the checks.
```

Executing this instead fixed the error :
```
sudo chmod 700 /home/git/gitlab/public/uploads
```

See merge request !2948
2016-05-19 17:30:34 +00:00
Robert Speicher 883e2d2187 Merge branch 'migration-helpers' into 'master'
Added helper methods for database migrations

These helpers can ultimately be used to write migrations that don't
require downtime.

See #15464 for more information.

See merge request !3860
2016-05-19 16:49:14 +00:00
Robert Speicher 9cd21b325d Merge branch 'fix-svg-constant-errors' into 'master'
Fix warning messages with SVG ALLOWED_ELEMENTS

Define the right module names so that Rails autoloading and eager loading will work properly.

Eliminates "warning: already initialized constant Gitlab::Sanitizers::SVG::ALLOWED_ELEMENTS"

See merge request !4207
2016-05-19 16:41:47 +00:00
Robert Speicher bbf0a04f5e Merge branch 'mooreniemi/gitlab-ce-issue_15236' into 'master'
Changing the confidentiality of an issue now creates a new system note

Closes #15236.

See merge request !4189
2016-05-19 16:27:09 +00:00