Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
294bddf9
Commit
294bddf9
authored
Jan 23, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use runner tags when processing CI/CD QA pipelines
parent
5cb94835
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
qa/qa/factory/resource/runner.rb
qa/qa/factory/resource/runner.rb
+6
-2
qa/qa/specs/features/project/pipelines_spec.rb
qa/qa/specs/features/project/pipelines_spec.rb
+10
-0
No files found.
qa/qa/factory/resource/runner.rb
View file @
294bddf9
...
...
@@ -4,7 +4,7 @@ module QA
module
Factory
module
Resource
class
Runner
<
Factory
::
Base
attr_writer
:name
attr_writer
:name
,
:tags
dependency
Factory
::
Resource
::
Project
,
as: :project
do
|
project
|
project
.
name
=
'project-with-ci-cd'
...
...
@@ -15,6 +15,10 @@ module QA
@name
||
"qa-runner-
#{
SecureRandom
.
hex
(
4
)
}
"
end
def
tags
@tags
||
%w[qa e2e]
end
def
fabricate!
project
.
visit!
...
...
@@ -26,7 +30,7 @@ module QA
runner
.
pull
runner
.
token
=
runners
.
registration_token
runner
.
address
=
runners
.
coordinator_address
runner
.
tags
=
%w[qa test]
runner
.
tags
=
tags
runner
.
register!
# TODO, wait for runner to register using non-blocking method.
sleep
5
...
...
qa/qa/specs/features/project/pipelines_spec.rb
View file @
294bddf9
...
...
@@ -36,6 +36,7 @@ module QA
Factory
::
Resource
::
Runner
.
fabricate!
do
|
runner
|
runner
.
project
=
project
runner
.
name
=
executor
runner
.
tags
=
%w[qa test]
end
Factory
::
Repository
::
Push
.
fabricate!
do
|
push
|
...
...
@@ -44,14 +45,23 @@ module QA
push
.
commit_message
=
'Add .gitlab-ci.yml'
push
.
file_content
=
<<~
EOF
echo-success-test:
tags:
- qa
- test
script: echo 'OK'
echo-failure-test:
tags:
- qa
- test
script:
- echo 'FAILURE'
- exit 1
echo-artifacts-test:
tags:
- qa
- test
script: echo "CONTENTS" > my-artifacts/artifact.txt
artifacts:
paths:
...
...
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