Skip to content

Commit

Permalink
Rename toolchain to gear
Browse files Browse the repository at this point in the history
  • Loading branch information
pavetok committed Feb 17, 2024
1 parent a8248b9 commit b24644e
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 58 deletions.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ ansible-playbook stacks.yaml
- Новый инструмент сборки бинарников. Сейчас только Apache Maven.
- Новый инструмент управления образами. Сейчас только Docker Engine.
- Новый инструмент раскатки стеков. Сейчас только Docker Compose.
- Новое целевое использование (purpose) решения (solution) или инструментария (toolchain).
- Новое целевое использование (purpose) решения (solution) или снаряжения (gear).
- Новая обвязка построения дерева хешей. Сейчас связка Git и Ansible.

=== Непредсказуемая сложность
Expand Down
1 change: 0 additions & 1 deletion bakers/ansible/codebase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
# list all top level playbooks
cmd: >-
ansible-lint
toolchain.yaml
codebase.yaml
stacks.yaml
strip_empty_ends: false
Expand Down
2 changes: 1 addition & 1 deletion bakers/ansible/inventory/aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ codebase:
stack:
hosts:
solution:
toolchain:
gear:
all:
hosts:
db:
Expand Down
4 changes: 2 additions & 2 deletions bakers/ansible/inventory/group_vars/all/stacks.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
toolchain:
image: stack/toolchain
gear:
image: stack/gear

solution:
name: "{{ project.name }}"
Expand Down
12 changes: 6 additions & 6 deletions bakers/ansible/stacks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
tags: [always]

- name: Capturing
hosts: toolchain
hosts: gear
run_once: true
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
file: tasks/toolchain/status.yaml
file: tasks/gear/status.yaml
tags: [always]

- name: Testing
Expand All @@ -29,13 +29,13 @@
tags: [build]
when: >-
hostvars.solution.stack_status is changed or
hostvars.toolchain.stack_status is changed
hostvars.gear.stack_status is changed
- ansible.builtin.import_tasks: # noqa: name[missing]
file: tasks/solution/test.yaml
tags: [test]
when: >-
hostvars.solution.stack_status is changed or
hostvars.toolchain.stack_status is changed
hostvars.gear.stack_status is changed
- name: Packaging
hosts: solution
Expand All @@ -47,10 +47,10 @@
when: stack_status is changed

- name: Packaging
hosts: toolchain
hosts: gear
run_once: true
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
file: tasks/toolchain/package.yaml
file: tasks/gear/package.yaml
tags: [package]
when: stack_status is changed
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
- ansible.builtin.import_role: # noqa: name[missing]
name: image
vars:
image_tag: "{{ toolchain_tag }}"
image_name: "{{ image_repo }}/{{ toolchain.image }}"
image_tag: "{{ gear_tag }}"
image_name: "{{ image_repo }}/{{ gear.image }}"
image_home: "{{ project.dir }}/stack/gear/{{ devenv }}"
image_key: "{{ toolchain.image }}:{{ devenv }}"
image_key: "{{ gear.image }}:{{ devenv }}"
image_push: false
image_args:
DOCKER_VERSION: "{{ lookup('ansible.builtin.pipe', 'docker version --format {% raw %}{{.Client.Version}}{% endraw %}') }}" # noqa: yaml[line-length]
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
- ansible.builtin.import_role: # noqa: name[missing]
name: image
vars:
image_tag: "{{ toolchain_tag }}"
image_name: "{{ image_repo }}/{{ toolchain.image }}"
image_tag: "{{ gear_tag }}"
image_name: "{{ image_repo }}/{{ gear.image }}"
image_home: "{{ project.dir }}/stack/gear/{{ devenv }}"
image_key: "{{ toolchain.image }}:{{ devenv }}"
image_key: "{{ gear.image }}:{{ devenv }}"
image_push: "{{ image_storage != 'local' }}"
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

- name: Declare tag
ansible.builtin.set_fact:
toolchain_tag: "{{ devenv }}-{{ stack_cid.stdout[:7] }}"
gear_tag: "{{ devenv }}-{{ stack_cid.stdout[:7] }}"

- name: Capture status
ansible.builtin.command:
cmd: docker {{ docker_entity }} inspect {{ image_repo }}/{{ toolchain.image }}:{{ toolchain_tag }}
cmd: docker {{ docker_entity }} inspect {{ image_repo }}/{{ gear.image }}:{{ gear_tag }}
register: stack_status
changed_when:
- stack_status.rc != 0
Expand Down
38 changes: 0 additions & 38 deletions bakers/ansible/toolchain.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/toolchain.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Инструментарий (Toolchain)
= Снаряжение (Gear)

Система, реализуемая для разработчиков.

Expand Down

0 comments on commit b24644e

Please sign in to comment.