Commit Graph

202 Commits

Author SHA1 Message Date
Zeger-Jan van de Weg 8df3997a92 Add Pipeline Schedules that supersedes experimental Trigger Schedule 2017-05-07 22:35:56 +00:00
Grzegorz Bizon fc121cca5b Do not reprocess actions when user retries pipeline
User who is not allowed to trigger manual actions should not be
allowed to reprocess / retrigger / retry these actions.
2017-05-05 19:35:32 +02:00
Grzegorz Bizon 9363675380 Use update build policy instead of new play policy 2017-05-05 12:25:24 +02:00
Grzegorz Bizon 72307940bb Improve code style related to protected actions 2017-05-03 12:32:39 +02:00
Grzegorz Bizon d276ea9372 Merge branch 'master' into feature/gb/manual-actions-protected-branches-permissions
* master: (314 commits)
  Better Explore Groups view
  Update Carrierwave and fog-core
  Add specs for Gitlab::RequestProfiler
  Add scripts/static-analysis to run all the static analysers in one go
  Shorten and improve some job names
  Group static-analysis jobs into a single job
  Don't blow up when email has no References header
  Update CHANGELOG.md for 9.1.2
  Add changelog
  Add changelog
  Show Raw button as Download for binary files
  Use blob viewers for snippets
  Fix typo
  Fixed transient failure related to dropdown animations
  Revert "Merge branch 'tc-no-todo-service-select' into 'master'"
  fix link to MR 10416
  Another change from .click -> .trigger('click') to make spec pass
  Change from .click -> .trigger('click') to make spec pass
  Disable AddColumnWithDefaultToLargeTable cop for pre-existing migrations
  Add AddColumnWithDefaultToLargeTable cop
  ...

Conflicts:
	spec/requests/api/jobs_spec.rb
2017-05-02 10:40:10 +02:00
Grzegorz Bizon 6baaa8a98e Add new ability check for stopping environment 2017-05-01 13:38:57 +02:00
Toon Claes ccb9beeed0 Properly expire cache for **all** MRs of a pipeline
Turn ExpirePipelineCacheService into Worker so it can fetch all the
merge requests for which the pipeline runs or did run against.
2017-04-24 10:07:01 +02:00
Grzegorz Bizon a8231ea1be Merge branch 'master' into feature/gb/manual-actions-protected-branches-permissions
* master: (641 commits)
  Revert "Fix registry for projects with uppercases in path"
  Fix registry for projects with uppercases in path
  Move event icons into events_helper
  Reset New branch button when issue state changes
  Add link to environments on kubernetes.md
  Indent system notes on desktop screens
  Improve webpack-dev-server compatibility with non-localhost setups.
  Add changelog entry
  Fix recent searches icon alignment in Safari
  Use preload to avoid Rails using JOIN
  Fix NUMBER_OF_TRUNCATED_DIFF_LINES re-definition error
  Prepare for zero downtime migrations
  Fix filtered search input width for IE
  Fix the `gitlab:gitlab_shell:check` task
  Fixed random failures with Poll spec
  Include CONTRIBUTING.md file when importing .gitlab-ci.yml templates
  Let uses hide verbose output by default
  Separate examples for each other
  Collapse similar sibling scenarios
  Use empty_project for resources that are independent of the repo
  ...

Conflicts:
	app/views/projects/ci/builds/_build.html.haml
2017-04-13 15:08:52 +02:00
Grzegorz Bizon 2aa211fa69 Use build policy to determine if user can play build 2017-04-12 13:48:43 +02:00
Grzegorz Bizon 6c6bc400d1 Move code for playing an action to separate service 2017-04-12 11:46:24 +02:00
Bob Van Landuyt 9eded57dd2 Use `Ci::ExpirePipelineCacheService` to set `ProjectPipelinestatus` 2017-04-07 17:24:11 +02:00
Kamil Trzciński 15e87cea3a Merge branch '8998_skip_pending_commits_if_not_head' into 'master'
Add auto-cancel for pending pipelines on branch, if they are not HEAD

See merge request !9362
2017-04-07 08:30:32 +00:00
Lin Jen-Shin f8fe64a630 Merge remote-tracking branch 'upstream/master' into 8998_skip_pending_commits_if_not_head
* upstream/master: (58 commits)
  Fix icon name error
  Rewrite system note helper
  Change edit icon
  Leave icon area blank if legacy note; remove diamond icon
  Fix positioning of note icons
  Fix newline errors
  Add remaining system note icons
  Add system notes icon helper; add icons
  Fixed specs Updated JS that was causing the hints to appear & then disappear
  Update tests
  Fix broken spinach test
  Reuse code
  Improve shortcuts code
  Adds ShortcutsDashboardNavigation to globals comment since its a global variable
  Fix shortcut specs
  Reorganize shortcut help menu
  Change todos shortcut to shift
  Change shortcuts
  Switch global shortcuts to shift; reuse key styles from help menu
  Map bindings to lowercase letters; only show key bindings when using keyboard shortcut
  ...
2017-04-07 14:40:20 +08:00
Toon Claes e6571ed9f9
Check if a commit belongs to pipeline before trying to expire cache 2017-04-06 23:50:37 +02:00
Toon Claes 9e89c93e16
Enable polling for pipelines table other pages
Also poll for pipeline changes on:
 - Pipeline table on commit page
 - Pipeline table on merge request page
 - Pipeline table on new merge request page
2017-04-06 23:50:37 +02:00
Toon Claes 847b9c8232
Use Etag caching for pipelines json
Enable caching in the Etag::Middleware and when a pipeline changes
status, expire the cache for the project pipelines path.
2017-04-06 23:50:36 +02:00
Grzegorz Bizon 6c0fc62ef5 Take branch access into account when stopping environment 2017-04-06 17:15:15 +02: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 8a1c12aa6f
Introduce endpoint optimisations 2017-04-06 14:33:17 +02:00
Rydkin Maxim a4d08e6bab rename `auto_canceled_by` and add foreign key 2017-04-04 21:11:24 +03:00
Rydkin Maxim b1dc850ad6 move `auto_cancelable_pipelines` method to `create_pipeline_service.rb` 2017-04-04 21:11:24 +03:00
Rydkin Maxim c81ef3041e add auto-cancel for pending pipelines on branch, if they are not HEAD
fix changelog MR reference

add non-HEAD builds finder and add `created` pipelines to scope

add spec for auto-cancel non-HEAD pipelines and refactor create_pipeline_service_spec

more refactoring for spec

adds option for auto-cancel into CI/CD settings

fix spec to new configuration

fix rubocop

fix schema.rb

fix schema.rb

replace Gitlab 9.0 with 9.1 in doc

change wording on pipeline settings

added auto_canceled_by field as identifier of autocancel subject

remove unnecessary index

replace service with retry_lock

replace auto_cancel_pending_pipelines boolean setting with integer (and enum in model)

fix schema.rb

fix schema.rb

remove projekt attribute and clean up spec

clean up spec withcouple of shared examples

added spec for "It does not cancel current pipeline" scenario

add some specs to auto-cancel

add spec for another branch pipelines
2017-04-04 21:11:24 +03:00
Grzegorz Bizon ca12079ac8 Remove code deprecated in pipeline process service 2017-04-02 13:19:39 +02:00
Grzegorz Bizon 8c59489c93 Do not retry jobs multiple times when retrying a pipeline 2017-03-27 09:11:29 +02:00
Kamil Trzciński 12dd5ac221 All CI offline migrations 2017-03-17 23:06:11 +00: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 07539ab2b0 Merge branch 'master' into pipeline-blocking-actions
* master: (26 commits)
  Fix UserBasic
  Rename `/take` to `/take_ownership`, expose `owner` in `v3`.
  Update after review
  Fix values being called at Array instead of Hash
  Fix json response in branches controller
  Improve docs and specs related to pages artifacts
  Add MR fo changelog about removing pages artifacts
  Delete artifacts for pages unless expiry date is specified
  Lint doc
  Improved team selection
  Move foreign key to separate migration
  Fix import model attributes
  Update documentation and expose ID
  Introduce tests for pipeline triggers
  Fix trigger model
  Update db/schema
  Make triggers to be user aware
  Make Pipeline Triggers to be user aware
  Update triggers API
  Remove remnants of git annex
  ...

Conflicts:
	db/schema.rb
2017-03-06 15:11:28 +01:00
Grzegorz Bizon d87132b463 Always actionize build when it is a manual action
Do not skip manual actions even if actions are optional.
2017-03-06 10:04:04 +01:00
Grzegorz Bizon ac5bd3b73c Reinstitute a core `manual` status for manual actions 2017-03-06 10:04:04 +01:00
Grzegorz Bizon dd24091191 Add support for blocking actions to CI/CD pipeline 2017-03-06 10:04:04 +01:00
Grzegorz Bizon 79ea01bfaf Refactor code related to pipeline blocking actions 2017-03-06 10:04:04 +01:00
Kamil Trzcinski be039d22d7 Make manual actions blocking 2017-03-06 10:04:04 +01:00
Kamil Trzcinski 91ce04678e
Make triggers to be user aware 2017-03-05 18:53:00 +01:00
Kamil Trzciński 859a9cd9a6 Merge branch 'fix/gb/fix-build-retry-tags-assignment' into 'master'
Fix runner tags assignment when retrying a job

Closes #28846

See merge request !9612
2017-03-03 10:17:20 +00:00
Grzegorz Bizon f0ba1ea3c1 Fix Rubocop offense in build retry service 2017-03-02 22:14:12 +01:00
Grzegorz Bizon c3d24d0bdd Move unused consts from retry build service to specs 2017-03-02 18:11:12 +01:00
Tomasz Maczukin 3eafffcef0
Refactor JobRequest response structure 2017-03-02 17:45:45 +01:00
Grzegorz Bizon 6fdbc22960 Remove deprecated legacy CI project status badge 2017-03-01 14:48:44 +01:00
Grzegorz Bizon dd9d8ce82e Fix runner tags assignment when retrying a job 2017-03-01 11:39:36 +01:00
Kamil Trzcinski ec100a2004 Fix concurrent access on builds/register 2017-03-01 00:07:56 -08:00
Robert Speicher 170fef0bd3 Merge branch 'dm-meer-blauw-op-straat' into 'master'
Enable (and disable) more RuboCops

See merge request !9432
2017-02-23 17:19:28 +00:00
Kamil Trzciński 6a39888344 Merge branch 'fix/gb/pipeline-retry-skipped-jobs' into 'master'
Fix reprocessing skipped jobs when retrying pipeline

See merge request !9436
2017-02-23 17:09:27 +00: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 75f5fa997d Enable Rails/Delegate 2017-02-23 09:32:42 -06:00
Douwe Maan 206953a430 Prefer leading style for Style/DotPosition 2017-02-23 09:32:22 -06:00
Douwe Maan 3dadf306dd Enable Style/DotPosition 2017-02-23 09:31:56 -06:00
Kamil Trzciński cfd7602dde Merge branch 'fix-test-for-build-attributes' into 'master'
Fix build attributes test

See merge request !9409
2017-02-23 14:36:53 +00:00
Grzegorz Bizon ed98680678 Process skipped jobs in the pipeline when retrying it 2017-02-23 11:44:49 +01:00
Luke "Jared" Bennett ad88cf3e17
updated ci skip regex to accept underscores and hyphens 2017-02-22 11:29:18 +00:00