From 36a9ec06c297ddad12d7258cba071a00ba211e02 Mon Sep 17 00:00:00 2001
From: Pavel Vetokhin
Date: Sun, 8 Oct 2023 15:58:29 +0300
Subject: [PATCH] Toolchain instead of pipeline
---
.dx/binaries.yml | 2 +-
.dx/codebase.yml | 2 +-
.dx/group_vars/all.yml | 4 ++--
.dx/inventory/aliases.yml | 1 -
.dx/stacks.yml | 12 ++++++------
.dx/tasks/{pipeline => toolchain}/package.yml | 4 ++--
.dx/tasks/{pipeline => toolchain}/status.yml | 2 +-
.github/workflows/toolchain-beyond-doubt.yml | 4 ++--
.github/workflows/toolchain-sanity.yml | 4 ++--
9 files changed, 17 insertions(+), 18 deletions(-)
rename .dx/tasks/{pipeline => toolchain}/package.yml (68%)
rename .dx/tasks/{pipeline => toolchain}/status.yml (82%)
diff --git a/.dx/binaries.yml b/.dx/binaries.yml
index 59837e37..429ba542 100644
--- a/.dx/binaries.yml
+++ b/.dx/binaries.yml
@@ -81,4 +81,4 @@
chdir: "{{ playbook_dir }}/.."
strip_empty_ends: false
changed_when: true
- when: focus == 'pipeline'
+ when: focus != 'solution'
diff --git a/.dx/codebase.yml b/.dx/codebase.yml
index 0b4b8131..0af17254 100644
--- a/.dx/codebase.yml
+++ b/.dx/codebase.yml
@@ -11,7 +11,7 @@
--batch-mode
{% if focus == 'solution' %}
--projects apps/sepuling
- {% elif focus == 'pipeline' %}
+ {% elif focus == 'toolchain' %}
--projects tests/e2e
{% endif %}
--also-make
diff --git a/.dx/group_vars/all.yml b/.dx/group_vars/all.yml
index ac7449bd..2edd0ca3 100644
--- a/.dx/group_vars/all.yml
+++ b/.dx/group_vars/all.yml
@@ -29,7 +29,7 @@ tool_cid: "{{ lookup('ansible.builtin.pipe', 'git write-tree --prefix=tools')[:7
pipeline_cid: "{{ lookup('ansible.builtin.pipe', 'git write-tree --prefix=.github')[:7] }}"
# solution - focus on solution changes
-# pipeline - focus on pipeline changes
+# toolchain - focus on toolchain changes
# null - without any particular focus
focus: null
@@ -42,7 +42,7 @@ schema_images:
postgres: "{{ image_repo }}/{{ organization }}/{{ project }}/schema/postgres"
stack_images:
solution: "{{ image_repo }}/{{ organization }}/{{ project }}/stack/solution-{{ usage }}-{{ opsenv }}"
- pipeline: "{{ image_repo }}/{{ organization }}/{{ project }}/stack/pipeline-{{ devenv }}"
+ toolchain: "{{ image_repo }}/{{ organization }}/{{ project }}/stack/toolchain-{{ devenv }}"
docker_entity: "{{ 'image' if image_repo == 'local' else 'manifest' }}"
diff --git a/.dx/inventory/aliases.yml b/.dx/inventory/aliases.yml
index 04c70893..8ee70fba 100644
--- a/.dx/inventory/aliases.yml
+++ b/.dx/inventory/aliases.yml
@@ -16,7 +16,6 @@ codebase:
stack:
hosts:
solution:
- pipeline:
toolchain:
vars:
ansible_connection: local
diff --git a/.dx/stacks.yml b/.dx/stacks.yml
index 57db5138..480287c6 100644
--- a/.dx/stacks.yml
+++ b/.dx/stacks.yml
@@ -11,11 +11,11 @@
tags: [always]
- name: Capturing
- hosts: pipeline
+ hosts: toolchain
run_once: true
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
- file: tasks/pipeline/status.yml
+ file: tasks/toolchain/status.yml
tags: [always]
- name: Testing
@@ -27,13 +27,13 @@
tags: [build]
when: >
hostvars.solution.stack_status is changed or
- hostvars.pipeline.stack_status is changed
+ hostvars.toolchain.stack_status is changed
- ansible.builtin.import_tasks: # noqa: name[missing]
file: tasks/solution/test.yml
tags: [test]
when: >
hostvars.solution.stack_status is changed or
- hostvars.pipeline.stack_status is changed
+ hostvars.toolchain.stack_status is changed
- name: Packaging
hosts: solution
@@ -45,10 +45,10 @@
when: stack_status is changed
- name: Packaging
- hosts: pipeline
+ hosts: toolchain
run_once: true
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
- file: tasks/pipeline/package.yml
+ file: tasks/toolchain/package.yml
tags: [package]
when: stack_status is changed
diff --git a/.dx/tasks/pipeline/package.yml b/.dx/tasks/toolchain/package.yml
similarity index 68%
rename from .dx/tasks/pipeline/package.yml
rename to .dx/tasks/toolchain/package.yml
index 1df292b0..0343e9b0 100644
--- a/.dx/tasks/pipeline/package.yml
+++ b/.dx/tasks/toolchain/package.yml
@@ -3,7 +3,7 @@
name: image
vars:
image_tag: "{{ stack_cid.stdout[:7] }}"
- image_name: "{{ stack_images.pipeline }}"
+ image_name: "{{ stack_images.toolchain }}"
image_home: "{{ playbook_dir }}/../.github"
image_context: .
- image_push: "{{ focus == 'pipeline' }}"
+ image_push: "{{ focus != 'solution' }}"
diff --git a/.dx/tasks/pipeline/status.yml b/.dx/tasks/toolchain/status.yml
similarity index 82%
rename from .dx/tasks/pipeline/status.yml
rename to .dx/tasks/toolchain/status.yml
index fdc88a03..350c0037 100644
--- a/.dx/tasks/pipeline/status.yml
+++ b/.dx/tasks/toolchain/status.yml
@@ -11,7 +11,7 @@
- name: Capture status
ansible.builtin.command:
- cmd: docker {{ docker_entity }} inspect {{ stack_images.pipeline }}:{{ stack_cid.stdout[:7] }}
+ cmd: docker {{ docker_entity }} inspect {{ stack_images.toolchain }}:{{ stack_cid.stdout[:7] }}
register: stack_status
changed_when:
- stack_status.rc != 0
diff --git a/.github/workflows/toolchain-beyond-doubt.yml b/.github/workflows/toolchain-beyond-doubt.yml
index 23b7c93c..472cd8d3 100644
--- a/.github/workflows/toolchain-beyond-doubt.yml
+++ b/.github/workflows/toolchain-beyond-doubt.yml
@@ -29,7 +29,7 @@ jobs:
name: ${{ matrix.devenv.name }}
tools: python java docker
token: ${{ secrets.GITHUB_TOKEN }}
- - run: ansible-playbook codebase.yml -e focus=pipeline
+ - run: ansible-playbook codebase.yml -e focus=toolchain
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
@@ -39,7 +39,7 @@ jobs:
-e binary_repo=maven.pkg.github.com
-e image_repo=ghcr.io
-e devenv=${{ matrix.devenv.name }}
- -e focus=pipeline
+ -e focus=toolchain
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
diff --git a/.github/workflows/toolchain-sanity.yml b/.github/workflows/toolchain-sanity.yml
index 757488c7..ef5bce69 100644
--- a/.github/workflows/toolchain-sanity.yml
+++ b/.github/workflows/toolchain-sanity.yml
@@ -30,7 +30,7 @@ jobs:
name: ${{ matrix.devenv.name }}
tools: python java
token: ${{ secrets.GITHUB_TOKEN }}
- - run: ansible-playbook codebase.yml -e focus=pipeline
+ - run: ansible-playbook codebase.yml -e focus=toolchain
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
@@ -39,7 +39,7 @@ jobs:
ansible-playbook binaries.yml
-e binary_repo=maven.pkg.github.com
-e devenv=${{ matrix.devenv.name }}
- -e focus=pipeline
+ -e focus=toolchain
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}