Commit Graph

73 Commits

Author SHA1 Message Date
GitLab Bot e3e300557f Add latest changes from gitlab-org/gitlab@master 2020-01-08 12:07:59 +00:00
GitLab Bot c0d8f9f3f9 Add latest changes from gitlab-org/gitlab@master 2020-01-03 09:07:33 +00:00
GitLab Bot 143f196f8b Add latest changes from gitlab-org/gitlab@master 2019-11-18 18:06:53 +00:00
Fabio Pitino ca6a1f33f9 CE port for pipelines for external pull requests
Detect if pipeline runs for a GitHub pull request

When using a mirror for CI/CD only we register a pull_request
webhook. When a pull_request webhook is received, if the
source branch SHA matches the actual head of the branch in the
repository we create immediately a new pipeline for the
external pull request. Otherwise we store the
pull request info for when the push webhook is received.

When using "only/except: external_pull_requests" we can detect
if the pipeline has a open pull request on GitHub and create or
not the job based on that.
2019-09-05 15:53:48 +01:00
Fabio Pitino 42d99460d3 Allow use of legacy triggers with feature flag
Keep feature flag disabled by default and turn off
all functionality related to legacy triggers.

* Block legacy triggers from creating pipeline
* Highlight legacy triggers to be invalid via the UI
* Make legacy triggers invalid in the model
2019-07-15 15:05:22 +02:00
Stan Hu f93b2e02a5 Run rubocop -a on CE files 2019-05-05 03:24:28 -07:00
Shinya Maeda bf639fd504 Create detached merge request pipelines
By using `refs/merge-requests/:iid/head`

ok

ok

Improve naming nicely

Add nice tests

add nice tests

fix some more

revert
2019-03-29 13:58:45 +07:00
Yorick Peterse 018fc6c696
Backport allow_mirror_update for Chain::Command
This backports the allow_mirror_update update field for Chain::Command
from EE to CE. There's no particular reason to keep this in EE. Doing so
would require refactoring of CE as there currently is no easy way to
inject new Struct members into the Chain::Command class.
2019-03-12 11:10:40 +01:00
Shinya Maeda 314062fec5 Persist source sha and target sha for merge pipelines
source_sha and target_sha are used for merge request pipelines
2019-02-27 17:12:04 +09:00
James Fargher 2d19b1adef Move ChatOps to Core
ChatOps used to be in the Ultimate tier.
2019-02-20 21:29:48 +00:00
Douwe Maan ca6fbe8a79 Merge branch '18667-handle-push-opts' into 'master'
Handle 'git push -o ci.skip'

Closes #18667

See merge request gitlab-org/gitlab-ce!15643
2019-01-02 15:50:32 +00:00
Jonathon Reinhart ba781484c7 Add support for Git push options, specifically ci.skip
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
2018-12-31 13:57:53 -05:00
Matija Čupić a1be580979
Implement Command#ambiguous_ref? 2018-12-08 19:28:56 +01:00
Matija Čupić b6c8d3ac9f
Reintroduce Command#protected_ref? 2018-12-08 19:28:54 +01:00
Matija Čupić 2edc02143b
Prevent creating pipelines with ambiguous refs 2018-12-08 19:28:33 +01:00
Matija Čupić 1bf5806888
Use full ref when possible to avoid ambiguity 2018-12-08 19:25:44 +01:00
Shinya Maeda e62bfc7817 Merge request pipelines 2018-12-05 15:57:52 +09:00
gfyoung 06892e88f5 Enable frozen string for lib/gitlab/ci
Enables frozen string for the following:

* lib/gitlab/ci/*.rb
* lib/gitlab/ci/build/**/*.rb
* lib/gitlab/ci/config/**/*.rb
* lib/gitlab/ci/pipeline/**/*.rb
* lib/gitlab/ci/reports/**/*.rb

Partially addresses #47424.
2018-10-26 16:36:42 -07:00
Matija Čupić 317477fc67
Extend Gitlab::Ci::Pipeline::Chain::Command with variables_attributes 2018-04-18 19:28:59 +02:00
Gabriel Mazetto 5c7a738105 [CE] Add Naming/FileName rule checking expected class/module per filename 2018-03-08 12:56:54 +00:00
Kamil Trzcinski b5f6a5f91f Add Chain::Command specs 2017-12-08 12:01:15 +01:00
Kamil Trzcinski 865341acf8 Fix a bug of before_sha being inproperly evaluated to `checkout_sha` 2017-12-08 12:01:15 +01:00
Kamil Trzcinski ad3be46b9f Implement and use Gitlab::Ci::Pipeline::Chain::Command 2017-12-08 12:01:15 +01:00