lib/core/controlplane.rb in cpflow-3.0.1 vs lib/core/controlplane.rb in cpflow-4.0.0

- old
+ new

@@ -88,22 +88,21 @@ gvc_op = partial_gvc_match ? "~" : "=" api.query_images(org: a_org, gvc: a_gvc, gvc_op_type: gvc_op) end - def image_build(image, dockerfile:, docker_args: [], build_args: [], push: true) + def image_build(image, dockerfile:, docker_args: [], build_args: []) # https://docs.controlplane.com/guides/push-image#step-2 # Might need to use `docker buildx build` if compatiblitity issues arise cmd = "docker build --platform=linux/amd64 -t #{image} -f #{dockerfile}" cmd += " --progress=plain" if ControlplaneApiDirect.trace cmd += " #{docker_args.join(' ')}" if docker_args.any? build_args.each { |build_arg| cmd += " --build-arg #{build_arg}" } cmd += " #{config.app_dir}" - perform!(cmd) - image_push(image) if push + perform!(cmd) end def fetch_image_details(image) api.fetch_image_details(org: org, image: image) end @@ -276,10 +275,10 @@ cmd += " --shell #{shell}" if shell perform!(cmd, output_mode: :all) end def workload_exec(workload, replica, location:, container: nil, command: nil) - cmd = "cpln workload exec #{workload} #{gvc_org} --replica #{replica} --location #{location}" + cmd = "cpln workload exec #{workload} #{gvc_org} --replica #{replica} --location #{location} -it" cmd += " --container #{container}" if container cmd += " -- #{command}" perform!(cmd, output_mode: :all) end