Commit Graph

325 Commits

Author SHA1 Message Date
Lin Jen-Shin b07da07c82 Just enforce the output encoding for Ansi2html
Fixes https://sentry.gitlap.com/gitlab/gitlabcom/issues/27545/
2017-04-18 17:12:06 +08: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
Kamil Trzciński fb4a486605 Merge branch 'feature/runner-jobs-v4-api' into 'master'
Feature/runner jobs v4 api

Closes #28513

See merge request !9273
2017-03-07 13:53:26 +00:00
Grzegorz Bizon 66dd209661 Ignore job by default if it is a manual action
This makes it possible to maintain backwards compatibility with configs
created when manual actions were non-blocking.

From now manual actions are blocking if configured with `allow_failure:
false`, otherwise manual actions are optional, and their status is
ignored.
2017-03-06 12:01:33 +01:00
Tomasz Maczukin 3eafffcef0
Refactor JobRequest response structure 2017-03-02 17:45:45 +01:00
Sean McGivern 811e598f60 Enable and autocorrect the CustomErrorClass cop 2017-03-01 15:28:10 +00: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 56de781a2c Revert "Enable Style/DotPosition"
This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9.

# Conflicts:
#	.rubocop.yml
#	.rubocop_todo.yml
#	lib/gitlab/ci/config/entry/global.rb
#	lib/gitlab/ci/config/entry/jobs.rb
#	spec/lib/gitlab/ci/config/entry/factory_spec.rb
#	spec/lib/gitlab/ci/config/entry/global_spec.rb
#	spec/lib/gitlab/ci/config/entry/job_spec.rb
#	spec/lib/gitlab/ci/status/build/factory_spec.rb
#	spec/lib/gitlab/incoming_email_spec.rb
2017-02-23 09:33:19 -06:00
Douwe Maan 1fe7501b49 Revert "Prefer leading style for Style/DotPosition"
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
2017-02-23 09:33:05 -06:00
Douwe Maan 7d4b52b27d Enable Style/WordArray 2017-02-23 09:32:41 -06:00
Douwe Maan 6023fbfd0f Enable Style/EmptyLineBetweenDefs 2017-02-23 09:32:22 -06:00
Douwe Maan 206953a430 Prefer leading style for Style/DotPosition 2017-02-23 09:32:22 -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
Douwe Maan 3dadf306dd Enable Style/DotPosition 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
Douwe Maan f40716f48a No more and/or 2017-02-21 16:31:14 -06: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
Douwe Maan 93e98058ea Merge branch '20248-add-coverage-regex-in-job-yaml' into 'master'
Add ability to define a coverage regex in the .gitlab-ci.yml

Closes #20428

See merge request !7447
2017-02-02 17:01:52 +00: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
Leandro Camargo f1e920ed86 Simplify coverage setting and comply to some requests in code review 2017-01-25 01:07:44 -02:00
Leandro Camargo d0afc500e3 Change expected `coverage` structure for CI configuration YAML file
Instead of using:
`coverage: /\(\d+.\d+%\) covered/`

This structure must be used now:
```
coverage:
  output_filter: /\(\d+.\d+%\) covered/`
```

The surrounding '/' is optional.
2017-01-25 01:07:43 -02:00
Leandro Camargo 646b9c54d0 Comply to requests made in the review and adjust to the Entry/Node changes
This commit:
* Turns `coverage_regex` into `coverage` entry in yml file
* Fixes smaller requests from code reviewers for the previous commit
* This commit is temporary (will be squashed afterwards)

This commit does not (further commits will do though):
* Add global `coverage` entry handling in yml file as suggested by Grzegorz
* Add specs
* Create changelog
* Create docs
2017-01-25 01:07:43 -02:00
Leandro Camargo 6a3d29c73d Add ability to define a coverage regex in the .gitlab-ci.yml
* Instead of using the proposed `coverage` key, this expects `coverage_regex`
2017-01-25 01:07:43 -02: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
Sean McGivern 6c62482144 Merge branch '19086-double-newline' into 'master'
Fix Double Spaced CI Log

Closes #19086

See merge request !8349
2017-01-09 15:50:05 +00: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
Jared Deckard 9f3421730d Replace carriage return combos with line breaks tags 2016-12-28 16:32:45 -06: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
Grzegorz Bizon c1dbae9003 Merge branch 'fix-forbidden-for-build-api-for-deleted-project' into 'master'
Give forbidden if project for the build was deleted

I guess we don't need a change log entry because this is just for an internal corner case fix.

Closes #25309

See merge request !8091
2016-12-20 07:18:13 +00: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 3ea8d983ad Keep the value type for YAML variables
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8088#note_20235080
2016-12-19 21:15:47 +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