Commit Graph

734 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
Kamil Trzciński 6ad3814e1b Merge branch 'feature/gb/manual-actions-protected-branches-permissions' into 'master'
Check access to a branch when user triggers manual action

Closes #20261

See merge request !10494
2017-05-06 17:17:02 +00:00
Zeger-Jan van de Weg c17e6a6c68 Real time pipeline show action 2017-05-06 16:45:46 +00:00
Grzegorz Bizon b6facd8313 Merge commit '3a2b60f7' from 'master'
* commit '3a2b60f7a0109cdb84e8727a2625318a746e84dc': (151 commits)
  Fixed Karma spec
  Reject EE reserved namespace paths in CE as well
  Updated webpack config
  Include the bundler:audit job into the static-analysis job
  Document serializers
  Add artifact file page that uses the blob viewer
  Pipeline table mini graph dropdown remains open when table is refreshed
  Adds off for event hub
  Compile gitlab-shell go executables
  Allow to create new branch and empty WIP merge request from issue page
  Moved to a view spec
  Improving copy of CONTRIBUTING.md, PROCESS.md, and code_review.md
  Convert seconds to minutes and hours on chat notifations
  Disable navigation to Pages config if Pages is disabled
  Sort the network graph both by commit date and topographically.
  Add tooltips to note action buttons
  Add breadcrumb, build header and pipelines submenu to artifacts browser
  Update todos screenshots
  removes the possibility of commit messages having carriage returns
  Handle incoming emails from aliases correctly
  ...
2017-05-05 12:22:46 +02:00
Douwe Maan 0f58eb6bde Add artifact file page that uses the blob viewer 2017-05-04 08:50:12 -05: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
Kamil Trzciński d35515cb5b Merge branch 'tc-realtime-every-pipeline-on-mr' into 'master'
Properly expire cache for **all** MRs of a pipeline

Closes #31040

See merge request !10770
2017-04-24 15:18:03 +00:00
Toon Claes c623c41c2f Use a better performing query to find all MRs for pipeline
And add some specs.
2017-04-24 10:07:01 +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 3fdba5c96b Fix missing pipeline duration for blocked pipelines 2017-04-21 19:45:14 +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
Z.J. van de Weg 962bf01e69 Add foreign key on trigger requests
I started out as I missed the foreign key on ci_triggers and projects.
However, it seemed Yorick caught this already on gitlab-org/gitlab-ce!9388.

Still I found a missing foreign key, between the trigger requests and
triggers. This commit adds it, and removes the depend: :destroy on the
Rails model Ci::Triggers
2017-04-11 13:14:15 +02:00
Sean McGivern 3ded903d7b Merge branch 'dosuken123/gitlab-ce-2989-run-cicd-pipelines-on-a-schedule-idea1-basic-backend-implementation-with-quick-ui' into 'master'
Add "engineering" UI for Pipeline Schedule

See merge request !10533
2017-04-07 19:31:07 +00:00
Bob Van Landuyt 9eded57dd2 Use `Ci::ExpirePipelineCacheService` to set `ProjectPipelinestatus` 2017-04-07 17:24:11 +02:00
Bob Van Landuyt 02072e17ab Rename `ProjectBuildStatus` -> `ProjectPipelineStatus` 2017-04-07 17:24:11 +02:00
Bob Van Landuyt a6d313001a Wrap updating of cache after pipeline transition in class method 2017-04-07 17:24:11 +02:00
Bob Van Landuyt 47abf00b24 Update project build status cache when transitioning 2017-04-07 17:24:11 +02:00
Bob Van Landuyt 9082d1e046 Rename Ci::PipelineStatus -> Ci::ProjectBuildStatus 2017-04-07 17:24:11 +02:00
Kamil Trzcinski d5201119ee
Fix test failures 2017-04-07 17:15:28 +02:00
Kamil Trzcinski 7461072f36
Update code to remove no longer needed changes 2017-04-07 16:19:11 +02:00
Kamil Trzcinski 0308855254
Fix ref reference 2017-04-07 16:17:29 +02:00
Shinya Maeda 1ae1d85cdc
N/A to None. Revert validates from validates_presence_of. 2017-04-07 16:17:29 +02:00
Shinya Maeda 2f5095c254
Add def trigger_schedule in Trigger. Use persisted? for checling existance 2017-04-07 16:17:28 +02:00
Shinya Maeda 4131ed2bd8
before_create :set_project. Now TriggerSchedule saves project from parent 2017-04-07 16:17:28 +02:00
Shinya Maeda 76c0364ca5
Use allow_destroy. Remove condtion from form.haml. 2017-04-07 16:17:27 +02:00
Shinya Maeda 2548c155ee
Add form for scheduled trigger 2017-04-07 16:17:27 +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 38796f5617 Fix bad conflict resolution 2017-04-07 14:47:15 +08: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 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
Kamil Trzcinski 37a7b099d6
Merge remote-tracking branch 'origin/master' into optimise-pipelines 2017-04-06 22:05:22 +02:00
Lin Jen-Shin e28fc7b1d3 Merge remote-tracking branch 'upstream/master' into 8998_skip_pending_commits_if_not_head
* upstream/master: (197 commits)
  Add text to break up diagrams
  Implement review comments from @DouweM for !10467.
  Fix rubocop offence
  Linking to edit file directly
  Optimise trace handling code to use streaming instead of full read
  Use config.toml to configure Gitaly
  Fix indexes in container repositories table
  Recent search history for issues
  Fix rubocop
  Use change direction in spec
  Use be_pending
  Improve trigger_schedule.rb
  Implement a offset calculation on cron_parser_spec
  Clean up trigger_schedule_worker_spec.rb
  Improve instantiate recursion in cron_parser.rb
  Fix unnecessary changes in schema.rb
  Add empty line in cron_parser.rb
  Use parenthesis for respond_to :ref
  Define next_time as let in trigger_schedule_spec
  Remove next_run_at: nil from trigger_schedule_spec
  ...
2017-04-07 03:16:28 +08:00
Kamil Trzciński 1815d44a7f Merge branch '2989-run-cicd-pipelines-on-a-schedule-idea1-basic-backend-implementation' into 'master'
Resolve "Run CI/CD pipelines on a schedule" - "Basic backend implementation"

See merge request !10133
2017-04-06 18:55:34 +00:00
Kamil Trzciński 828d81ee1f Optimise trace handling code to use streaming instead of full read 2017-04-06 16:20:27 +00:00
Lin Jen-Shin 503f882275 Fix rubocop offenses 2017-04-06 23:47:37 +08:00
Grzegorz Bizon 5525db8b33 Check branch access when user triggers manual action 2017-04-06 17:15:15 +02:00
Shinya Maeda 9441c01484 Fix rubocop 2017-04-06 23:46:59 +09:00
Shinya Maeda 48e07eab57 Improve trigger_schedule.rb 2017-04-06 23:46:59 +09:00
Shinya Maeda 4688eb47c6 Rename cron_time_zone to cron_timezone. Separate add_concurrent_foreign_key. 2017-04-06 23:46:59 +09:00
Shinya Maeda 1dbc888e33 Remove TriggerSchedulePresenter. This will go in another MR. 2017-04-06 23:46:59 +09:00
Shinya Maeda f229290ac8 Remove triggers_helper. Add trigger_schedule_presenter. 2017-04-06 23:46:59 +09:00
Shinya Maeda 4949e2b291 Separate cron_valid? and cron_time_zone_valid? 2017-04-06 23:46:59 +09:00
Shinya Maeda 914bef671f Move Ci::CronParser to Gitlab::Ci::CronParser 2017-04-06 23:46:58 +09:00
Shinya Maeda f6be8c0485 Remove less_than_1_hour_from_now comments. Dry up def schedule_next_run! 2017-04-06 23:46:58 +09:00
Shinya Maeda a67aff6d39 Add Import/Export Setting for trigger_schedule. Remove ref validation. 2017-04-06 23:46:58 +09:00
Shinya Maeda 97cc677736 Commentout check_cron_frequency 2017-04-06 23:46:58 +09:00
Shinya Maeda 57d082f358 Add validator 2017-04-06 23:46:58 +09:00
Shinya Maeda 21cabf381b Move real_next_run to helper 2017-04-06 23:46:58 +09:00