def push_image_only_semver(self, data): registry_image_name = image_version_util.prepend_registry( image_version_util.get_image_only_semver(data)) docker.push(registry_image_name) slack.on_successful_public_push( image_version_util.get_image_only_semver(data), data[pipeline_data.IMAGE_NAME], data[pipeline_data.IMAGE_SIZE]) self.log.info('Pushed image "%s".', registry_image_name)
def run_step(self, data): #pragma: no cover if pipeline_data.IMAGE_TAGS not in data: data[pipeline_data.IMAGE_TAGS] = [] self.tag( image_version_util.prepend_registry( image_version_util.get_image(data) ), data ) self.tag( image_version_util.prepend_registry( image_version_util.get_image_only_semver(data) ), data ) self.tag( image_version_util.prepend_registry( image_version_util.get_latest_tag(data) ), data ) return data
def get_build_environment(self, data): return { "gitBranch": environment.get_git_branch(), "gitCommit": environment.get_git_commit(), "gitUrl": environment.get_git_url(), "jenkinsBuild": environment.get_build_number(), "jenkinsBuildDate": environment.get_time(), "dockerName": data[pipeline_data.IMAGE_NAME], "dockerVersion": data[pipeline_data.IMAGE_VERSION], "dockerImage": image_version_util.prepend_registry( image_version_util.get_image(data)) }
def get_post_slim_tag(self, data): tag = image_version_util.prepend_registry( data[pipeline_data.IMAGE_NAME]) tag = f'{tag}.slim:latest' return tag