예제 #1
0
    def push_image(self, data):
        for tag in data[pipeline_data.IMAGE_TAGS]:
            tag_with_registry = f"{environment.get_registry_host()}/{tag}"
            docker.tag_image(data[pipeline_data.LOCAL_IMAGE_ID], tag_with_registry)
            docker.push(tag_with_registry)

        slack.on_successful_private_push_old(image_version_util.get_image(data),
                                         data[pipeline_data.IMAGE_SIZE])
예제 #2
0
 def run_step(self, data):
     if environment.get_slim():
         # Tag the image, otherwise we ger a bad reference error from docker build
         docker.tag_image(data[pipeline_data.LOCAL_IMAGE_ID],
                          self.get_pre_slim_tag(data))
         self.run_docker_slim(data)
         # Get the image tage created by docker slim and set this as the new
         # image id and name
         data[pipeline_data.LOCAL_IMAGE_ID] = self.get_new_image_id(
             self.get_post_slim_tag(data))
         self.log.debug('Slimmed docker id is %s',
                        data[pipeline_data.LOCAL_IMAGE_ID])
         data[pipeline_data.
              IMAGE_NAME] = f'{data[pipeline_data.IMAGE_NAME]}.slim'
     return data
예제 #3
0
 def tag(self, tag, data): #pragma: no cover
     docker.tag_image(data[pipeline_data.LOCAL_IMAGE_ID], tag)
     data[pipeline_data.IMAGE_TAGS].append(tag)
     self.log.info('Tagged image "%s" with "%s"', data[pipeline_data.LOCAL_IMAGE_ID], tag)
예제 #4
0
 def push_image(self, data):
     for tag in data[pipeline_data.IMAGE_TAGS]:
         tag_with_registry = f"{environment.get_public_registry_host()}/{tag}"
         docker.tag_image(data[pipeline_data.LOCAL_IMAGE_ID], tag_with_registry)
         docker.push(tag_with_registry)
         slack.on_successful_public_push(tag, data[pipeline_data.IMAGE_NAME], data[pipeline_data.IMAGE_SIZE])
예제 #5
0
 def _test_tag_image(self):
     docker.tag_image(DockerTests.IMAGE_ID, 'test_tag')