Skip to content

Commit

Permalink
Build binaries with local repo (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavetok authored Oct 8, 2023
1 parent 799f0ef commit 8f8ad76
Show file tree
Hide file tree
Showing 33 changed files with 38 additions and 46 deletions.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions .dx/codebase.yml → .dx/codebase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
cmd: >
ansible-lint
toolchain.yaml
codebase.yml
stacks.yml
codebase.yaml
stacks.yaml
strip_empty_ends: false
changed_when: false
when: focus != 'solution'
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion .dx/images.yml → .dx/images.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- import_playbook: binaries.yml # noqa: name[play]
- import_playbook: binaries.yaml # noqa: name[play]
vars:
up_to_images: true
tags: [binaries, deps]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions .dx/stacks.yml → .dx/stacks.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
---
- import_playbook: images.yml # noqa: name[play]
- import_playbook: images.yaml # noqa: name[play]
tags: [images, deps]

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

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

- name: Testing
hosts: stack
run_once: true
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
file: tasks/solution/build.yml
file: tasks/solution/build.yaml
tags: [build]
when: >
hostvars.solution.stack_status is changed or
hostvars.toolchain.stack_status is changed
- ansible.builtin.import_tasks: # noqa: name[missing]
file: tasks/solution/test.yml
file: tasks/solution/test.yaml
tags: [test]
when: >
hostvars.solution.stack_status is changed or
Expand All @@ -40,7 +40,7 @@
run_once: true
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
file: tasks/solution/package.yml
file: tasks/solution/package.yaml
tags: [package]
when: stack_status is changed

Expand All @@ -49,6 +49,6 @@
run_once: true
tasks:
- ansible.builtin.import_tasks: # noqa: name[missing]
file: tasks/toolchain/package.yml
file: tasks/toolchain/package.yaml
tags: [package]
when: stack_status is changed
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
ansible.builtin.command:
cmd: >
docker compose
--file usages/basis.yml
--file usages/{{ usage }}.yml
--file usages/basis.yaml
--file usages/{{ usage }}.yaml
--profile {{ opsenv }}
config
--output target/context/compose.yml
--output target/context/compose.yaml
--no-path-resolution
strip_empty_ends: false
chdir: "{{ playbook_dir }}/../solutions"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ansible.builtin.command:
cmd: >
docker compose
--file compose.yml
--file compose.yaml
--profile {{ opsenv }}
up
--remove-orphans
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
image_name: "{{ stack_images.toolchain }}"
image_home: "{{ playbook_dir }}/../.github"
image_context: .
image_push: "{{ focus != 'solution' }}"
image_push: "{{ focus == 'toolchain' }}"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
with:
tools: python java docker
token: ${{ secrets.GITHUB_TOKEN }}
- run: ansible-playbook codebase.yml -e focus=solution
- run: ansible-playbook codebase.yaml -e focus=solution
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: images
run: >
ansible-playbook images.yml
ansible-playbook images.yaml
-e binary_repo=${{ env.BINARY_REPO }}
-e image_repo=${{ env.IMAGE_REPO }}
-e focus=solution
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
tools: python docker
token: ${{ secrets.GITHUB_TOKEN }}
- run: >
ansible-playbook stacks.yml -t build
ansible-playbook stacks.yaml -t build
-e image_repo=${{ env.IMAGE_REPO }}
-e usage=${{ matrix.usage }}
-e props=${{ matrix.opsenv }}
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
name: solution-${{ matrix.usage }}-${{ matrix.opsenv }}
path: solutions/target/context
- run: >
ansible-playbook stacks.yml -t test
ansible-playbook stacks.yaml -t test
-e image_repo=${{ env.IMAGE_REPO }}
-e usage=${{ matrix.usage }}
-e props=${{ matrix.opsenv }}
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
name: solution-${{ matrix.usage }}-${{ matrix.opsenv }}
path: solutions/target/context
- run: >
ansible-playbook stacks.yml -t package
ansible-playbook stacks.yaml -t package
-e image_repo=${{ env.IMAGE_REPO }}
-e focus=solution
-e usage=${{ matrix.usage }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
with:
tools: python java docker
token: ${{ secrets.GITHUB_TOKEN }}
- run: ansible-playbook codebase.yml -e focus=solution
- run: ansible-playbook codebase.yaml -e focus=solution
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: images
run: >
ansible-playbook images.yml
ansible-playbook images.yaml
-e binary_repo=maven.pkg.github.com
-e image_repo=ghcr.io
-e focus=solution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@ jobs:
with:
tools: python java
token: ${{ secrets.GITHUB_TOKEN }}
- run: ansible-playbook codebase.yml -e focus=solution
- run: ansible-playbook codebase.yaml -e focus=solution
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: binaries
run: >
ansible-playbook binaries.yml
-e binary_repo=maven.pkg.github.com
-e focus=solution
run: ansible-playbook binaries.yaml -e focus=solution
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ jobs:
name: ${{ matrix.devenv.name }}
tools: python java docker
token: ${{ secrets.GITHUB_TOKEN }}
- run: ansible-playbook codebase.yml -e focus=toolchain
- run: ansible-playbook codebase.yaml -e focus=toolchain
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: >
ansible-playbook stacks.yml
-e binary_repo=maven.pkg.github.com
ansible-playbook stacks.yaml
-e image_repo=ghcr.io
-e devenv=${{ matrix.devenv.name }}
-e focus=toolchain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@ jobs:
name: ${{ matrix.devenv.name }}
tools: python java
token: ${{ secrets.GITHUB_TOKEN }}
- run: ansible-playbook codebase.yml -e focus=toolchain
- run: ansible-playbook codebase.yaml -e focus=toolchain
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: >
ansible-playbook binaries.yml
-e binary_repo=maven.pkg.github.com
-e devenv=${{ matrix.devenv.name }}
-e focus=toolchain
- run: ansible-playbook binaries.yaml -e focus=toolchain
working-directory: .dx
env:
GITHUB_ACTOR: ${{ github.actor }}
Expand Down
4 changes: 2 additions & 2 deletions .templatesyncignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.github/workflows/project-template.yml
.github/dependabot.yml
.github/workflows/project-template.yaml
.github/dependabot.yaml
**/*.adoc
2 changes: 1 addition & 1 deletion apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<format>
<includes>
<include>*.xml</include>
<include>*.yml</include>
<include>*.yaml</include>
<include>Dockerfile</include>
</includes>
<trimTrailingWhitespace/>
Expand Down
2 changes: 1 addition & 1 deletion docs/pipeline.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

== Консольный интерфейс (CLI)

ansible-playbook <abstraction>.yml
ansible-playbook <abstraction>.yaml

== Todo

Expand Down
2 changes: 1 addition & 1 deletion libs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@
<format>
<includes>
<include>*.xml</include>
<include>*.yml</include>
<include>*.yaml</include>
<include>*.properties</include>
<include>Dockerfile</include>
</includes>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
databaseChangeLog:
- logical-file-path: dba/changelog.yml
- logical-file-path: dba/changelog.yaml
- property:
name: author
value: bezmen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
databaseChangeLog:
- logical-file-path: owner/changelog.yml
- logical-file-path: owner/changelog.yaml
- property:
name: author
value: bezmen
Expand Down
4 changes: 2 additions & 2 deletions solutions/usages/basis.yml → solutions/usages/basis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ services:
image.name: ${SCHEMA_IMAGE}
command: >
--show-banner=false
--changelog-file=sepulkarium/dba/changelog.yml
--changelog-file=sepulkarium/dba/changelog.yaml
--url=jdbc:postgresql://db:5432/bezmen?currentSchema=public
--liquibase-schema-name=public
--username=postgres
Expand All @@ -60,7 +60,7 @@ services:
image.name: ${SCHEMA_IMAGE}
command: >
--show-banner=false
--changelog-file=sepulkarium/owner/changelog.yml
--changelog-file=sepulkarium/owner/changelog.yaml
--url=jdbc:postgresql://db:5432/bezmen?currentSchema=bezmen
--liquibase-schema-name=bezmen
--username=bezmen
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<format>
<includes>
<include>*.xml</include>
<include>*.yml</include>
<include>*.yaml</include>
<include>*.properties</include>
<include>Dockerfile</include>
</includes>
Expand Down

0 comments on commit 8f8ad76

Please sign in to comment.