Skip to content

Instantly share code, notes, and snippets.

@tegud
Last active September 4, 2015 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tegud/87765c117bb4c83e3357 to your computer and use it in GitHub Desktop.
Save tegud/87765c117bb4c83e3357 to your computer and use it in GitHub Desktop.
Test Config
namespace :tests do
task :test_config do
puts "TESTING CONFIG..."
name = ENV['IMAGE_NAME'] || raise('You must specify an IMAGE_NAME')
tag = ENV['GO_PIPELINE_LABEL'] || raise('No label specified')
docker_hub_user_or_registry = ENV['DOCKER_REGISTRY'] || ENV['DOCKER_HUB_USER'] || raise('No registry or docker hub user specified')
docker_file_location = ENV['DOCKER_FILE_LOCATION'] || "."
full_image_id = "#{docker_hub_user_or_registry}/#{name}:#{tag}"
sh "sudo docker run #{full_image_id} --configtest"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment