Skip to content

Commit

Permalink
Toolchain instead of pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
pavetok committed Oct 8, 2023
1 parent 4b1b835 commit 36a9ec0
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .dx/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@
chdir: "{{ playbook_dir }}/.."
strip_empty_ends: false
changed_when: true
when: focus == 'pipeline'
when: focus != 'solution'
2 changes: 1 addition & 1 deletion .dx/codebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
--batch-mode
{% if focus == 'solution' %}
--projects apps/sepuling
{% elif focus == 'pipeline' %}
{% elif focus == 'toolchain' %}
--projects tests/e2e
{% endif %}
--also-make
Expand Down
4 changes: 2 additions & 2 deletions .dx/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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' }}"

Expand Down
1 change: 0 additions & 1 deletion .dx/inventory/aliases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ codebase:
stack:
hosts:
solution:
pipeline:
toolchain:
vars:
ansible_connection: local
12 changes: 6 additions & 6 deletions .dx/stacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}"
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/toolchain-beyond-doubt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/toolchain-sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down

0 comments on commit 36a9ec0

Please sign in to comment.