Last active
September 4, 2015 10:08
-
-
Save tegud/87765c117bb4c83e3357 to your computer and use it in GitHub Desktop.
Test Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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