From 082d50fb08cc1622fcb80cef1869faa566b18f89 Mon Sep 17 00:00:00 2001
From: Pavel Vetokhin
Date: Sun, 25 Feb 2024 15:40:27 +0300
Subject: [PATCH] Refine play names
---
baker/ansible/binaries.yaml | 6 ++++--
baker/ansible/images.yaml | 8 ++++----
baker/ansible/inventory/aliases.yaml | 1 +
baker/ansible/sources.yaml | 2 +-
baker/ansible/stacks.yaml | 10 +++++-----
baker/ansible/tasks/lib/build-check-publish.yaml | 2 +-
6 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/baker/ansible/binaries.yaml b/baker/ansible/binaries.yaml
index 796608fd..90274c97 100644
--- a/baker/ansible/binaries.yaml
+++ b/baker/ansible/binaries.yaml
@@ -1,5 +1,5 @@
---
-- name: Building and checking
+- name: LIB
hosts: lib
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
@@ -15,11 +15,13 @@
maven_phase: "{{ 'deploy' if repo_mode == 'rw' else 'install' }}"
when: binary_status is changed
-- name: Building and checking
+- name: APP
hosts: app
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
file: tasks/java/check.yaml
+ vars:
+ maven_projects: "{{ product.apps.values()|flatten|map(attribute='name') }}"
- ansible.builtin.import_tasks: # noqa: name[missing]
file: tasks/app/build-check.yaml
vars:
diff --git a/baker/ansible/images.yaml b/baker/ansible/images.yaml
index 0c9e786d..991e929a 100644
--- a/baker/ansible/images.yaml
+++ b/baker/ansible/images.yaml
@@ -1,5 +1,5 @@
---
-- name: Capturing
+- name: IMAGES
hosts: images
tasks:
- ansible.builtin.include_tasks: # noqa: name[missing]
@@ -8,7 +8,7 @@
tags: [always]
tags: [always]
-- name: Building
+- name: DB
hosts: db
tasks:
- ansible.builtin.import_role: # noqa: name[missing]
@@ -26,7 +26,7 @@
file: tasks/db/build.yaml
when: image_status is changed
-- name: Building and checking
+- name: APP
hosts: app
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
@@ -53,7 +53,7 @@
file: tasks/app/build-check.yaml
when: image_status is changed
-- name: Publishing
+- name: IMAGES
hosts: images
tasks:
- ansible.builtin.include_tasks: # noqa: name[missing]
diff --git a/baker/ansible/inventory/aliases.yaml b/baker/ansible/inventory/aliases.yaml
index 8e9ed8e2..56480245 100644
--- a/baker/ansible/inventory/aliases.yaml
+++ b/baker/ansible/inventory/aliases.yaml
@@ -7,6 +7,7 @@ sources:
binaries:
hosts:
lib:
+ app:
images:
hosts:
db:
diff --git a/baker/ansible/sources.yaml b/baker/ansible/sources.yaml
index ffd1dabe..7fefa358 100644
--- a/baker/ansible/sources.yaml
+++ b/baker/ansible/sources.yaml
@@ -1,5 +1,5 @@
---
-- name: Checking
+- name: SOURCES
hosts: sources
tasks:
- ansible.builtin.include_tasks: # noqa: name[missing]
diff --git a/baker/ansible/stacks.yaml b/baker/ansible/stacks.yaml
index 277d2a69..93d27f09 100644
--- a/baker/ansible/stacks.yaml
+++ b/baker/ansible/stacks.yaml
@@ -1,7 +1,7 @@
---
- import_playbook: images.yaml # noqa: name[play]
-- name: Capturing
+- name: STACKS
hosts: stacks
tasks:
- ansible.builtin.include_tasks: # noqa: name[missing]
@@ -10,7 +10,7 @@
tags: [always]
tags: [always]
-- name: Building
+- name: GEAR
hosts: gear
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
@@ -24,7 +24,7 @@
stack_status is changed and
is_virtual.rc != 0
-- name: Checking
+- name: PIPELINE
hosts: pipeline
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
@@ -32,7 +32,7 @@
tags: [build]
when: stack_status is changed
-- name: Building and checking
+- name: PRODUCT
hosts: product
vars:
stack_dir: "{{ project.dir }}/stack/product"
@@ -50,7 +50,7 @@
hostvars.product.stack_status is changed or
hostvars.gear.stack_status is changed
-- name: Publishing
+- name: STACKS
hosts: stacks
tasks:
- ansible.builtin.include_tasks: # noqa: name[missing]
diff --git a/baker/ansible/tasks/lib/build-check-publish.yaml b/baker/ansible/tasks/lib/build-check-publish.yaml
index 05a55b32..68395aff 100644
--- a/baker/ansible/tasks/lib/build-check-publish.yaml
+++ b/baker/ansible/tasks/lib/build-check-publish.yaml
@@ -1,5 +1,5 @@
---
-- name: Build
+- name: Build, check, publish
ansible.builtin.command:
cmd: >-
mvn {{ maven_phase|mandatory }}