Commit Graph

127 Commits

Author SHA1 Message Date
GitLab Bot c6373a2cec Add latest changes from gitlab-org/gitlab@master 2019-12-24 12:08:01 +00:00
GitLab Bot 2a65a97e12 Add latest changes from gitlab-org/gitlab@master 2019-12-18 00:08:09 +00:00
GitLab Bot b3e4ec8e8a Add latest changes from gitlab-org/gitlab@master 2019-10-23 09:06:03 +00:00
GitLab Bot 9e27f0d920 Add latest changes from gitlab-org/gitlab@master 2019-10-01 12:05:59 +00:00
Heinrich Lee Yu fc22626f45 Remove deprecated uses of attribute_changed?
Prepares us for upgrade to Rails 5.2
2019-04-30 15:24:25 +08:00
Thong Kuah a2cfc150ce Add # frozen_string_literal to spec/models
Adds `# frozen_string_literal: true` to spec/models ruby files
2019-04-01 14:37:54 +13:00
Tiger 00f0d356b7 Create framework for build prerequisites
Introduces the concept of Prerequisites for a CI build.
If a build has unmet prerequisites it will go through the
:preparing state before being made available to a runner.

There are no actual prerequisites yet, so current
behaviour is unchanged.
2019-03-20 12:04:40 +11:00
Tiger 42ca9c6f0d Add :preparing status to HasStatus
Introduces a new status for builds between :created and :pending
that will be used when builds require one or more prerequisite
actions to be completed before being picked up by a runner
(such as creating Kubernetes resources before deploying).

The existing :created > :pending transition is unchanged, so
only builds that require preparation will use the :preparing
status.
2019-03-20 11:48:31 +11:00
Shinya Maeda e1449df7a2 Fix coding offence 2018-12-04 19:24:21 +09:00
Shinya Maeda 45a5ed6d02 fix wording 2018-12-03 22:01:30 +09:00
Shinya Maeda bec4740f30 Fix the coding style 2018-12-03 21:47:26 +09:00
Shinya Maeda dd4a8df4cb Validate enum uniqueness 2018-12-03 20:10:13 +09:00
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
Kamil Trzcinski 20c7144ed2 Rename all `[ci_]commit` to `[ci_]pipeline` in specs and features 2016-06-03 16:22:26 +02:00
Kamil Trzcinski 4d5f7aa008 Fix more places where we should rename ci_commit to pipeline 2016-06-03 14:46:17 +02:00
Kamil Trzcinski 717fdd6d42 Rename Ci::Build commit to pipeline 2016-06-03 12:29:00 +02:00
Jeroen van Baarsen f1479b56b7
Remove the annotate gem and delete old annotations
In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382
2016-05-09 18:00:28 +02:00
Kamil Trzcinski 28ce41c00e Fix tests 2016-04-18 07:35:43 -04:00
Kamil Trzcinski 1c5b172abb Write specs for this feature 2016-04-16 22:43:40 +02:00
Kamil Trzcinski af7214d0f0 Fix specs 2016-04-11 23:32:55 +02:00
Stan Hu 79c0e7212a Annotate models 2016-01-06 13:09:55 +00:00
Kamil Trzcinski dd8102f2d1 Fix specs 2015-12-11 18:02:10 +01:00
Kamil Trzcinski e80e3f5372 Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
Douwe Maan 1e8d703a85 Tag model specs 2015-12-09 10:50:51 +01:00
Dmitriy Zaporozhets a237999f00
Annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-13 19:22:46 +01:00
Kamil Trzcinski c61dc13150 Fix some changes 2015-10-12 16:41:36 +02:00
Kamil Trzcinski 7ef156a242 Add author to statuses 2015-10-12 12:16:55 +02:00
Kamil Trzcinski 914cfbd2f1 Implement Commit Status API 2015-10-12 11:53:49 +02:00