This repository was archived by the owner on Jun 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
lib/cloud_controller/kpack
spec/unit/lib/cloud_controller/kpack Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ def mark_build_as_failed(build, message)
5151 end
5252
5353 def update_image_resource ( image , staging_details , builder_spec )
54+ image . metadata . labels [ DROPLET_GUID_LABEL_KEY . to_sym ] = create_droplet_and_get_guid ( staging_details )
5455 image . metadata . labels [ BUILD_GUID_LABEL_KEY . to_sym ] = staging_details . staging_guid
5556 image . spec . source . blob . url = blobstore_url_generator . package_download_url ( staging_details . package )
5657 image . spec . build . env = get_environment_variables ( staging_details )
Original file line number Diff line number Diff line change @@ -255,6 +255,7 @@ module Kpack
255255 labels : {
256256 Stager ::APP_GUID_LABEL_KEY => package . app . guid ,
257257 Stager ::BUILD_GUID_LABEL_KEY => 'old-build-guid' ,
258+ Stager ::DROPLET_GUID_LABEL_KEY => 'old-droplet-guid' ,
258259 Stager ::STAGING_SOURCE_LABEL_KEY => 'STG' ,
259260 } ,
260261 annotations : {
@@ -291,6 +292,7 @@ module Kpack
291292 it 'updates the existing Image resource' do
292293 updated_image = Kubeclient ::Resource . new ( existing_image . to_hash )
293294 updated_image . metadata . labels [ Kpack ::Stager ::BUILD_GUID_LABEL_KEY . to_sym ] = build . guid
295+ updated_image . metadata . labels [ Kpack ::Stager ::DROPLET_GUID_LABEL_KEY . to_sym ] = droplet . guid
294296 updated_image . spec . source . blob . url = 'package-download-url'
295297 updated_image . spec . build . env = [
296298 { name : 'FOO' , value : 'BAR' }
You can’t perform that action at this time.
0 commit comments