Push monasca/base image on commit, periodicaly and on release
Remove docker `files` check. This check works only in `check` and `gate` steps, but is not functioning properly in `post` step and always fail resulting in not pushed images of monasca/base. Change-Id: Id960e831948ee87e078688e43b864b22a6ee11ae
This commit is contained in:
parent
abe9453e1a
commit
dcc26703fa
@ -29,6 +29,12 @@
|
||||
jobs:
|
||||
- docker-publish-monasca-base
|
||||
- legacy-monasca-common-localrepo-upload
|
||||
periodic:
|
||||
jobs:
|
||||
- docker-publish-monasca-base
|
||||
release:
|
||||
jobs:
|
||||
- docker-publish-monasca-base
|
||||
|
||||
- job:
|
||||
name: docker-build-monasca-base
|
||||
@ -38,8 +44,6 @@
|
||||
required-projects:
|
||||
- openstack/monasca-common
|
||||
attempts: 1
|
||||
files:
|
||||
- ^docker\/(?!example).*
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^.*\.md$
|
||||
|
@ -10,11 +10,10 @@ BASE_GIT_COMMIT=$(git rev-parse --verify HEAD)
|
||||
[ -z "${BASE_GIT_COMMIT}" ] && echo "No git commit hash found" && exit 1
|
||||
|
||||
BASE_CREATION_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
# Docker tags don't like colons so use shorter version of ISO 8601 for them.
|
||||
BASE_CREATION_TIME_SHORT=$(date -d "$BASE_CREATION_TIME" -u +"%Y%m%dT%H%M%SZ")
|
||||
|
||||
: "${MONASCA_COMMON_TAG:="master"}"
|
||||
|
||||
docker build --no-cache \
|
||||
--build-arg BASE_CREATION_TIME="$BASE_CREATION_TIME" \
|
||||
--build-arg BASE_GIT_COMMIT="$BASE_GIT_COMMIT" \
|
||||
--tag monasca/base:master \
|
||||
--tag monasca/base:"$BASE_CREATION_TIME_SHORT" .
|
||||
--tag monasca/base:"$MONASCA_COMMON_TAG" .
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
- name: Build monasca-base Docker image
|
||||
shell: "{{ zuul.project.src_dir }}/docker/build_base_image.sh"
|
||||
environment:
|
||||
MONASCA_COMMON_TAG: "{{ zuul.tag if zuul.pipeline == 'release' else zuul.branch | basename }}"
|
||||
become: true
|
||||
|
||||
- name: List images
|
||||
|
Loading…
x
Reference in New Issue
Block a user