Commit Graph

396 Commits

Author SHA1 Message Date
Tomasz Maczukin 5c1aa5fb65
Add some fixes and refactoring after review 2017-03-02 17:48:00 +01:00
Tomasz Maczukin 1bbf2c2cd1
Fix rubocop offenses 2017-03-02 17:45:46 +01:00
Tomasz Maczukin fb8210ad19
Update step data naming 2017-03-02 17:45:45 +01:00
Tomasz Maczukin bbf5bb7070
Fix rubocop offenses 2017-03-02 17:45:45 +01:00
Tomasz Maczukin 3eafffcef0
Refactor JobRequest response structure 2017-03-02 17:45:45 +01:00
Lin Jen-Shin dc3a41f405 Fix tests for added default cache key 2017-03-03 00:30:22 +08:00
Lin Jen-Shin 6e032d7ba0 Set default cache key for jobs, detail:
* Replace Unspecified with a field so that it's less surprising
* Define inspect for Node for easy debugging (and avoid building
  a very huge string potentially from built-in inspect)
* Set default cache key to 'default'
2017-03-02 22:12:15 +08:00
Sean McGivern 811e598f60 Enable and autocorrect the CustomErrorClass cop 2017-03-01 15:28:10 +00:00
Douwe Maan f88ff0cc0c Stylistic tweaks 2017-02-23 09:33:20 -06: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 e2bbbb1a9a Fix new offenses 2017-02-23 09:32:42 -06:00
Douwe Maan 75f5fa997d Enable Rails/Delegate 2017-02-23 09:32:42 -06:00
Douwe Maan eacae00516 Enable Style/MultilineHashBraceLayout 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 5c7f9d69e3 Fix code for cops 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 6a1b3ef73f Merge branch 'zj-drop-ruby-21-tests' into 'master'
Update Rubocop to Ruby 2.3

See merge request !8994
2017-02-13 10:22:38 +00:00
Z.J. van de Weg 128b1eae09 Update Rubocop to ruby 2.3 2017-02-07 15:16:46 +01:00
Grzegorz Bizon 149f67cc2e Remove coverage entry from global CI/CD options 2017-02-04 23:04:17 +01: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 Trzciński 5ac590677f Merge branch '25910-convert-manual-action-icons-to-svg-to-propperly-position-them' into 'master'
Convert pipeline action icons to svg to have them propperly positioned

Closes #25910

See merge request !8766
2017-01-31 11:42:06 +00:00
Filipa Lacerda 7db05c4da1 Removed unused method 2017-01-26 19:56:07 +00:00
Lin Jen-Shin 050103f209 Make sure TraceReader uses Encoding.default_external
Encoding.default_external was chosen over
Encoding.default_internal because File.read is
returning Encoding.default_external, therefore
we should align with it. Alternatively, we could
force both of them to be Encoding.default_internal.

However, ideally this should be determined by different
projects. For example, some projects might want to use
an encoding different to what GitLab is using.

This might not happen soon though.

Closes #27052
2017-01-26 18:29:44 +08:00
Filipa Lacerda 4983fbaaf4 Remove unneeded 'borderless' from icons name 2017-01-25 15:44:45 +00:00
dimitrieh 066155704d added icons and fixed mini pipeline action dropdown icons 2017-01-25 15:44:44 +00:00
Leandro Camargo 441a9beec3 Make some other refinements to validation logic 2017-01-25 01:07:45 -02:00
Leandro Camargo 8fe708f4a2 Make more code improvements around the '/' stripping logic 2017-01-25 01:07:45 -02:00
Leandro Camargo be7106a145 Force coverage value to always be surrounded by '/' 2017-01-25 01:07:44 -02:00
Leandro Camargo 6323cd7203 Comply to more requirements and requests made in the code review 2017-01-25 01:07:44 -02: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 bb12ee051f Fix wrong description for Coverage entry (in ruby comments) 2017-01-25 01:07:44 -02:00
Leandro Camargo 0713a7c3a9 Add specs to cover the implemented feature and fix a small bug 2017-01-25 01:07:44 -02:00
Leandro Camargo 9f97cc6515 Add `coverage` to the Global config entry as well 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 Trzciński 7446c2f5cf Merge branch 'feature/success-warning-icons-in-stages-builds' into 'master'
Use a warning icon for a stage with allowed to fail builds

Closes #21948

See merge request !8503
2017-01-23 14:32:06 +00:00
Grzegorz Bizon 73fcfb296c Add a default status const to common status concern 2017-01-18 11:34:55 +01:00
Grzegorz Bizon 3bc0525ad9 Extract compound statuses method in status factory 2017-01-18 11:30:28 +01:00
Grzegorz Bizon 9f1beed7a7 Link external commit status badge to a target URL
Using new detailed statuses factory for external commit statuses.
2017-01-17 14:30:33 +01:00
Grzegorz Bizon 8faf0c7abe Add detailed statuses for external commit statuses 2017-01-17 14:16:36 +01:00
Grzegorz Bizon 227cbdd8ba Use detailed status for failed but allowed builds 2017-01-12 13:23:18 +01:00
Grzegorz Bizon 48c19e7395 Expose methods that match statuses in status factories 2017-01-12 13:04:51 +01:00
Grzegorz Bizon 1d01ffb782 Make it possible to combine extended CI/CD statuses
This commit also makes it possible to configure exclusive groups.
There can be only one detailed status matched within an exclusive group,
which is important from the performance perspective.
2017-01-12 12:45:00 +01:00
Grzegorz Bizon 9f1279184b Add extended status for build failed but allowed to 2017-01-11 13:53:17 +01:00
Grzegorz Bizon 8dbd1e7d00 Add concrete success warning status to stage factory 2017-01-11 13:53:17 +01:00
Grzegorz Bizon 8b30dd9834 Extract abstract success with warnings CI/CD status 2017-01-11 13:53:17 +01:00
Z.J. van de Weg 6ef6f9f205 Do not check for valid url for .gitlab-ci.yml
Until this commit, GitLab would check if the URL in your .gitlab-ci.yml
would be valid and adressable. However, this approach is rather limited.

To begin, the URL couldn't be http://example:$PORT/my-project, as the
PORT value would be interpolated after checking if the URL was valid,
which its not. Also this gem will limit the amount of protocols allowed.

This commit doesn't check, at all, if the URL is valid. This is now the
responsablilty of the user. In my opion this is right, as the user
ultimately benefits from a correct URL, but also, its impossible to
cover all cases.
2017-01-05 19:59:10 +01:00
Grzegorz Bizon 1476bb2c54 Improve how we calculate detailed status group name 2016-12-16 20:03:44 +01:00
Grzegorz Bizon b18897ac40 Update status group name for success with warnings 2016-12-16 20:03:44 +01:00
Grzegorz Bizon 1b313e8db8 Make CI/CD detailed status group concept explicit 2016-12-16 20:03:44 +01:00
Grzegorz Bizon 84290a452d Make it possible to mix `Gitlab::Routing` in 2016-12-13 14:51:23 +01:00
Grzegorz Bizon 00970606d7 Extract abilities checking module from ability model 2016-12-13 14:44:43 +01:00
Grzegorz Bizon 48d43608b8 Refine build stop/play extended status specs 2016-12-13 12:27:01 +01:00
Grzegorz Bizon 2011f8f1c2 Use manual build icon in play/stop build statuses 2016-12-13 11:53:36 +01:00
Grzegorz Bizon ab37be2dda Add specs for build stop extended detailed status 2016-12-12 14:59:46 +01:00
Grzegorz Bizon ffafd09731 Fix build stop extended status CSS class 2016-12-12 14:14:35 +01:00
Grzegorz Bizon d60820146f Fix path to build status details in common helpers 2016-12-12 13:28:20 +01:00
Kamil Trzcinski d9a979c84f Add action_class/action_title 2016-12-12 12:59:02 +01:00
Kamil Trzcinski 980009e6e8 Fix auto loading of constants for Ci Statuses 2016-12-12 12:59:01 +01:00
Grzegorz Bizon f0cd73bfad Fix some detailed statuses specs related to abilities 2016-12-12 12:59:01 +01:00
Grzegorz Bizon 5059d0b834 Incorporate permission checks into new CI statuses
[ci skip]
2016-12-12 12:59:01 +01:00
Grzegorz Bizon e0ce97fb7d Refactor ci status factories to DRY code a little 2016-12-12 12:59:01 +01:00
Kamil Trzcinski a83a80edb3 Check permission of details 2016-12-12 12:59:01 +01:00
Kamil Trzcinski 1b6c2c3c0a Introduce `cancelable` and `returnable` [ci skip] 2016-12-12 12:59:01 +01:00
Kamil Trzcinski 516dc7a5be Improve actions 2016-12-12 12:59:01 +01:00
Kamil Trzcinski 633e64382d Added Ci::Status::Build 2016-12-12 12:59:01 +01:00
Kamil Trzcinski 93c72e0f71 Add Ci::Status::Factory 2016-12-07 13:14:45 +01:00
Kamil Trzcinski 13cee6d7fc Fix test failures 2016-12-06 14:13:21 +01:00
Kamil Trzcinski 10499677e2 Added Stage tests 2016-12-06 14:13:21 +01:00
Kamil Trzcinski d47aef58cd Add Ci::Status::Stage 2016-12-06 14:13:21 +01:00
Grzegorz Bizon e94f378b61 Improve support for icons in new detailed statuses 2016-12-06 12:16:52 +01:00
Grzegorz Bizon bdc13c3142 Untangle status label and text in ci status helper 2016-12-06 11:22:31 +01:00
Grzegorz Bizon d28f5e776b Implement pipeline status factory with extended status 2016-12-05 12:07:14 +01:00
Grzegorz Bizon b86d8afe23 Fold core/extended status modules to reduce nesting 2016-12-05 11:35:27 +01:00
Grzegorz Bizon c7c249407e Add implementation of common pipeline extended status 2016-12-02 14:23:43 +01:00
Grzegorz Bizon 0c7168b98d Add information about badge test to core statuses 2016-12-02 13:56:33 +01:00
Grzegorz Bizon 119757ac9c Add scaffold for remaining statuses-related classes 2016-12-02 13:27:26 +01:00
Grzegorz Bizon 943b3d0e00 Implement the rest of core CI statuses with specs 2016-12-02 13:08:21 +01:00
Grzegorz Bizon d4ed5b2e0c Add abstract base class for core CI status 2016-12-02 12:38:07 +01:00
Grzegorz Bizon 5df3e8b81b Add initial implmentation for core success status 2016-12-02 12:14:10 +01:00
Grzegorz Bizon be797097df Add scaffold for each class of core CI status 2016-12-02 11:17:48 +01:00
Kamil Trzciński 0f59075030 Merge branch 'fix/ci-linter-undefined-error' into 'master'
Fix undefined error in CI linter

## What does this MR do?

This MR fixes undefined error in CI linter.

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [x] Tests added for this feature/bug
  
## What are the relevant issue numbers?

Closes #24759

See merge request !7650
2016-11-22 09:20:45 +00:00
Grzegorz Bizon c048d5d2d9 Fix entry lookup in CI config inheritance rules 2016-11-22 09:09:38 +01:00
Kamil Trzciński 3c8d2148fc Merge branch 'feature/send-registry-address-with-build-payload' into 'master'
Send registry address with build payload

## What does this MR do?

Adds `registry_url` as a part of a build payload, when sending a response to a GitLab Runner which requested a new build.

## Are there points in the code the reviewer needs to double check?

Change in `lib/ci/api/entities.rb`.

## Why was this MR needed?

This is one of the steps needed to add support for private/protected registries hosted with GitLab CE/EE.

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Related to gitlab-org/gitlab-ci-multi-runner#1828, gitlab-org/gitlab-ci-multi-runner!386, gitlab-org/gitlab-ci-multi-runner#1434

See merge request !7474
2016-11-21 20:22:55 +00:00
Tomasz Maczukin 461195665b
Add Gitlab::Ci::Build::Credentials module with build credentials abstraction 2016-11-21 19:49:29 +01:00
Tomasz Maczukin e3fb074022
Send credentials array with build data 2016-11-21 15:01:06 +01:00
Grzegorz Bizon bf25b5f69d Remove CI config helper with same name as an entry 2016-11-18 14:30:27 +01:00
Grzegorz Bizon 65724301e6 Make CI job script a required configuration entry 2016-11-18 14:14:41 +01:00
Grzegorz Bizon b3f38797fd Fix indentation in CI variables entry class 2016-11-14 11:46:41 +01:00
Grzegorz Bizon a761d29366 Change name of method for setting CI config entries 2016-11-14 10:51:56 +01:00
Grzegorz Bizon c701468390 Improve naming convention in ci configuration module 2016-11-14 10:31:45 +01:00
Rémy Coutable f0c7e6713f Merge branch '22191-delete-dynamic-envs-mr' into 'master'
Delete dynamic environments

- Adds "close environment" action to a merge request
- Adds tabs to environments list
- Adds close button to each environment row in environments list
- Replaces Destroy button with Close button inside an environment
- Adds close button to builds list inside an environment

#### Configuration

In order to enable stopping environments a valid `.gitlab-ci.yml` syntax has to be used:

```
review:
  environment:
    name: review/$app
    on_stop: stop_review

stop_review:
  script: echo Delete My App
  when: manual
  environment:
    name: review/$app
    action: stop
```

This MR requires that `stop_review` has to have: `when`, `environment:name` and `environment:action` defined.
The next MR after this one will verify that and enforce that these settings are configured.

It will also implicitly configure these settings, making it possible to define it like this:

```
review:
  environment:
    name: review/$app
    on_stop: stop_review

stop_review:
  script: echo Delete My App
```

Closes #22191 

See merge request !6669
2016-10-19 07:53:05 +00:00
Kamil Trzcinski 25dd1712ca Add specs to test on_stop and action on environments 2016-10-17 16:23:17 +02:00
Kamil Trzcinski 9b790f1cf9 Improve after code review 2016-10-17 16:13:19 +02:00
Kamil Trzcinski 5f98d05939 Add `action` and `on_stop` to `environment` in .gitlab-ci.yml 2016-10-17 12:46:00 +02:00
Kamil Trzcinski 3f85c3ef16 Initial support for closing environments 2016-10-06 13:16:34 +02:00
Lin Jen-Shin 637a41400c Merge remote-tracking branch 'upstream/master' into pipeline-emails
* upstream/master: (206 commits)
  Implement fourth round of comments from @DouweM.
  Fix `CreateDeploymentService` spec.
  Reload issues in spec to ensure label<->issue mapping properly loaded
  Fix build.
  Remove unnecessary #{} in cycle analytics template.
  Update cycle analytics icon and fix color of the dismiss button.
  Use triple dashes for the empty value in cycle analytics.
  Fix typo on cycle analytics copy.
  Add page title and fix sub menu width in Cycle Analytics page.
  Update Cycle Analytics Read more link URL.
  Display the cycle analytics navbar based on the `:read_cycle_analytics` ability.
  Improve indentation in `Gitlab::Database::Median`
  Add a spec for merge request metric caching while refreshing a merge request from a forked project.
  Use the `IssuableBaseService` lifecycle hooks to cache `MergeRequestsClosingIssues`
  Implement a second round of review comments from @DouweM.
  Add docs on Cycle Analytics
  Test if issue authors can access private projects
  Update .pkgr.yml with Ubuntu 16.04 dependencies
  fix issues mr counter
  Move JSON generation (cycle analytics) into a controller method.
  ...
2016-09-21 16:19:07 +08:00
Lin Jen-Shin 63e03dada7 Make various trace methods take last_lines argument:
So that we could read last few lines rather than read
the entire file which could be huge.
2016-09-21 16:12:32 +08:00
Grzegorz Bizon 31e8721a44 Fix scope of the CI config key nodes in jobs entry 2016-09-19 10:07:15 +02:00
Grzegorz Bizon 99f1385ee0 Restore validation of CI job environment name 2016-09-19 10:07:14 +02:00
Grzegorz Bizon 2ad7753d34 Fix CI job environment configuration attributes 2016-09-19 10:07:14 +02:00
Grzegorz Bizon 3fbfc30f5e Fix CI job environment configuration entry class 2016-09-19 10:07:14 +02:00
Kamil Trzcinski abfceb1e56 Cleanup changes 2016-09-19 10:07:14 +02:00
Kamil Trzcinski 6b97968745 Update support for dynamic environments 2016-09-19 10:07:13 +02:00
Kamil Trzcinski 08272ec151 Add validation of URL and validation of name 2016-09-19 10:07:12 +02:00
Grzegorz Bizon ba5bd3d1d6 Add new CI configuration entry for the environment 2016-09-19 10:07:12 +02:00
Kamil Trzcinski a4638dddf2 Add support for dynamic environments
Environments that can have a URL with predefined CI variables.
2016-09-19 10:05:35 +02:00
Rémy Coutable eb2d20665f Merge branch 'smart-pipeline-duration' into 'master'
Smartly calculate real running time and pending time

## What does this MR do?

Try to smartly calculate the running time and pending time for pipelines, instead of just use wall clock time from start to end. The algorithm is based on:

> Suppose we have A, B, and C jobs:

> * A: from 1 to 3
> * B: from 2 to 4
> * C: from 6 to 7

> The processing time should be accumulated from 1 to 4, and 6 to 7, totally 4, excluding retires, and calculate on `%w[success failed running canceled]` jobs (if a job is not finished yet, assume it's `Time.now`)

## Are there points in the code the reviewer needs to double check?

I would actually like to test `Gitlab::Ci::PipelineDuration#process_segments`, but it's a private method right now and it's not very convenient to test it. Is there a way to test it without changing the original code too much? Note that I would like to avoid saving merged segments because it's not used and should be garbage collected.

## Screenshots:

![Screen_Shot_2016-09-05_at_6.45.32_PM](/uploads/a82bfaf316661091e383b743a2f11334/Screen_Shot_2016-09-05_at_6.45.32_PM.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- Tests
  - [x] Added for this feature/bug

## What are the relevant issue numbers?

Closes #18260, #19804

See merge request !6084
2016-09-08 17:38:20 +00:00
Lin Jen-Shin 822efd5c3b Struct.new could take a block for defining methods, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_15091858
2016-09-08 23:55:07 +08:00
Lin Jen-Shin 27a3f1182a Split try_merge_period into overlap? and merge:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_15083507
2016-09-08 21:49:17 +08:00
Lin Jen-Shin 61bc90af0e Be more specific since it's not needed to be generic now,
feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_14995016
2016-09-06 19:57:51 +08:00
Lin Jen-Shin 7351c269de Sort by database, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_14991226
and
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_14994233
2016-09-06 19:36:07 +08:00
Lin Jen-Shin 3a68c98973 Just use module because there's nothing to save, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_14992064
2016-09-06 19:14:28 +08:00
Lin Jen-Shin b92c75ab98 Use sum, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_14991392
2016-09-06 18:12:46 +08:00
Lin Jen-Shin d071f61b0d Forget about pending duration for now, need more discussion 2016-09-05 17:55:30 +08:00
Grzegorz Bizon 2436631dea Merge branch 'master' into refactor/ci-config-add-logical-validation
* master: (414 commits)
  Remove suggested colors hover underline
  Fix markdown anchor icon interaction
  Fix expiration date picker after update
  Refactored code to rely less on IDs that could change
  Move CHANGELOG entry for !5858 from 8.11 to 8.12
  Hides merge request section in edit project when disabled
  Fix a typo
  Change minimum Unicorns required to two
  Update memory requirements
  Added `.term-bold` declaration.
  Change the inline code to codeblocks for the new features doc guideline
  Fix GitLab import button
  Rename behaviour to behavior in bug issue template for consistency
  Convert datetime coffeescript spec to ES6
  Align add button on repository view
  Update CHANGELOG with 8.11.4 entries.
  removed null return - renamed 'placeTop' to 'placeProfileAvatarsToTop'
  Refactor Ci::Build#raw_trace
  Move CHANGELOG entry to a proper version
  Change widths of content in MR pipeline tab
  ...

Conflicts:
	lib/gitlab/ci/config/node/jobs.rb
2016-09-03 09:35:21 +02:00
Lin Jen-Shin 7aaed299eb Just sum all the queuing time, indication for needing more runners 2016-09-02 23:43:10 +08:00
Lin Jen-Shin defd889905 Actually we still need to use total - running to get:
real pending time, because that's actually by definition,
(the time that it's not running!)
or we could end up with awfully complicated algorithm :(
2016-09-02 21:08:26 +08:00
Lin Jen-Shin 245103e888 Merge remote-tracking branch 'upstream/master' into smart-pipeline-duration
* upstream/master: (289 commits)
  Fix a typo
  Change minimum Unicorns required to two
  Update memory requirements
  Change the inline code to codeblocks for the new features doc guideline
  Update CHANGELOG with 8.11.4 entries.
  removed null return - renamed 'placeTop' to 'placeProfileAvatarsToTop'
  Change widths of content in MR pipeline tab
  Add curve to generic commit status pipeline
  Rubocop syntax 2.3
  Some minor updates for upgrade guides for 8.12.
  Remove inconsistent font weight for sidebar's labels
  Replace play icon font with svg
  Project tools visibility level
  Added todo filter tests
  Fixed project filtering
  Review changes, simplified dropdown init
  Removed select2 from todos feature spec
  Removed inline JS and improved dropdown labels
  Added type and action dropdowns, need to finalize by removing all inline and polishing off the selected dropdown states
  Completed project filter dropdown, still need to move it from inline to ProjectSelect.js (or different)
  ...
2016-09-02 19:33:19 +08:00
Lin Jen-Shin 39c090fecb Calculate real queueing time to exclude gaps from:
retries and probably also manual actions!

Feedback:

* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_14735478
* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_14737804
2016-09-02 19:15:42 +08:00
Lin Jen-Shin d2cfcb3ec1 Use guard clause, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_14754681
2016-08-31 16:48:29 +08:00
Lin Jen-Shin 1e49a8bc6c Introduction to PipelineDuration 2016-08-31 03:09:16 +08:00
Lin Jen-Shin f10a1e331d Fix renaming 2016-08-30 23:11:57 +08:00
Lin Jen-Shin 2af2b78e49 Avoid shadowing method name. Just use existing method 2016-08-30 23:08:25 +08:00
Lin Jen-Shin 1f6efa352c Rename to periods since it's easier to understand 2016-08-30 23:06:29 +08:00
Lin Jen-Shin bd78e6af29 Use algorithm from Kamil:
Excluding sorting, this is O(n) which should be much faster and
much simpler and easier to understand.
2016-08-30 23:02:39 +08:00
Lin Jen-Shin 7e32e2ef20 build might not start yet 2016-08-30 02:53:53 +08:00
Lin Jen-Shin e9e7c3788d no builds no pending 2016-08-29 23:40:15 +08:00
Lin Jen-Shin ace0a005b8 Smartly calculate real running time and pending time 2016-08-29 20:24:48 +08:00
Grzegorz Bizon 1255205d89 Add method that returns commands for ci job entry 2016-08-29 13:11:35 +02:00
Grzegorz Bizon 62f704c5ad Make it possible to inherit global ci config nodes 2016-08-29 13:10:20 +02:00
Grzegorz Bizon 2991f93f2f Rename CI config hidden job entry to hidden entry 2016-08-29 09:30:48 +02:00
Grzegorz Bizon b125006517 Do not enforce using a hash with hidden ci key 2016-08-29 09:20:53 +02:00
Grzegorz Bizon 30f58cf392 Add [] method for accessing ci entry dependencies 2016-08-25 14:31:06 +02:00
Grzegorz Bizon 4f837f6690 Remove temporary stub method from ci config nodes 2016-08-25 13:58:46 +02:00
Grzegorz Bizon eaf211c2e3 Expose compose method in the ci config entry nodes 2016-08-25 13:49:15 +02:00
Grzegorz Bizon 700078e8e4 Rename unspecified and undefined CI config nodes 2016-08-25 11:37:45 +02:00
Grzegorz Bizon 6c704fd99e Inject dependencies into each CI config entry node 2016-08-25 11:37:45 +02:00
Grzegorz Bizon 57451f52cd Memoize CI config node validator to prevent leaks 2016-08-09 11:29:32 +02:00
Robert Speicher 34c083a184 Merge branch 'rubocop/enable-access-modifiers-cops' into 'master'
Enable Rubocop cops that check access modifiers

## What does this MR do?

This MR enables Rubocop cops that detect methods that should be restricted but are the part of public API because of access modifiers used improperly.

This also fixes existing offenses.

## Why was this MR needed?

Some method in our codebase are public instead of being private because it is sometimes difficult to get it right without static analysis.

## What are the relevant issue numbers?

See #17478  
Closes #17372 

See merge request !5014
2016-07-29 15:58:09 +00:00
Grzegorz Bizon a42cce1b96 Improve code, remove unused validator, improve names 2016-07-29 14:09:35 +02:00
Grzegorz Bizon dff10976da Move job dependencies entry to the new CI config 2016-07-20 14:15:18 +02:00
Grzegorz Bizon f83bccfe4f Add minor readability, style improvements in CI config 2016-07-20 14:02:09 +02:00
Grzegorz Bizon 795c9f2241 Merge branch 'master' into refactor/ci-config-move-job-entries
* master: (321 commits)
  Fix the Sentry spam from CSP violations by disabling it.
  Limit git rev-list output count to one in forced push check
  Ensure Owners are included in the scope for authorized_projects
  Fix alignment of icons on project page
  Fix ci_status_helper_spec to look for new SVGs
  use 2.0.5, actually (2.0.4 was a bad release)
  upgrade rouge to 2.0.4
  Fix help page paths to make sure shortcuts and the UI help page work.
  fixes an issue cause by a bad merge
  Vertically align status icon within table
  Add new icons for every CI status
  Add global style for running icon
  Align running icon in merge request
  Add new running icon; add a bunch of styles to get svg to match existing fa icons
  Improve code design
  Fix broken builds_for_ref
  Move when tests before to make it no conflict with manual-actions
  Use value of `yaml_variables` and `when` from config_processor if undefined
  Add CHANGELOG entry
  CHANGELOG item
  ...

Conflicts:
	lib/ci/gitlab_ci_yaml_processor.rb
	spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
2016-07-20 10:44:01 +02:00
Grzegorz Bizon d6f6697744 Enable Rubocop cops for invalid access modifiers
This enables following cops:

Check for useless access modifiers

  Lint/UselessAccessModifier

Checks for attempts to use `private` or `protected` to set the
visibility of a class method, which does not work.

  Lint/IneffectiveAccessModifier

This also disables two false possitives in concerns.
2016-07-19 15:12:15 +02:00
Grzegorz Bizon bb8bf6427d Move job environment validation to new CI config 2016-07-19 13:08:28 +02:00
Grzegorz Bizon 943ae747ea Move tags and allow_failure CI entries to new config 2016-07-18 16:33:20 +02:00