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 ...@@ -30,7 +30,7 @@ module QA
yield dir yield dir
ensure ensure
FileUtils.remove_entry(dir) FileUtils.remove_entry(dir, true)
end end
private private
......
...@@ -27,10 +27,16 @@ module QA ...@@ -27,10 +27,16 @@ module QA
--hostname #{host_name} --hostname #{host_name}
--name #{@name} --name #{@name}
--volume #{@volume_host_path}:/home/maven --volume #{@volume_host_path}:/home/maven
#{@image} sh -c "sleep 60" #{@image} sh -c "sleep 300"
CMD CMD
shell "docker cp #{@volume_host_path}/. #{@name}:/home/maven" shell "docker cp #{@volume_host_path}/. #{@name}:/home/maven"
shell "docker exec -t #{@name} sh -c 'cd /home/maven && mvn deploy -s settings.xml'" 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 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