lib/vidar/cli.rb in vidar-1.9.0 vs lib/vidar/cli.rb in vidar-1.9.1
- old
+ new
@@ -28,10 +28,19 @@
end
Log.info "Docker images:"
Run.docker("images")
end
+ desc "build_and_cache_base", "Build and caches base stage"
+ def build_and_cache_base
+ Log.info "Building #{Config.get!(:base_stage_name)} image"
+ Run.docker_compose "build #{Config.get!(:base_stage_name)}"
+
+ Log.info "Publishing #{Config.get!(:base_stage_name)} image"
+ Run.docker "push #{Config.get!(:image)}:#{Config.get!(:base_stage_name)}-#{Config.get!(:current_branch)}"
+ end
+
desc "build", "Build docker stages"
def build
Log.info "Building #{Config.get!(:base_stage_name)} image"
Run.docker_compose "build #{Config.get!(:base_stage_name)}"
@@ -120,11 +129,11 @@
desc "release", "Build and publish docker images"
def release
Log.info "Build and release #{Config.get!(:image)}:#{Config.get!(:revision)}"
pull
- build
- cache
+ Log.info "Building #{Config.get!(:release_stage_name)} image"
+ Run.docker_compose "build #{Config.get!(:release_stage_name)}"
publish
end
desc "monitor_deploy_status", "Check is deployment has finished and sends post-deploy notification"
def monitor_deploy_status