| 629 | end |
| 630 | |
| 631 | def define_docker_tasks |
| 632 | namespace :docker do |
| 633 | pull_tasks = [] |
| 634 | push_tasks = [] |
| 635 | |
| 636 | (apt_targets + yum_targets).each do |target| |
| 637 | distribution, version, architecture = split_target(target) |
| 638 | os = "#{distribution}-#{version}" |
| 639 | |
| 640 | namespace :pull do |
| 641 | desc "Pull built image for #{target}" |
| 642 | task target do |
| 643 | docker_pull(os, architecture) |
| 644 | end |
| 645 | pull_tasks << "docker:pull:#{target}" |
| 646 | end |
| 647 | |
| 648 | namespace :push do |
| 649 | desc "Push built image for #{target}" |
| 650 | task target do |
| 651 | docker_push(os, architecture) |
| 652 | end |
| 653 | push_tasks << "docker:push:#{target}" |
| 654 | end |
| 655 | end |
| 656 | |
| 657 | desc "Pull built images" |
| 658 | task :pull => pull_tasks |
| 659 | |
| 660 | desc "Push built images" |
| 661 | task :push => push_tasks |
| 662 | end |
| 663 | end |
| 664 | end |
nothing calls this directly
no test coverage detected