Published docker image tags
This PS removes static tags from published docker image. We only want to have branch name and commitid as tags for the images in this branch. Change-Id: I1d149602f17d1a56c3e8c3ee827f5a85cd1df867
This commit is contained in:
parent
26f89f179d
commit
94d78626a7
|
@ -160,6 +160,7 @@
|
|||
timeout: 3600
|
||||
run: tools/gate/playbooks/docker-image-build.yaml
|
||||
nodeset: armada-single-node-focal
|
||||
branches: airflow_1.10.5
|
||||
secrets:
|
||||
- airship_armada_quay_creds
|
||||
vars:
|
||||
|
@ -169,14 +170,14 @@
|
|||
dynamic:
|
||||
branch: true
|
||||
commit: true
|
||||
static:
|
||||
- deprecated
|
||||
|
||||
|
||||
- job:
|
||||
name: armada-docker-publish-ubuntu_bionic
|
||||
timeout: 3600
|
||||
run: tools/gate/playbooks/docker-image-build.yaml
|
||||
nodeset: armada-single-node
|
||||
branches: airflow_1.10.5
|
||||
secrets:
|
||||
- airship_armada_quay_creds
|
||||
vars:
|
||||
|
@ -186,8 +187,7 @@
|
|||
dynamic:
|
||||
branch: true
|
||||
commit: true
|
||||
static:
|
||||
- deprecated
|
||||
|
||||
|
||||
- secret:
|
||||
name: airship_armada_quay_creds
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
|
||||
tasks:
|
||||
- include_vars: vars.yaml
|
||||
|
||||
- name: Debug tag generation inputs
|
||||
block:
|
||||
- debug:
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
docker_daemon:
|
||||
group: zuul
|
||||
registry-mirrors:
|
||||
- "http://{{ zuul_site_mirror_fqdn }}:8082/"
|
||||
storage-driver: overlay2
|
|
@ -18,6 +18,7 @@ import logging
|
|||
import os
|
||||
import sys
|
||||
|
||||
# logging.basicConfig(level=logging.DEBUG)
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
LOG_FORMAT = '%(asctime)s %(levelname)-8s %(name)s:%(filename)s:%(lineno)3d:%(funcName)s %(message)s' # noqa
|
||||
|
@ -51,7 +52,7 @@ def read_config(stream, env):
|
|||
|
||||
def build_tags(config):
|
||||
tags = config.get('tags', {}).get('static', [])
|
||||
LOG.debug('Dynamic tags: %s', tags)
|
||||
LOG.debug('Static tags: %s', tags)
|
||||
tags.extend(build_dynamic_tags(config))
|
||||
LOG.info('All tags: %s', tags)
|
||||
return tags
|
||||
|
@ -95,6 +96,13 @@ def _valid_dg(config, dynamic_tag, context_name=None):
|
|||
if context_name is None:
|
||||
context_name = dynamic_tag
|
||||
|
||||
LOG.debug('dynamic_tag: %s', dynamic_tag)
|
||||
LOG.debug('dynamic_tags: %s', config.get('tags', {}).get('dynamic', {}))
|
||||
LOG.debug('dynamic_tag_value: %s', config.get('context', {}))
|
||||
LOG.debug('context: %s', dynamic_tag)
|
||||
LOG.debug('context_name: %s', context_name)
|
||||
LOG.debug('context_name_value: %s', config.get('context', {}).get(context_name))
|
||||
|
||||
if config.get('tags', {}).get('dynamic', {}).get(dynamic_tag):
|
||||
if config.get('context', {}).get(context_name):
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue