From daab895f98da6284d4aa760834980c7f8ce783dd Mon Sep 17 00:00:00 2001
From: Pavel Vetokhin
Date: Fri, 23 Feb 2024 11:25:41 +0300
Subject: [PATCH] Build product stack right before publish
---
baker/ansible/tasks/product/build.yaml | 16 ----------------
baker/ansible/tasks/product/publish.yaml | 16 ++++++++++++++++
pom.xml | 2 +-
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/baker/ansible/tasks/product/build.yaml b/baker/ansible/tasks/product/build.yaml
index 2b51e7bf..55302072 100644
--- a/baker/ansible/tasks/product/build.yaml
+++ b/baker/ansible/tasks/product/build.yaml
@@ -1,11 +1,4 @@
---
-- ansible.builtin.import_role: # noqa: name[missing]
- name: image
- tasks_from: clean
- vars:
- image_keys:
- - "{{ product.image }}/{{ opsenv }}"
-
- name: Remove artifacts
ansible.builtin.file:
path: "{{ stack_dir }}/target"
@@ -32,12 +25,3 @@
lstrip_blocks: yes
trim_blocks: yes
mode: "644"
-
-- ansible.builtin.import_role: # noqa: name[missing]
- name: image
- tasks_from: build
- vars:
- image_home: "{{ project.dir }}/stack/product"
- image_context: target/image-context
- image_key: "{{ product.image }}/{{ opsenv }}"
- image_tag: "{{ product.image }}:{{ opsenv }}"
diff --git a/baker/ansible/tasks/product/publish.yaml b/baker/ansible/tasks/product/publish.yaml
index 7f750d78..37f3bece 100644
--- a/baker/ansible/tasks/product/publish.yaml
+++ b/baker/ansible/tasks/product/publish.yaml
@@ -1,4 +1,20 @@
---
+- ansible.builtin.import_role: # noqa: name[missing]
+ name: image
+ tasks_from: clean
+ vars:
+ image_keys:
+ - "{{ product.image }}/{{ opsenv }}"
+
+- ansible.builtin.import_role: # noqa: name[missing]
+ name: image
+ tasks_from: build
+ vars:
+ image_home: "{{ project.dir }}/stack/product"
+ image_context: target/image-context
+ image_key: "{{ product.image }}/{{ opsenv }}"
+ image_tag: "{{ product.image }}:{{ opsenv }}"
+
- ansible.builtin.import_role: # noqa: name[missing]
name: image
tasks_from: publish
diff --git a/pom.xml b/pom.xml
index b92da444..4c253e46 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
1.18.30
1.5.5.Final
6.1.3
- 1.9.22
+ 1.8.22
0.8.11
godel
false