summaryrefslogtreecommitdiff
path: root/app/services/ci
Commit message (Collapse)AuthorAgeFilesLines
* Revert concurrent pipeline schedule creationrevert-concurrent-pipeline-schedule-creationShinya Maeda2019-06-181-1/+12
| | | | | | This commit reverts the previously introduced concurrent pipeline schedule creation which was a viable solution for mitigating inconsistent pipeline schedule by Sidekiq Memory Killer.
* Fix pipeline schedule when owner is nilfix-pipeline-schedule-owner-is-nilShinya Maeda2019-06-111-1/+1
| | | | Fixing the bug
* Make pipeline schedule worker resilientset-real-next-run-at-for-preventing-duplciate-pipeline-creationsShinya Maeda2019-06-031-0/+13
| | | | | | | | | | | | | Currently, pipeline schedule worker is unstable because it's sometimes killed by excessive memory consumption. In order to improve the performance, we add the following fixes: 1. next_run_at is always real_next_run, which means the value always takes into account of worker's cron schedule 1. Remove exlusive lock. This is already covered by real_next_run change. 1. Use RunPipelineScheduleWorker for avoiding memory killer. Memory consumption is spread to the multiple sidekiq worker.
* Add 60s & 5m monitor buckets for CI queuesElliot Rushton2019-05-221-1/+1
|
* Added filtering jobs by age to jobs/request API endpointDmitry Chepurovskiy2019-05-201-0/+5
|
* Fix schedule head pipeline updatefix-schedule-head-pipeline-update-methodShinya Maeda2019-05-061-7/+1
| | | | | | | Currently, schedule head pipeline update method which executed after pipeline creation does not take into account of merge reqeust pipelines. We should use dedicated `all_merge_requests` method in this case.
* Adds a way to start multiple manual jobs in stageMayra Cabrera2019-05-021-0/+29
| | | | | | | | | | - Adds an endpoint on PipelinesController - Adds a service that iterates over every build in a stage and plays it. - Includes 'play_manual' details on EntitySerializer - Builds a new Stage state: PlayManual. An stage can take this status if it has manual builds or an skipped, scheduled or manual status - Includes FE modifications and specs
* Fix environment automatic on_stop triggerShinya Maeda2019-04-301-5/+11
| | | | | | | Due to the nature of pipelines for merge requests, deployments.ref can be a merge request ref instead of a branch name. We support the environment auto-stop hook for this case
* Rewind IID on Ci::Pipelinesrewind-iid-on-pipelinesKamil Trzciński2019-04-161-0/+4
| | | | | | | If no pipeline is created we currently have IID gap. This is due to fact that we generate IID not on save, but rather ahead of time. This results, us, losing IIDs.
* Merge branch 'sh-fix-pipeline-delete-caching' into 'master'Lin Jen-Shin2019-04-152-2/+64
|\ | | | | | | | | | | | | Properly expire all pipeline caches when pipeline is deleted Closes #60469 See merge request gitlab-org/gitlab-ce!27334
| * Properly expire all pipeline caches when pipeline is deletedsh-fix-pipeline-delete-cachingStan Hu2019-04-152-2/+64
| | | | | | | | | | | | | | | | | | | | | | When deleting a pipeline, only some of the cache structures were being expired, but not the full pipeline list. We have to synchronously schedule a pipeline cache expiration because the pipeline will be deleted if the Sidekiq expiration job picks it up. To do this, properly extract all the logic buried in the Sidekiq worker into a service, and then call the service. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60469
* | Rescue and log errors raised when preparing builds60480-rescue-build-preparing-errorsTiger2019-04-151-3/+5
|/ | | | https://gitlab.com/gitlab-org/gitlab-ce/issues/60480
* Use Gitlab::PushOptions for `ci.skip` push optionLuke Duncalfe2019-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the raw push option Array was sent to Pipeline::Chain::Skip. This commit updates this class (and the chain of classes that pass the push option parameters from the API internal `post_receive` endpoint to that class) to treat push options as a Hash of options parsed by GitLab::PushOptions. The GitLab::PushOptions class takes options like this: -o ci.skip -o merge_request.create -o merge_request.target=branch and turns them into a Hash like this: { ci: { skip: true }, merge_request: { create: true, target: 'branch' } } This now how Pipeline::Chain::Skip is determining if the `ci.skip` push option was used.
* Clear pipeline status cache after destruction of pipelineStan Hu2019-03-261-0/+2
| | | | | | | | | `project.pipeline_status.has_status?` is cached, which can lead to Error 500s in the UI if the this condition is used to check whether a pipeline exists for a commit. We now expire the cache to ensure that the information is consistent. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59453
* Create framework for build prerequisitesTiger2019-03-201-0/+25
| | | | | | | | | 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.
* Persist source sha and target sha for merge pipelinesShinya Maeda2019-02-271-1/+3
| | | | source_sha and target_sha are used for merge request pipelines
* Merge branch 'fix-misspellings-app-comments' into 'master'Rémy Coutable2019-02-262-4/+4
| | | | | Fix misspellings in app/spec comments See merge request gitlab-org/gitlab-ce!25517
* Revert "Merge branch 'fix-misspellings-app-comments' into 'master'"Michael Kozono2019-02-252-4/+4
| | | | | This reverts commit 9202bbd129537a698b986e6295d0c783b5a84815, reversing changes made to 4b282e9ce1ae246c4538b3ede18d1380ea778029.
* Fix misspellings in app/spec commentsTakuya Noguchi2019-02-252-4/+4
| | | | Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* Move ChatOps to CoreJames Fargher2019-02-201-0/+1
| | | | ChatOps used to be in the Ultimate tier.
* Fix a Ruby 2.4 incompatibility in Ci::CreatePipelineServiceRémy Coutable2019-02-121-2/+7
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Reduce the diff with EE in Ci::CreatePipelineServiceRémy Coutable2019-02-041-3/+11
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Reduce diff with EE in Ci::PipelineTriggerServiceRémy Coutable2019-02-011-0/+10
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Revert removing overridden method from build serviceGrzegorz Bizon2019-01-251-1/+5
|
* Make it clear that pipeline can process processablesGrzegorz Bizon2019-01-251-7/+7
|
* Simplify pipeline processing serviceGrzegorz Bizon2019-01-251-5/+1
|
* Segregate interface require to make CI/CD entity processableGrzegorz Bizon2019-01-251-1/+1
| | | | | | | This commit segregates interface that is require to make CI/CD entity processable, like `Ci::Build`. With this change it is not clear and explicit what methods need to be implement to pass an object to pipeline processing service.
* Remove expired artifacts periodicallyShinya Maeda2019-01-241-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename Introduce Destroy expired job artifacts service Revert a bit Add changelog Use expired Improve Fix spec Fix spec Use bang for destroy Introduce iteration limit Update comment Simplify more Refacor Remove unnecessary thing Fix comments Fix coding offence Make loop helper exception free
* Disable audit event logging for pipeline destructionStan Hu2019-01-101-2/+0
| | | | | | | | | | | AuditEventService isn't equipped to handle logging of the destruction of entities such as CI pipelines. It's a project-level event that operates on a pipeline. The current log doesn't even indicate that the pipeline is being destroyed. This is a CE backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9105. We're removing the auditing call because it breaks the EE implementation.
* Add config_options|variables to BuildMetadatakamil-refactor-ci-builds-v5Kamil Trzciński2019-01-041-1/+1
| | | | | | | | | | | These are data columns that store runtime configuration of build needed to execute it on runner and within pipeline. The definition of this data is that once used, and when no longer needed (due to retry capability) they can be freely removed. They use `jsonb` on PostgreSQL, and `text` on MySQL (due to lacking support for json datatype on old enough version).
* Add support for Git push options, specifically ci.skipJonathon Reinhart2018-12-311-1/+2
| | | | | | | | | | | | | | | | | gitlab-org/gitlab-shell!166 added support for collecting push options from the environment, and passing them along to the /internal/post_receive API endpoint. This change handles the new push_options JSON element in the payload, and passes them on through to the GitPushService and GitTagPushService services. Futhermore, it adds support for the first push option, ci.skip. With this change, one can use 'git push -o ci.skip' to skip CI pipe execution. Note that the pipeline is still created, but in the "skipped" state, just like with the 'ci skip' commit message text. Implements #18667
* Rename GroupHierarchy into ObjectHierarchyJarka Košanová2018-12-191-1/+1
| | | | | | - we now use the hierarchy class also for epics - also rename supports_nested_groups? into supports_nested_objects? - move it to a concern
* Generalise test compare serviceGilbert Roulot2018-12-112-29/+54
| | | | | | It adds a base class for CompareTestReportsService containing common code with CompareLicenseManagementReportsService which is present in GitLab Enterprise Edition.
* Rename project's pipelines relationFrancisco Javier López2018-12-051-1/+1
|
* Merge request pipelinesShinya Maeda2018-12-051-1/+2
|
* Squashed commit of the following:Shinya Maeda2018-11-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 0c00e52d339f8471a6ea425d5a4a59751a3f4a35 Author: Shinya Maeda <shinya@gitlab.com> Date: Fri Nov 30 15:41:46 2018 +0900 Update schedules.md commit 0ae56bf5a0ba9254d2ebd4c846395113ae72d686 Merge: c143777c9f2 9ce28bf08b7 Author: Shinya Maeda <shinya@gitlab.com> Date: Fri Nov 30 15:38:01 2018 +0900 Merge branch 'master-ce' into ignore-failed-pipeline-creation-on-pipeline-schedule commit c143777c9f250c8075355ac07e9bae7b074665c3 Author: Shinya Maeda <shinya@gitlab.com> Date: Thu Nov 29 17:18:07 2018 +0900 Fix coding offence commit 7c816dfa634b5911310c67c285fc3c37d5f03517 Author: Shinya Maeda <shinya@gitlab.com> Date: Thu Nov 29 16:12:06 2018 +0900 Improve spec quality commit f78eed45e991123f8af4a7b24f041529bbb35e91 Merge: 96d20ce9144 a5f4627857b Author: Shinya Maeda <shinya@gitlab.com> Date: Thu Nov 29 15:20:16 2018 +0900 Merge branch 'master-ce' into ignore-failed-pipeline-creation-on-pipeline-schedule commit 96d20ce914458f86e68b57bc1bb88ab8d27f010b Author: Shinya Maeda <shinya@gitlab.com> Date: Tue Nov 27 16:25:42 2018 +0900 Print pipeline error commit 97842068b6cf1432cd400ead749843946b4f51ee Merge: c2b015949af 2ee8c40fc16 Author: Shinya Maeda <shinya@gitlab.com> Date: Tue Nov 27 15:51:49 2018 +0900 Merge branch 'master-ce' into ignore-failed-pipeline-creation-on-pipeline-schedule commit c2b015949afb3ecc70cb057e2d13672f378c0d03 Merge: 3435137c17b fbbe5ccd1be Author: Shinya Maeda <shinya@gitlab.com> Date: Mon Nov 26 15:26:17 2018 +0900 Merge branch 'master-ce' into ignore-failed-pipeline-creation-on-pipeline-schedule commit 3435137c17b0ef03003e39dd08c7370fe916c626 Author: Shinya Maeda <shinya@gitlab.com> Date: Tue Nov 20 17:45:38 2018 +0900 Track exception with Sentry commit 3f01f10d3b7380f0e8ceb3a379d8b6c602e9d6ca Merge: 5749c62355f 8a581d531ba Author: Shinya Maeda <shinya@gitlab.com> Date: Tue Nov 20 17:12:41 2018 +0900 Merge branch 'master-ce' into ignore-failed-pipeline-creation-on-pipeline-schedule commit 5749c62355f8de62bb4e36ba1e351a78350607c1 Author: Shinya Maeda <shinya@gitlab.com> Date: Thu Nov 1 11:14:26 2018 +0900 Create a pipeline even if it is corrupted commit e01789890b6949b346d40fadef41aa133191cc43 Author: Shinya Maeda <shinya@gitlab.com> Date: Wed Oct 31 14:26:09 2018 +0900 Improve production log message commit f20d698a535f1dc70d5437c20b629fd1d956fb27 Author: Shinya Maeda <shinya@gitlab.com> Date: Fri Oct 19 17:11:20 2018 +0900 Fix typo commit 01323b02ac41ec50bcf237409f2e3c5c214bbfc1 Author: Shinya Maeda <shinya@gitlab.com> Date: Thu Oct 18 14:46:44 2018 +0900 Update documents commit 460337bf4a7e67a35d6c342678b4cfe66710ad56 Author: Shinya Maeda <shinya@gitlab.com> Date: Wed Oct 10 13:21:26 2018 +0900 Add changelog commit a3c4711752fedebfacbdf52da94058524af3c9f4 Author: Shinya Maeda <shinya@gitlab.com> Date: Wed Oct 10 09:20:06 2018 +0900 Ignore failed pipeline creation in pipeline schedule worker. Instead, logging the event.
* Improve commentsShinya Maeda2018-11-291-2/+12
|
* Squashed commit of the following:Shinya Maeda2018-11-291-0/+25
| | | | | | | | | | | | | | | | | | | | | commit 10456b1e9240886432f565dd17689080bbb133b9 Merge: 312c1a9bdf8 a5f4627857b Author: Shinya Maeda <shinya@gitlab.com> Date: Thu Nov 29 14:33:21 2018 +0900 Merge branch 'master-ce' into add-counter-for-trace-chunks commit 312c1a9bdf8efc45c3fed5ff50f05cc589bbb4ed Author: Shinya Maeda <shinya@gitlab.com> Date: Wed Nov 28 20:06:18 2018 +0900 Fix coding offence commit e397cc2ccc1b2cf7f8b3558b8fa81fe2aa0ab366 Author: Shinya Maeda <shinya@gitlab.com> Date: Wed Nov 28 14:40:24 2018 +0900 Fix tracking archive failure
* Clean up fix for RegisterJobServicesh-register-ci-job-service-improveStan Hu2018-11-221-4/+2
| | | | | | | | Prefer `each` to `find` since the former does the same thing except doesn't add the extra delegation step that may be causing the binding_of_caller gem issues. Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/54281#note_119494004
* Work around Ruby 2.5.3 crash when a CI job is selectedsh-workaround-ruby-2-5-3-bugStan Hu2018-11-201-2/+4
| | | | | | | | | | | Ruby 2.5.3 in combination with Rails 5 appears to crash in development when a CI job is selected for a runner. For some reason, the return inside the block seems to seg fault. Let's get rid of this since this isn't a good coding practice in any case. Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/54281 Also see https://bugs.ruby-lang.org/issues/15325.
* Raise exception when user is not authorizedMatija Čupić2018-11-131-1/+1
|
* Authorize DestroyPipelineService against pipelineMatija Čupić2018-11-131-2/+2
|
* Destroy pipeline in serviceMatija Čupić2018-11-121-0/+13
| | | | | Move all logic for destroying a Pipeline into a service so it's easily reusable.
* Allow to make builds soft-archived.disallow-retry-of-old-buildsKamil Trzciński2018-11-051-0/+5
| | | | | The soft-archived builds cannot be run after some deadline time. The intent is to aggressively recycle old builds after sometime.
* enqueue in process_build_serviceShinya Maeda2018-10-021-1/+5
|
* Fix spec failureShinya Maeda2018-10-021-1/+1
|
* Fix coding style offenceShinya Maeda2018-10-021-0/+1
|
* Add Spec for ProcessPipelineServiceShinya Maeda2018-10-022-34/+33
|
* Remove Scheduled Status class from pipelineShinya Maeda2018-10-021-1/+1
|
* Simplify StuckCiJobsWorkerShinya Maeda2018-10-021-1/+1
|