Commit 74b32cbd authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'ml-qa-fix-maven-packages-test' into 'master'

Wait for maven to finish deploying during test

See merge request gitlab-org/gitlab!19413
parents d487b460 f35a42f7
......@@ -30,7 +30,7 @@ module QA
yield dir
ensure
FileUtils.remove_entry(dir)
FileUtils.remove_entry(dir, true)
end
private
......
......@@ -27,10 +27,16 @@ module QA
--hostname #{host_name}
--name #{@name}
--volume #{@volume_host_path}:/home/maven
#{@image} sh -c "sleep 60"
#{@image} sh -c "sleep 300"
CMD
shell "docker cp #{@volume_host_path}/. #{@name}:/home/maven"
shell "docker exec -t #{@name} sh -c 'cd /home/maven && mvn deploy -s settings.xml'"
# Stop the container when `mvn deploy` is finished otherwise
# the sleeping container will hold onto the files in @volume_host_path,
# which causes problems when they're created in a tmp dir
# that we want to delete
shell "docker stop #{@name}"
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment