BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6919f636
Commit
6919f636
authored
Oct 30, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zj-tag-trait-ci-build' into 'master'
Ci::Build tag is a trait instead of an own factory See merge request gitlab-org/gitlab-ce!15077
parents
609f4048
8275e34e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
builds.rb
spec/factories/ci/builds.rb
+1
-1
runner_spec.rb
spec/requests/api/runner_spec.rb
+8
-8
No files found.
spec/factories/ci/builds.rb
View file @
6919f636
...
@@ -119,7 +119,7 @@ FactoryGirl.define do
...
@@ -119,7 +119,7 @@ FactoryGirl.define do
finished_at
nil
finished_at
nil
end
end
factory
:ci_build_
tag
do
trait
:
tag
do
tag
true
tag
true
end
end
...
...
spec/requests/api/runner_spec.rb
View file @
6919f636
...
@@ -385,7 +385,7 @@ describe API::Runner do
...
@@ -385,7 +385,7 @@ describe API::Runner do
end
end
context
'when job is made for tag'
do
context
'when job is made for tag'
do
let!
(
:job
)
{
create
(
:ci_build
_
tag
,
pipeline:
pipeline
,
name:
'spinach'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:job
)
{
create
(
:ci_build
,
:
tag
,
pipeline:
pipeline
,
name:
'spinach'
,
stage:
'test'
,
stage_idx:
0
)
}
it
'sets branch as ref_type'
do
it
'sets branch as ref_type'
do
request_job
request_job
...
@@ -436,8 +436,8 @@ describe API::Runner do
...
@@ -436,8 +436,8 @@ describe API::Runner do
end
end
context
'when project and pipeline have multiple jobs'
do
context
'when project and pipeline have multiple jobs'
do
let!
(
:job
)
{
create
(
:ci_build
_
tag
,
pipeline:
pipeline
,
name:
'spinach'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:job
)
{
create
(
:ci_build
,
:
tag
,
pipeline:
pipeline
,
name:
'spinach'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:job2
)
{
create
(
:ci_build
_
tag
,
pipeline:
pipeline
,
name:
'rubocop'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:job2
)
{
create
(
:ci_build
,
:
tag
,
pipeline:
pipeline
,
name:
'rubocop'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:test_job
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
name:
'deploy'
,
stage:
'deploy'
,
stage_idx:
1
)
}
let!
(
:test_job
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
name:
'deploy'
,
stage:
'deploy'
,
stage_idx:
1
)
}
before
do
before
do
...
@@ -458,7 +458,7 @@ describe API::Runner do
...
@@ -458,7 +458,7 @@ describe API::Runner do
end
end
context
'when pipeline have jobs with artifacts'
do
context
'when pipeline have jobs with artifacts'
do
let!
(
:job
)
{
create
(
:ci_build
_
tag
,
:artifacts
,
pipeline:
pipeline
,
name:
'spinach'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:job
)
{
create
(
:ci_build
,
:
tag
,
:artifacts
,
pipeline:
pipeline
,
name:
'spinach'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:test_job
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
name:
'deploy'
,
stage:
'deploy'
,
stage_idx:
1
)
}
let!
(
:test_job
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
name:
'deploy'
,
stage:
'deploy'
,
stage_idx:
1
)
}
before
do
before
do
...
@@ -478,8 +478,8 @@ describe API::Runner do
...
@@ -478,8 +478,8 @@ describe API::Runner do
end
end
context
'when explicit dependencies are defined'
do
context
'when explicit dependencies are defined'
do
let!
(
:job
)
{
create
(
:ci_build
_
tag
,
pipeline:
pipeline
,
name:
'spinach'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:job
)
{
create
(
:ci_build
,
:
tag
,
pipeline:
pipeline
,
name:
'spinach'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:job2
)
{
create
(
:ci_build
_
tag
,
pipeline:
pipeline
,
name:
'rubocop'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:job2
)
{
create
(
:ci_build
,
:
tag
,
pipeline:
pipeline
,
name:
'rubocop'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:test_job
)
do
let!
(
:test_job
)
do
create
(
:ci_build
,
pipeline:
pipeline
,
token:
'test-job-token'
,
name:
'deploy'
,
create
(
:ci_build
,
pipeline:
pipeline
,
token:
'test-job-token'
,
name:
'deploy'
,
stage:
'deploy'
,
stage_idx:
1
,
stage:
'deploy'
,
stage_idx:
1
,
...
@@ -502,8 +502,8 @@ describe API::Runner do
...
@@ -502,8 +502,8 @@ describe API::Runner do
end
end
context
'when dependencies is an empty array'
do
context
'when dependencies is an empty array'
do
let!
(
:job
)
{
create
(
:ci_build
_
tag
,
pipeline:
pipeline
,
name:
'spinach'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:job
)
{
create
(
:ci_build
,
:
tag
,
pipeline:
pipeline
,
name:
'spinach'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:job2
)
{
create
(
:ci_build
_
tag
,
pipeline:
pipeline
,
name:
'rubocop'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:job2
)
{
create
(
:ci_build
,
:
tag
,
pipeline:
pipeline
,
name:
'rubocop'
,
stage:
'test'
,
stage_idx:
0
)
}
let!
(
:empty_dependencies_job
)
do
let!
(
:empty_dependencies_job
)
do
create
(
:ci_build
,
pipeline:
pipeline
,
token:
'test-job-token'
,
name:
'empty_dependencies_job'
,
create
(
:ci_build
,
pipeline:
pipeline
,
token:
'test-job-token'
,
name:
'empty_dependencies_job'
,
stage:
'deploy'
,
stage_idx:
1
,
stage:
'deploy'
,
stage_idx:
1
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment