Updating Docker Gate use of zuul.newrev
- Zuul updated ansible to 2.7, no longer allows missing variables. - Using default value when it isn't available. - airship_deckhand_path isn't working, but is a non-voting gate. Based on Aaron Sheffield's PS for Pegleg: https://review.openstack.org/#/c/645631/ Change-Id: I6fe13d2043480cd6de6785203373f35d83545196
This commit is contained in:
parent
6208baf9d5
commit
7685456ef2
@ -30,7 +30,7 @@
|
||||
environment:
|
||||
BRANCH: "{{ zuul.branch }}"
|
||||
CHANGE: "{{ zuul.change }}"
|
||||
COMMIT: "{{ zuul.newrev }}"
|
||||
COMMIT: "{{ zuul.newrev | default('') }}"
|
||||
PATCHSET: "{{ zuul.patchset }}"
|
||||
register: image_tags
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
DOCKER_REGISTRY: "quay.io"
|
||||
IMAGE_PREFIX: "airshipit"
|
||||
IMAGE_TAG: "{{ item }}"
|
||||
COMMIT: "{{ zuul.newrev }}"
|
||||
COMMIT: "{{ zuul.newrev | default('') }}"
|
||||
PUSH_IMAGE: "true"
|
||||
with_items: "{{ image_tags.stdout_lines }}"
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
latest_tag: latest
|
||||
org: airshipit
|
||||
image: deckhand
|
||||
new_tag: "{{ zuul.newrev }}"
|
||||
new_tag: "{{ zuul.newrev | default('') }}"
|
||||
token: "{{ airship_deckhand_quay_creds.token }}"
|
||||
quay_repo_api_url: "https://quay.io/api/v1/repository"
|
||||
tasks:
|
||||
|
@ -27,7 +27,7 @@
|
||||
shell: cd "{{ work_dir }}"; pwd
|
||||
register: airship_deckhand_path
|
||||
vars:
|
||||
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_airship_deckhand_relative_path | default('') }}"
|
||||
work_dir: "{{ zuul.project.src_dir | default('') }}/{{ zuul_airship_deckhand_relative_path | default('') }}"
|
||||
|
||||
- name: Build Airship-Deckhand Image
|
||||
when: proxy.http is undefined or (proxy.http | trim == "")
|
||||
|
@ -20,7 +20,7 @@
|
||||
docker run \
|
||||
--rm \
|
||||
--net=host \
|
||||
-v "{{ deckhand_conf_dir }}":/etc/deckhand "{{ airship_deckhand_image_id.stdout }}" alembic upgrade head
|
||||
-v "{{ deckhand_conf_dir | default('') }}":/etc/deckhand "{{ airship_deckhand_image_id.stdout }}" alembic upgrade head
|
||||
|
||||
# Allow migrations to complete.
|
||||
sleep 10
|
||||
@ -32,7 +32,7 @@
|
||||
--rm \
|
||||
--net=host \
|
||||
-p 9000:9000 \
|
||||
-v "{{ deckhand_conf_dir }}":/etc/deckhand "{{ airship_deckhand_image_id.stdout }}" server &
|
||||
-v "{{ deckhand_conf_dir | default('') }}":/etc/deckhand "{{ airship_deckhand_image_id.stdout }}" server &
|
||||
|
||||
# Give the server a chance to come up. Better to poll a health check.
|
||||
sleep 10
|
||||
|
@ -17,7 +17,7 @@
|
||||
set -e;
|
||||
./tools/gate/scripts/020-deploy-postgresql.sh
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
chdir: "{{ zuul.project.src_dir | default('') }}"
|
||||
register: _airship_deckhand_database_url
|
||||
become: yes
|
||||
|
||||
@ -25,4 +25,4 @@
|
||||
set_fact:
|
||||
airship_deckhand_database_url: "{{ _airship_deckhand_database_url.stdout_lines | last }}"
|
||||
environment:
|
||||
AIRSHIP_DECKHAND_DATABASE_URL: "{{ airship_deckhand_database_url }}"
|
||||
AIRSHIP_DECKHAND_DATABASE_URL: "{{ airship_deckhand_database_url | default('') }}"
|
||||
|
@ -20,20 +20,20 @@
|
||||
|
||||
- name: Store deckhand_conf_dir in variable
|
||||
set_fact:
|
||||
deckhand_conf_dir: "{{ _deckhand_conf_dir.path }}"
|
||||
deckhand_conf_dir: "{{ _deckhand_conf_dir.path | default('') }}"
|
||||
environment:
|
||||
# Used by Deckhand's initialization script to search for config files.
|
||||
AIRSHIP_DECKHAND_CONFIG_DIR: "{{ deckhand_conf_dir }}"
|
||||
AIRSHIP_DECKHAND_CONFIG_DIR: "{{ deckhand_conf_dir | default('') }}"
|
||||
|
||||
- name: Generate test deckhand.conf file when disable_keystone is true
|
||||
when: disable_keystone == true
|
||||
shell: |-
|
||||
set -ex;
|
||||
|
||||
chmod 777 -R "{{ deckhand_conf_dir }}"
|
||||
conf_file="{{ deckhand_conf_dir }}"/deckhand.conf
|
||||
chmod 777 -R "{{ deckhand_conf_dir | default('')}}"
|
||||
conf_file="{{ deckhand_conf_dir | default('') }}"/deckhand.conf
|
||||
|
||||
cp etc/deckhand/logging.conf.sample "{{ deckhand_conf_dir }}"/logging.conf
|
||||
cp etc/deckhand/logging.conf.sample "{{ deckhand_conf_dir | default('') }}"/logging.conf
|
||||
envsubst '$AIRSHIP_DECKHAND_DATABASE_URL' < deckhand/tests/deckhand.conf.test > $conf_file
|
||||
|
||||
echo "Toggling development_mode on to disable Keystone authentication."
|
||||
@ -42,8 +42,8 @@
|
||||
echo $conf_file 1>&2
|
||||
cat $conf_file 1>&2
|
||||
|
||||
echo "{{ deckhand_conf_dir }}"/logging.conf 1>&2
|
||||
cat "{{ deckhand_conf_dir }}"/logging.conf 1>&2
|
||||
echo "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
|
||||
cat "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
|
||||
args:
|
||||
chdir: "{{ airship_deckhand_path.stdout }}"
|
||||
environment:
|
||||
@ -55,17 +55,17 @@
|
||||
shell: |-
|
||||
set -ex;
|
||||
|
||||
chmod 777 -R "{{ deckhand_conf_dir }}"
|
||||
conf_file="{{ deckhand_conf_dir }}"/deckhand.conf
|
||||
chmod 777 -R "{{ deckhand_conf_dir | default('') }}"
|
||||
conf_file="{{ deckhand_conf_dir | default('') }}"/deckhand.conf
|
||||
|
||||
cp etc/deckhand/logging.conf.sample "{{ deckhand_conf_dir }}"/logging.conf
|
||||
cp etc/deckhand/logging.conf.sample "{{ deckhand_conf_dir | default('') }}"/logging.conf
|
||||
envsubst '$AIRSHIP_DECKHAND_DATABASE_URL $TEST_BARBICAN_URL' < deckhand/tests/deckhand.conf.test > $conf_file
|
||||
|
||||
echo $conf_file 1>&2
|
||||
cat $conf_file 1>&2
|
||||
|
||||
echo "{{ deckhand_conf_dir }}"/logging.conf 1>&2
|
||||
cat "{{ deckhand_conf_dir }}"/logging.conf 1>&2
|
||||
echo "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
|
||||
cat "{{ deckhand_conf_dir | default('') }}"/logging.conf 1>&2
|
||||
args:
|
||||
chdir: "{{ airship_deckhand_path.stdout }}"
|
||||
environment:
|
||||
|
@ -17,7 +17,7 @@
|
||||
shell: |-
|
||||
set -ex;
|
||||
echo "Using noauth-paste.ini to disable Keystone authentication."
|
||||
cp etc/deckhand/noauth-paste.ini "{{ deckhand_conf_dir }}"/noauth-paste.ini
|
||||
cp etc/deckhand/noauth-paste.ini "{{ deckhand_conf_dir | default('') }}"/noauth-paste.ini
|
||||
args:
|
||||
chdir: "{{ airship_deckhand_path.stdout }}"
|
||||
|
||||
@ -25,6 +25,6 @@
|
||||
when: disable_keystone == false
|
||||
shell: |-
|
||||
set -ex;
|
||||
cp etc/deckhand/deckhand-paste.ini "{{ deckhand_conf_dir }}"/deckhand-paste.ini
|
||||
cp etc/deckhand/deckhand-paste.ini "{{ deckhand_conf_dir | default('') }}"/deckhand-paste.ini
|
||||
args:
|
||||
chdir: "{{ airship_deckhand_path.stdout }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user