summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2016-04-21 08:10:37 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2016-04-21 08:10:37 +0000
commitd2406668003f610139b60c036bc6fd9be982a580 (patch)
tree17cc8f3adf5ee7d5f086b2a3ce668a38ba9c7c4b /features
parent2ade37e2534108c72d28605cb131dacf771d27d3 (diff)
parent27e0c7723ca1eb85222210a20fd3fee1d77733f7 (diff)
downloadgitlab-ce-d2406668003f610139b60c036bc6fd9be982a580.tar.gz
Merge branch 'ci-commit-as-pipeline' into 'master'
Ci::Commit becomes a Pipeline object 1. Ci::Commit receives context: ref, :tag. 1. One Ci::Commit describes a one Pipeline 1. Pipeline is created from `.gitlab-ci.yml` 1. Pipeline is a ordered group of builds 1. We test MR against Pipeline 1. Pipelines have a separate view (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703) 1. Pipeline can be triggered from UI (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703) 1. Later we change `Trigger -> TriggerRequest -> Build` to `Trigger -> Pipeline` (future) 1. We add a Pipeline Hook that will be triggered on Pipeline status change (future) 1. We extend notifications to use `Pipeline Hook` to send summary on pipeline changes (future) After merging that I'll prepare a separate MR that will unify naming, database columns, table names: ``` Ci::Commit -> Pipeline Ci::Build -> Build CommitStatus -> Job GenericCommitStatus -> ExternalJob ci_commits -> pipelines ci_builds -> jobs ``` This MR implements first 5 points. This is made to solve this issue https://gitlab.com/gitlab-org/gitlab-ce/issues/14149. See merge request !3653
Diffstat (limited to 'features')
-rw-r--r--features/steps/project/merge_requests.rb2
-rw-r--r--features/steps/shared/builds.rb6
-rw-r--r--features/steps/shared/project.rb2
3 files changed, 5 insertions, 5 deletions
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index 4f883fe7c27..3b1a00f628a 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -519,7 +519,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step '"Bug NS-05" has CI status' do
project = merge_request.source_project
project.enable_ci
- ci_commit = create :ci_commit, project: project, sha: merge_request.last_commit.id
+ ci_commit = create :ci_commit, project: project, sha: merge_request.last_commit.id, ref: merge_request.source_branch
create :ci_build, commit: ci_commit
end
diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb
index c4c7672a432..cf30e23b6bd 100644
--- a/features/steps/shared/builds.rb
+++ b/features/steps/shared/builds.rb
@@ -10,16 +10,16 @@ module SharedBuilds
end
step 'project has a recent build' do
- @ci_commit = create(:ci_commit, project: @project, sha: @project.commit.sha)
+ @ci_commit = create(:ci_commit, project: @project, sha: @project.commit.sha, ref: 'master')
@build = create(:ci_build_with_coverage, commit: @ci_commit)
end
step 'recent build is successful' do
- @build.update_column(:status, 'success')
+ @build.update(status: 'success')
end
step 'recent build failed' do
- @build.update_column(:status, 'failed')
+ @build.update(status: 'failed')
end
step 'project has another build that is running' do
diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb
index b13e82f276b..ea5f9580308 100644
--- a/features/steps/shared/project.rb
+++ b/features/steps/shared/project.rb
@@ -230,7 +230,7 @@ module SharedProject
step 'project "Shop" has CI build' do
project = Project.find_by(name: "Shop")
- create :ci_commit, project: project, sha: project.commit.sha
+ create :ci_commit, project: project, sha: project.commit.sha, ref: 'master', status: 'skipped'
end
step 'I should see last commit with CI status' do