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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
27a70018
Commit
27a70018
authored
Feb 09, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not attach runner to a non-exsiting network in QA
parent
7534f7a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
qa/qa/service/runner.rb
qa/qa/service/runner.rb
+9
-1
qa/qa/service/shellout.rb
qa/qa/service/shellout.rb
+3
-1
No files found.
qa/qa/service/runner.rb
View file @
27a70018
...
...
@@ -15,6 +15,14 @@ module QA
@tags
=
%w[qa test]
end
def
network
shell
"docker network inspect
#{
@network
}
"
rescue
CommandError
'bridge'
else
@network
end
def
pull
shell
"docker pull
#{
@image
}
"
end
...
...
@@ -22,7 +30,7 @@ module QA
def
register!
shell
<<~
CMD
.
tr
(
"
\n
"
,
' '
)
docker run -d --rm --entrypoint=/bin/sh
--network
#{
@
network
}
--name
#{
@name
}
--network
#{
network
}
--name
#{
@name
}
-e CI_SERVER_URL=
#{
@address
}
-e REGISTER_NON_INTERACTIVE=true
-e REGISTRATION_TOKEN=
#{
@token
}
...
...
qa/qa/service/shellout.rb
View file @
27a70018
...
...
@@ -3,6 +3,8 @@ require 'open3'
module
QA
module
Service
module
Shellout
CommandError
=
Class
.
new
(
StandardError
)
##
# TODO, make it possible to use generic QA framework classes
# as a library - gitlab-org/gitlab-qa#94
...
...
@@ -14,7 +16,7 @@ module QA
out
.
each
{
|
line
|
puts
line
}
if
wait
.
value
.
exited?
&&
wait
.
value
.
exitstatus
.
nonzero?
raise
"Command `
#{
command
}
` failed!"
raise
CommandError
,
"Command `
#{
command
}
` failed!"
end
end
end
...
...
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