Implement Commit Status API
This is preliminary implementation of Commit Status API, pretty much compatible with GitHub.
1. The Commit Statuses are stored in separate table: ci_commit_status.
2. The POST inserts a new row.
3. To POST execute GitLab API `post :id/repository/commits/:sha/status`. This accepts dual authorization:
- Using authorized user
- Using ci-token to allow easy posting from CI Services
4. This adds predefined variable to GitLab CI build environment: CI_BUILD_STATUS_URL, allowing to easy post status from within build (ex. with code coverage or other metrics).
5. This adds statuses to commit's builds view.
6. The commit's status is calculated taking into account status of all builds and all posted statuses.
7. The commit statuses doesn't trigger notifications.
8. The commit status API introduces two new privileges: `read_commit_statuses` and `create_commit_status`.
9. We still miss a few tests and documentation updates for API and CI.
@dzaporozhets @sytses What do you think?
See merge request !1530
don't set LATEST_TAG automatically in patch update guide
As discussed in https://gitlab.com/gitlab-org/gitlab-ce/issues/2607, this removes the automatic setting of the LATEST_TAG variable in the update guide, because it could get set to rc versions.
Instead, a command was added to list all tags, with the most recent one being on the end of the list. Also a note was added to prevent users from updating to new minor/major versions because the tag list includes all tags.
[ci skip]
See merge request !1510
Basic RSpec/benchmark-ips powered benchmark suite
Corresponding issue: #2909, see the commit messages for more details.
A few things to note:
1. The current use of `subject` isn't exactly easy on the eyes due to them having to return a Proc, I'm not sure yet how (and if) we can work around this.
2. The maximum amount of iterations in the current `User.by_login` benchmark is arbitrary, we might have to adjust it once said method's performance has been improved.
3. Benchmarks currently take 2 seconds to warm up and 5 seconds to run (benchmark-ips defaults).
4. The custom RSpec matcher file (`benchmark_matchers.rb`) is a bit messy, any feedback on this would be appreciated
Any comments/feedback on this would be greatly appreciated.
See merge request !1503
Link to rake tasks
I believe there should be a link to rake tasks from backup restore, to give the user more options. That is why I added the link in the documentation.
Because of tweet https://twitter.com/gordonjb/status/641252693701476352
See merge request !1928
Use data stored in projects instead of ci_projects
- It delegates name, path, gitlab_url, ssh_url_to_repo
- Remove ability to set this parameters using CI API
This fixes GitLab project rename, namespace change, repository rename, etc.
/cc @dzaporozhets
See merge request !1404
- It delegates name, path, gitlab_url, ssh_url_to_repo
- Remove ability to set this parameters using CI API
This fixes GitLab project rename, namespace change, repository rename, etc.
Add support for AWS S3 Server-Side Encryption support
This adds support for AWS S3 SSE with S3 managed keys, this means the
data is encrypted at rest and the encryption is handled transparently to
the end user as well as in the AWS Console.
## Points to double check
I'm unsure on the best way to the handle the default. I've followed the `multipart_upload` de facto in the app. I'm happy to change this if required or if it will impact elsewhere e.g. omnibus packages
I also think I've managed to catch all of the documentation for this change as well.
### Why is this required
Many enterprises require good backup support but also for this to be encrypted. By default backups aren't encrypted, this allows at rest encryption to be supported in GitLab backups providing a layer of security should the physical media not be properly disposed of.
Relates to issue #2478.
See merge request !1280
Documentation of omniauth-ldap limitations
Further documentation about limitations directly impacting settings of
users' LDAP servers.
Closes#2613
See merge request !1421
Improve repo cleanup task
I accidentally wrote a new script, not seeing we already had one.
But the old one did not do enough (it only handled global namespace orhpans) so I figured I should just drop in the new script.
See merge request !1298