Commit Graph

131 Commits

Author SHA1 Message Date
Kamil Trzciński ac948684fc Merge branch '30634-protected-pipeline' into 'master'
Implement "Block pipelines on protected branches"

Closes #30634, #34616, and #33130

See merge request !11910
2017-07-25 15:04:23 +00:00
Kamil Trzcinski 0711d9adfc Fix support for old CI API when image or services are not specified 2017-07-22 15:07:52 +02:00
Lin Jen-Shin e9862a9900 Use struct instead of hash 2017-07-20 20:17:42 +08:00
Lin Jen-Shin a05bc477b9 Use hash to return multiple objects 2017-07-20 00:08:34 +08:00
Lin Jen-Shin c6bed06533 Merge remote-tracking branch 'upstream/master' into 30634-protected-pipeline
* upstream/master: (1168 commits)
  Job details won't scroll horizontally to show long lines
  Bring back branches badge to main project page
  Limit OpenGraph image size to 64x64
  Improve changelog
  Split up MergeRequestsController
  Add parent_id back to the tests
  Make changelog more descriptive
  Improve tests text
  Rename members_count to members_count_with_descendants and expose only to group admins
  Fix a bug where an invalid sort param value was passed to Gitaly
  Drop default ORDER scope when calling a find method on a Sortable model
  Add tests for project import state transition: [:started] => [:finished]
  Add CHANGELOG
  Perform housekeeping only when an import of a fresh project is completed
  Strip trailing whitespace in relative submodule URL
  Adjust projects spec on namespace fields
  Add "members_count" and "parent_id" data on namespaces API
  Removes redundant pending delete checks
  Fix gitaly ref encoding bugs
  Add ProjectWiki#ensure_repository
  ...
2017-06-29 21:14:47 +08:00
Tiago Botelho 34f57b462b Fix current feature related specs 2017-06-28 11:32:34 +01:00
Tomasz Maczukin 7805eea3c7
Refactor old formad handling in lib/ci/api/entities.rb 2017-06-12 12:58:36 +02:00
Tomasz Maczukin b7d6bb9763
Ensure that old API v1 generates still the same output 2017-06-12 12:58:35 +02:00
Lin Jen-Shin e86e1e515a Try to report why it's failing and fix tests 2017-06-06 21:19:07 +08:00
Rémy Coutable 4cfa5ce4a9
Enable the Style/PreferredHashMethods cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-02 19:11:26 +02:00
Kamil Trzcinski 6185d12c18 Add missing specs 2017-06-01 16:34:48 +02:00
Kamil Trzcinski e61f38d79e Fix data inconsistency issue for old artifacts by moving them to a currently used path 2017-06-01 14:39:48 +02:00
Kamil Trzciński 828d81ee1f Optimise trace handling code to use streaming instead of full read 2017-04-06 16:20:27 +00:00
Yorick Peterse d2283f4f0e
Backport API changes needed to fix sticking in EE
These changes are ported over from
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1502 to reduce
the number of merge conflicts that may occur.
2017-03-31 13:56:53 +02:00
Tomasz Maczukin 2e1b2233ce
Fix regression in runners registration v1 api 2017-03-13 16:35:10 +01:00
Tomasz Maczukin 3eafffcef0
Refactor JobRequest response structure 2017-03-02 17:45:45 +01:00
Robert Schilling 7d60876bc9 Backport new behavior to CI API 2017-02-28 08:32:39 +01:00
Lin Jen-Shin 83418ad846 Merge remote-tracking branch 'upstream/master' into 27762-add-default-artifacts-expiration
* upstream/master: (247 commits)
  Switched CONTRIBUTING.md style guide recommendation for method chaining
  Fix new offenses
  Stylistic tweaks
  Fix OAuth/SAML user blocking behavior
  Revert "Enable Style/DotPosition"
  Revert "Prefer leading style for Style/DotPosition"
  Revert "Enable Style/BarePercentLiterals"
  Manually correct autocorrect
  Move up delegate calls
  Exclude migrations from Style/MutableConstant
  ActiveSupport delegation is preferred over Forwardable
  Update haml_lint to work with newest rubocop
  Add explanations to cops
  Update rubocop and rubocop-rspec and regenerate .rubocop_todo.yml
  Update rubocop and rubocop-rspec and regenerate .rubocop_todo.yml
  Order cops alphabetically
  Don’t exclude some file in lib from rubocop
  Fix new offenses
  Enable Rails/Delegate
  Enable Style/WordArray
  ...
2017-02-24 17:14:35 +08:00
Douwe Maan 7d4b52b27d Enable Style/WordArray 2017-02-23 09:32:41 -06:00
Douwe Maan ccbebbdfeb Enable Performance/RedundantMatch 2017-02-23 09:31:57 -06:00
Douwe Maan b7d8df503c Enable Style/MutableConstant 2017-02-23 09:31:56 -06:00
Rémy Coutable 319dfd68a8 Merge branch 'grapify-ci-runners-api' into 'master'
Grapify the CI::Runners API

See merge request !9440
2017-02-22 15:11:49 +00:00
Robert Schilling 3d013487ce Grapify the CI::Runners API 2017-02-22 14:11:39 +01:00
Robert Schilling b8c88a839d Grapfiy the CI::Triggers API 2017-02-22 10:47:48 +01:00
Lin Jen-Shin a1b06a82ea rubocop: Align the operands of an expression
C: Style/MultilineOperationIndentation:
Align the operands of an expression in an assignment
spanning multiple lines.
2017-02-15 15:31:51 +08:00
Lin Jen-Shin 53c94f9ea2 Use the same syntax for default expiration
Feedback:

* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23343951
* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23344036
* https://gitlab.com/gitlab-org/gitlab-ce/issues/27762#note_23344797
2017-02-15 15:31:51 +08:00
Lin Jen-Shin d2d30cff55 Initial implementation for default artifacts expiration
TODO: Add tests and screenshots
2017-02-15 15:31:51 +08:00
Kamil Trzcinski 31be74c74b
Return struct instead of multiple values 2017-01-25 14:23:47 +01:00
Kamil Trzcinski c46445af92
Fix specs 2017-01-25 10:49:36 +01:00
Kamil Trzcinski 3441b4f93b
Fix picking CI builds
The conflict happens when we try to update a build,
but fail to do so due to fact that we update the same build concurrently for two different runners.
2017-01-25 10:49:35 +01:00
Kamil Trzcinski b368447cf7
Remove unneeded code and fix offenses 2017-01-25 10:47:58 +01:00
Kamil Trzcinski b7f4553e3e
Backport changes introduced by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1083 2017-01-20 12:25:53 +01:00
Kamil Trzcinski 8171a1932b
Merge remote-tracking branch 'origin/master' into 21698-redis-runner-last-build 2017-01-19 15:31:04 +01:00
Rémy Coutable c28b0a539d Don't instrument 405 Grape calls
Fixes #26051.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-09 10:02:52 +01:00
Lin Jen-Shin 8c9a4ed373 WIP: Add tests and make sure that headers are set
* We realized that headers were not set whenever we give 204
  because `render_api_error!` doesn't preserve the headers.

* We also realized that `update_runner_info` would be called in
  POST /builds/register every time therefore runner is updated
  every time, ticking the queue, making this last_update didn't
  work very well, and the test would be failing due to that.
2017-01-04 17:46:56 +08:00
Rémy Coutable 359718603e Ensure nil User-Agent doesn't break the CI API
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-21 11:46:16 +01:00
Lin Jen-Shin 18c9fc4224 Use a block to insert extra check for authenticate_build!
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091#note_20253762
2016-12-20 03:24:38 +08:00
Lin Jen-Shin ec003d9eb3 Prefer unless over if not
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/builds/7606797
2016-12-19 19:14:21 +08:00
Lin Jen-Shin 64d7772b6f Use a separate method to skip validation
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091#note_20222666
2016-12-19 18:43:06 +08:00
Kim "BKC" Carlbäcker 24f0a45b0f Do things in the correct order 2016-12-16 16:32:16 +01:00
Kim "BKC" Carlbäcker 811addf2d1 #NamingThings 2016-12-16 01:04:18 +01:00
Kim "BKC" Carlbäcker e179544342 Move redis-logic into Ci::Runner 2016-12-15 22:30:31 +01:00
Kim "BKC" Carlbäcker 771dd68cdf linting 2016-12-15 22:29:47 +01:00
Lin Jen-Shin e485b3f6ad Give forbidden if project for the build was deleted
Closes #25309
2016-12-15 00:28:55 +08:00
Kim "BKC" Carlbäcker aa224c13fc typo-o 2016-12-14 16:39:40 +01:00
Kim "BKC" Carlbäcker a6ab8a3409 Add BuildQueueWorker for injecting redis-keys 2016-12-14 16:06:50 +01:00
Kim "BKC" Carlbäcker afea2df151 First attempt 2016-12-14 14:35:43 +01:00
Tomasz Maczukin e3fb074022
Send credentials array with build data 2016-11-21 15:01:06 +01:00
Tomasz Maczukin 596bbf670c
Send registry_url with build data to GitLab Runner 2016-11-16 13:31:02 +01:00
Grzegorz Bizon 9a8e486307 Extract method that checks if ci runner needs update 2016-10-03 12:07:47 +02:00