Commit Graph
2770 Commits
Author SHA1 Message Date
Kamil Trzcinski f088ffe8f7 Merge branch 'rs-remove-ci-disable'
See merge request !1512
2015-10-05 20:06:31 +02:00
Kamil Trzciński 3eef0e18e0 Merge branch 'refactor-build-service' into 'master'
Refactor Ci::Commit and Ci::Build to have all builds for same :sha on single page

This makes Ci::Commit to have only :sha and simplifies routing to have only :sha in path. The :ref and :push_data is now parameter of Ci::Build.

All commit related data (git author, message and .gitlab-ci.yml) is read directly from repository.

All code related for creating builds is moved to CreateBuildsService.

Status deduction is rewritten to make if more efficient and easier to integrate with Commit Status API.

This is partially working, tests are not yet touched.

This slightly changes view of Commit:
![Screen_Shot_2015-10-02_at_15.21.47](https://gitlab.com/gitlab-org/gitlab-ce/uploads/ad3f1ccdcc87659ea437d8db6c5b9f94/Screen_Shot_2015-10-02_at_15.21.47.png)

@dzaporozhets What do you think?


See merge request !1502
2015-10-05 17:42:50 +00:00
Robert Speicher fc59c45d58 Remove the option to disable CI
This option only existed to ease the CI-to-CE/EE migration process.

This commit partially reverts 8b05abe816
2015-10-05 12:23:38 -04:00
Yorick Peterse 8a78c4ea06 Exclude benchmarks from the spec Rake task 2015-10-05 18:01:28 +02:00
Yorick Peterse b6808f437d Merge branch 'benchmark-suite' into 'master'
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
2015-10-05 12:56:52 +00:00
Kamil Trzcinski d2d2df0738 Fix next round of tests 2015-10-05 13:12:00 +02:00
Kamil Trzcinski 317a746954 Make commit_spec run 2015-10-05 12:02:26 +02:00
Kamil Trzcinski e3d870d7fc Add user to Ci::Build to have pusher email address 2015-10-05 10:15:40 +02:00
Kamil Trzcinski 546a3c6561 Refactor commit and build 2015-10-05 09:52:35 +02:00
Guilherme Garnier 59d0263bc8 Fix rubocop warnings in lib 2015-10-03 01:29:58 -05:00
Yorick Peterse 19893a1c10 Basic setup for an RSpec based benchmark suite
This benchmark suite uses benchmark-ips
(https://github.com/evanphx/benchmark-ips) behind the scenes. Specs can
be turned into benchmark specs by setting "benchmark" to "true" in the
top-level describe block like so:

    describe SomeClass, benchmark: true do

    end

Writing benchmarks can be done using custom RSpec matchers, for example:

    describe MaruTheCat, benchmark: true do
      describe '#jump_in_box' do
        it 'should run 1000 iterations per second' do
          maru = described_class.new

          expect { maru.jump_in_box }.to iterate_per_second(1000)
        end
      end
    end

By default the "iterate_per_second" expectation requires a standard
deviation under 30% (this is just an arbitrary default for now). You can
change this by chaining "with_maximum_stddev" on the expectation:

    expect { maru.jump_in_box }.to iterate_per_second(1000)
      .with_maximum_stddev(10)

This will change the expectation to require a maximum deviation of 10%.

Alternatively you can use the it block style to write specs:

    describe MaruTheCat, benchmark: true do
      describe '#jump_in_box' do
        subject { -> { described_class.new } }

        it { is_expected.to iterate_per_second(1000) }
      end
    end

Because "iterate_per_second" operates on a block, opposed to a static
value, the "subject" method must return a Proc. This looks a bit goofy
but I have been unable to find a nice way around this.
2015-10-02 17:00:23 +02:00
Dmitriy Zaporozhets e0609a7800 Merge branch 'show-diff-stats-for-mr' 2015-10-01 17:02:53 +02:00
Dmitriy Zaporozhets a5d258e233 Merge branch 'fix-work-with-multibyte-chars-in-ldap-uid' into 'master'
Add support of multibyte characters in LDAP UID



See merge request !1472
2015-10-01 14:33:18 +00:00
Dmitriy Zaporozhets 0d967bce57 Show additions/deletions stats on merge request diff
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-01 13:52:08 +02:00
Kamil Trzcinski b9ccc79cb5 Delegate ci_project parameters to 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.
2015-09-30 12:48:40 +02:00
Петров Роман e82b37a653 Add support of multibyte characters in LDAP UID 2015-09-30 13:47:50 +03:00
Jacob Vosmaer 958af6f5c2 Merge branch 'master' into 'master'
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
2015-09-29 10:31:42 +00:00
Douwe Maan 084e35527c Merge branch 'orphaned-repo-cleanup' into 'master'
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
2015-09-29 07:35:59 +00:00
Stan Hu 4957415e00 Merge pull request #9650 from szechyjs/fb-close-comment
FogBugz Import: Include closed comments since they may contain user data
2015-09-25 16:46:50 -07:00
Paul Beattie 253d2320ab 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. This is optional and not
required to make S3 uploads work.
2015-09-25 17:06:31 +01:00
Ben Boeckel eb912a534b api: add enable_ssl_verification to PUT/POST hooks 2015-09-24 12:34:16 -04:00
Ben Boeckel 22db4398c6 api: expose note_events and enable_ssl_verification for hooks 2015-09-24 12:33:11 -04:00
Douwe Maan a58c6e9a95 Merge branch 'cleanup-ci-dashboard' into 'master'
Cleanup ci dashboard

Part of #2594. Based on !1403

* remove rendering GitLab projects with not enabled CI on CI dashboard
* remove enabling CI for projects from CI dashboard (now its done by simply pushing `.gitlab-ci.yml`)
* simplify the projects query for CI dashboard 

See merge request !1405
2015-09-24 07:32:29 +00:00
Douwe Maan 73a3df4de3 Fix LDAP attribute mapping 2015-09-23 16:37:59 +02:00
Dmitriy Zaporozhets 31b15e3dce Simplify CI projects query
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-23 15:30:24 +02:00
Douwe Maan b4bedfdfb9 Merge branch 'fix-user-identities-api' into 'master'
Fix user identities API

Added ability to update or set the identity of an existing user, like the documentation said it was possible, but actually wasn't.

@DouweM or @stanhu could you please take a look at my code, and see if its sound?

/cc @JobV 

See merge request !1398
2015-09-23 09:13:23 +00:00
Patricio Cano f60eb60473 Added ability to update or set the identity of an existing user, like the documentation said it was possible, but actually wasn't. 2015-09-22 16:26:59 -05:00
Achilleas Pipinellis 110e90c855 Skip check_initd_configured_correctly on omnibus installs
This was causing the task `gitlab-rake gitlab:incoming_email:check`
to fail.
2015-09-22 22:56:49 +03:00
Kamil Trzcinski 156ace4778 Add missing rake and change nginx config for CI migration 2015-09-22 09:45:52 +02:00
Robert Speicher d4acda1253 Merge branch 'rs-relative-link-up-one' into 'master'
Allow relative links to go up one directory level

See merge request !1352
2015-09-21 19:38:37 +00:00
Robert Speicher d4a960161e Merge branch 'rename-reply-by-email' into 'master'
Rename reply_by_email to incoming_email to prepare for the future.

Closes #2579.

See merge request !1367
2015-09-21 18:52:13 +00:00
Jared Szechy 4e2bb80fb3 FogBugz Import: Closed comments may contain user data 2015-09-21 10:49:44 -04:00
Jacob Vosmaer e0823d189f Relax CI version check during import 2015-09-21 11:46:12 +02:00
Jacob Vosmaer 25c7467ce1 Make importing builds less noisy 2015-09-21 11:42:59 +02:00
Douwe Maan 0c83349867 Merge branch 'master' into rename-reply-by-email 2015-09-21 10:35:56 +02:00
Douwe Maan ee028d9d60 Rename reply_by_email to incoming_email to prepare for the future. 2015-09-21 10:35:37 +02:00
Kamil Trzcinski ee0f1c00b1 Use GitlabCi::VERSION when checking migration 2015-09-21 10:33:35 +02:00
Marin Jankovski d2c90d7494 Merge branch 'optimize-ci-tags-migration' into 'master'
CI migration rake task for GitLab CE

- Uses backup format for final GitLab CI 8.0
- Highly optimized tags migration SQL queries


See merge request !1365
2015-09-21 08:26:06 +00:00
Kamil Trzcinski a37e591e74 Use INSERT INTO to insert tags 2015-09-21 10:07:53 +02:00
Robert Speicher 2b94f5fb06 Allow RelativeLinkFilter to go up multiple directories 2015-09-20 19:21:33 -04:00
Kamil Trzcinski 098c198271 Disable CI for time of migration 2015-09-21 00:14:07 +02:00
Kamil Trzcinski 500e277a83 Change notices during migrating 2015-09-21 00:13:58 +02:00
Kamil Trzcinski 265ad515c6 Create CI migration task on GitLab side 2015-09-20 23:20:51 +02:00
Kamil Trzcinski 45a105b127 Use pure SQL queries to migrate CI tags 2015-09-20 22:13:47 +02:00
Douwe Maan 3377808193 Fix reply by email for comments on a specific line in a diff/commit. 2015-09-20 18:18:39 +02:00
Robert Speicher 619f04c196 Allow relative links to go up one directory level 2015-09-18 14:03:42 -04:00
Valery SizovandKamil Trzcinski a0c1a12dee remove API calls from CE to CI 2015-09-18 18:02:11 +02:00
Dmitriy Zaporozhets ac571623d8 Merge branch 'pg_dump_schema' into 'master'
Add pg_schema to backup config

https://dev.gitlab.org/gitlab/gitlabhq/issues/2489

See merge request !1345
2015-09-18 14:33:35 +00:00
Valery Sizov d7242054ba add pg_schema to backup config 2015-09-18 16:29:13 +03:00
Kamil Trzcinski 97fa990406 Use 400 to notify that CI API is disabled 2015-09-18 12:46:47 +02:00