class Gitlab::QA::Docker::Volumes
Constants
- QA_CONTAINER_WORKDIR
- VOLUMES
Public Class Methods
new(volumes = VOLUMES)
click to toggle source
# File lib/gitlab/qa/docker/volumes.rb, line 12 def initialize(volumes = VOLUMES) @volumes = volumes end
Public Instance Methods
with_temporary_volumes() { |Hash[map { |k, v| ["#{dir}/#{k}", v] }]| ... }
click to toggle source
# File lib/gitlab/qa/docker/volumes.rb, line 16 def with_temporary_volumes # macOS's tmpdir is a symlink /var/folders -> /private/var/folders # but Docker on macOS exposes /private and disallow exposing /var/ # so we need to get the real tmpdir path Dir.mktmpdir('gitlab-qa-', File.realpath(Dir.tmpdir)).tap do |dir| yield Hash[@volumes.map { |k, v| ["#{dir}/#{k}", v] }] end end