class Gitlab::QA::Docker::Engine

def self.write(file, contents, expand_vars = true)

Parameters:
  • expand_vars () -- Set false if you need to write an environment variable '$' to a file. The variable should be escaped \\\$
  • contents () -- The content of the file to write
  • file () -- The name of the file
def self.write(file, contents, expand_vars = true)
  if expand_vars
    %(echo "#{contents}" > #{file};)
  else
    %(echo '#{contents}' > #{file};)
  end
end