def pushOptions
OptionParser.new do |opts|
opts.banner = "Usage: aeolus-image push [command options]"
opts.separator ""
opts.separator "Options:"
opts.on('-I', '--image ID', 'ID of the base image, can be used in build and push commands, see examples') do |id|
@options[:image] = id
end
opts.on('-B', '--build ID', 'push all target images for a build, to same providers as previously') do |id|
@options[:build] = id
end
opts.on('-t', '--targetimages ID', 'Retrieve the target images from a build') do |id|
@options[:targetimage] = id
end
opts.on('-A', '--account NAME,NAME', Array, 'name of specific provider account to use for push') do |name|
@options[:account] = name
end
opts.on( '-h', '--help', 'Get usage information for this command')
opts.separator ""
opts.separator "Examples:"
opts.separator "aeolus-image push --account ec2-account,ec2-account2 --targetimage $target_image_id # Push target images to each of the specified account"
opts.separator "aeolus-image push --account ec2-account,rhevm-account --build $build_id # Push target images attached to a particular build to each of the specified accounts"
opts.separator "aeolus-image push --account ec2-account,rhevm-account --image $image_id # Push target images attached to a particular image to each of the specified accounts"
opts.separator ""
opts.separator "N.B. Aeolus Credentials should be defined in the configuration file ~/.aeolus-cli"
end
end