Commit Graph

65 Commits

Author SHA1 Message Date
Shinya Maeda 8ed7b34066 Add unit tests for CommitStatus and Ci::Stage 2018-10-02 17:08:11 +02:00
Mayra Cabrera f494f2711a Respect the inheritance chain between Ci::Build and CommitStatus
Also moves the assertions were they belong
2018-05-16 15:59:51 -05:00
Mayra Cabrera 86ef822177 Makes CommitStatus and GenericCommitStatus respond to presentable
methods

Includes Presentable module into CommitStatus. This fixes presenter
methods being called on those classes.

Closes #46177
2018-05-15 14:24:11 -05:00
Tomasz Maczukin 2cc0c692c0
Ensure that enqueuing a commit status always sets 'queued_at' value 2018-04-10 15:13:55 +02:00
Zeger-Jan van de Weg 16ea3315f2
Revert "Allow CI/CD Jobs being grouped on version strings"
This reverts commit 4f2cdb51df.
2018-04-04 14:10:22 +02:00
Zeger-Jan van de Weg 4f2cdb51df
Allow CI/CD Jobs being grouped on version strings
This makes grouping on version number available. In general I'd like to
group based on MAJOR.MINOR version numbers for Gitaly.
2018-03-01 12:39:30 +01:00
Grzegorz Bizon e2828a6067 Use existing pipeline stage if stage already exists 2017-11-06 11:04:09 +01:00
Grzegorz Bizon 503f213670 Make sure that every job has a stage assigned 2017-11-06 11:04:09 +01:00
Shinya Maeda 38d9b4d77d Use script_failure. Add runner_system_failure. Improve spec. 2017-09-05 15:10:34 +09:00
Shinya Maeda e8e8ae4d7d Fix spec 2017-09-05 14:30:28 +09:00
Shinya Maeda 68f6c61cf6 - Allow runner API to pass failure_reason
- Fix spec
2017-09-05 14:30:28 +09:00
Shinya Maeda 1d7c039072 Fix enum lists 2017-09-05 14:30:28 +09:00
Grzegorz Bizon 32d0983a4e Merge branch 'master' into backstage/gb/migrate-stages-statuses
* master: (1000 commits)
  Fix username autocomplete group name with no avatar alignment
  Fix 'Projected tags' typo in protected_tags_spec.rb
  Many Repo Fixes
  Repo Editor Fixes
  Docs: New index for permissions
  link article from CI index
  link tech articles from the landing page
  new articles come first
  fix relative link
  fix date format
  Fixed changed files dropdown not being shown
  Update publication date
  Remove deprecated field from workhorse API responses
  Fix API responses when dealing with txt files
  Make sure MySQL would not use CURRENT_TIMESTAMP
  Add two more project templates
  Allow usage of any_projects? with an Array
  Copyedit Artifactory and GitLab article
  Rename Artifactory and GitLab article file
  Display GPG status loading spinner only when Ajax request is made
  ...
2017-08-16 13:18:03 +02:00
Rémy Coutable c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
Grzegorz Bizon 8f1274ae03 Merge commit '9a3b283402b8cc1c86802c526f19a459ce09c2e3' into backstage/gb/migrate-stages-statuses
* commit '9a3b283402b8cc1c86802c526f19a459ce09c2e3': (270 commits)
  Add a note about EFS and GitLab log files
  Projects logo are not centered vertically on projects page
  Fix spec/features/projects/branches_spec
  Fixup POST /v3/:id/hooks and PUT /v3/:id/hooks/:hook_id
  Fix a spec that was assuming to be on the wrong page
  Add copy about search terms to ux guide
  Update documentation of user creation by replacing the 'confirm' param with 'skip_confirmation'
  Fix replying to commit comments on MRs from forks
  Fix 500 error when rendering avatar for deleted project creator
  Load and process at most 100 commits when pushing into default branch
  Ensure Gitlab::Application.routes.default_url_options are set correctly in Capybara + :js specs
  Add log messages to clarify log messages about API CSRF token verification failure
  Update gitlab_flow.md, Teatro seems to be completely dead, see also https://forum.gitlab.com/t/gitlab-flow-documentation-teatro/7774
  Fix diff commenting results just after changing view
  Update CHANGELOG.md for 9.4.2
  none is not a CSS Value for sizes ;-)
  Merge issuable "reopened" state into "opened"
  Make access level more compatible with EE
  Add link to JIRA article in docs
  Expand pipeline_trigger_service_spec by godfat request
  ...
2017-07-31 10:50:10 +02:00
Keifer Furzland 7e113b6824 Remove superfluous type defs in specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:52 +02:00
Grzegorz Bizon 8657d5dd8a Do not implement CI/CD job to stage association yet 2017-07-24 11:33:01 +02:00
Grzegorz Bizon c7a7ef044c Use a new stage_id reference to a persisted stage 2017-07-20 12:56:27 +02:00
Grzegorz Bizon 1d087e0736 Freeze mutable constants in stages migration code 2017-07-11 12:05:04 +02:00
Grzegorz Bizon b3ee172b4e Add a workaround for a tmp job -> stage relation
We still didn't migrate `ci_builds.stage_id`, so we can't use a
belongs_to association. We also have `ci_builds.stage` string attribute,
that we need to phase out in favor of `ci_stages.name`.
2017-07-04 16:41:33 +02:00
Grzegorz Bizon caf6b9918e Check warnings when building compound status SQL query 2017-06-20 15:32:29 +02:00
Grzegorz Bizon e538963d80 Add test for using overridden status method with scopes 2017-06-20 15:32:29 +02:00
Grzegorz Bizon 21f3e9ce26 Move custom compound status method to commit status 2017-06-20 15:32:29 +02:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Z.J. van de Weg 336635f283 Test the ExpireJobCacheWorker and related changes
These were untested by the cherry picked commit.
2017-05-22 22:07:11 +02:00
Kamil Trzcinski f2a4420d66
Store retried in database for CI builds 2017-05-07 22:43:53 +02:00
Lin Jen-Shin 5a4aee36a5 Make sure that's canceled 2017-04-07 02:29:17 +08:00
Lin Jen-Shin b85ddc8459 Fix typo 2017-04-07 00:45:34 +08:00
Lin Jen-Shin 1bed2c87e9 Add missing tests and update test description 2017-04-06 21:53:02 +08:00
Lin Jen-Shin 057c0d7a5c Also track auto-cancelling in jobs, detail:
Not only tracking auto-cancelling in pipelines,
we'll also track this in jobs because pipelines
could be retried and the information would get lost
when this happened. Also erase auto-cancelling
relation for pipelines when they're retried.
2017-04-06 21:32:56 +08:00
Kamil Trzcinski bb910c3b46
Make CI build to use optimistic locking only on status change 2017-03-28 17:50:28 +02:00
Grzegorz Bizon b7d7440185 Fix Rubocop offenses in commit status/build specs 2017-03-06 14:48:53 +01:00
Grzegorz Bizon c4d5b231ed Ignore optional actions when calculating warnings 2017-03-06 14:43:32 +01:00
Grzegorz Bizon a263e37051 Improve specs for calculating pipeline result status 2017-03-06 12:52:12 +01:00
Grzegorz Bizon 305064a639 Fix invalid description in commit status specs 2017-03-06 12:43:29 +01:00
Grzegorz Bizon 6c7f7f6924 Add specs for after_stage scope, update specs file 2017-02-14 15:48:16 +01:00
Robert Speicher fcb37542e7 Use `:empty_project` where possible in model specs 2017-01-26 17:44:59 -05:00
Mike Greiling 0bc48797c8 revise sortable_name test formatting 2017-01-13 14:54:25 -05:00
Mike Greiling dc3d40ff28 prefer unit test on model over view test 2017-01-02 11:44:08 -06:00
Grzegorz Bizon ac115a9e1f Add some missing tests for detailed status methods 2016-12-14 10:21:16 +01:00
Kamil Trzcinski 260d754ca8 Fix handling of allowed to failure jobs 2016-12-06 14:13:21 +01:00
Lin Jen-Shin 752a4cce51 Add test for CommitStatus.exclude_ignored 2016-10-03 18:56:32 +08:00
Rémy Coutable 7b25add30f Merge branch 'group-similar' into 'master'
Group similar builds

We group builds by removing from the builds name two numbers which are delimited by whitespace or colon:
* `name 0 1` => `name`
* `name 0:1` => `name`
* `name 0/1` => `name`
* `name 0:1 ruby` => `name ruby`
* `name 0/1 ruby` => `name ruby`
* `0 1 name ruby` => `name ruby`
* `0:1 name ruby` => `name ruby`
* `0/1 name ruby` => `name ruby`

See merge request !6242
2016-09-15 15:41:15 +00:00
Kamil Trzcinski 4e60f79e40 Add more regexp tests 2016-09-14 15:25:04 +02:00
Kamil Trzcinski b964c6c579 Add grouping tests 2016-09-14 15:04:12 +02:00
Lin Jen-Shin ddcb8c880c Fix styling 2016-09-13 15:53:10 +08:00
tiagonbotelho 1d268a89de adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
Kamil Trzcinski 3a3d999601 Fix stage status shown for pipelines 2016-07-15 16:35:48 +02:00
Robert Speicher adc6ec4a9c Avoid `describe`-ing symbols in specs 2016-07-12 10:27:58 -05:00
Grzegorz Bizon dd08202a24 Fix builds API response not including commit data 2016-06-21 14:26:57 +02:00