Sha256: e6b737b9a058323ac7a967631dc97c4baeeaf06149aed114cd3bf6e8e9678dfd
Contents?: true
Size: 1.36 KB
Versions: 2
Compression:
Stored size: 1.36 KB
Contents
# frozen_string_literal: true module Command class PromoteAppFromUpstream < Base NAME = "promote-app-from-upstream" OPTIONS = [ app_option(required: true), upstream_token_option(required: true) ].freeze DESCRIPTION = "Copies the latest image from upstream, runs a release script (optional), and deploys the image" LONG_DESCRIPTION = <<~DESC - Copies the latest image from upstream, runs a release script (optional), and deploys the image - It performs the following steps: - Runs `cpflow copy-image-from-upstream` to copy the latest image from upstream - Runs `cpflow deploy-image` to deploy the image - If `.controlplane/controlplane.yml` includes the `release_script`, `cpflow deploy-image` will use the `--run-release-phase` option - If the release script exits with a non-zero code, the command will stop executing and also exit with a non-zero code DESC def call copy_image_from_upstream deploy_image end private def copy_image_from_upstream Cpflow::Cli.start(["copy-image-from-upstream", "-a", config.app, "-t", config.options[:upstream_token]]) progress.puts end def deploy_image args = [] args.push("--run-release-phase") if config.current[:release_script] Cpflow::Cli.start(["deploy-image", "-a", config.app, *args]) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cpflow-3.0.1 | lib/command/promote_app_from_upstream.rb |
cpflow-3.0.0 | lib/command/promote_app_from_upstream.rb |