From 8f8ad769a14bafba0a9b5b4e77b1c301e1f79dcb Mon Sep 17 00:00:00 2001 From: Pavel Vetokhin Date: Sun, 8 Oct 2023 16:37:27 +0300 Subject: [PATCH] Build binaries with local repo (#157) --- .dx/{.yamllint.yml => .yamllint.yaml} | 0 .dx/{binaries.yml => binaries.yaml} | 0 .dx/{codebase.yml => codebase.yaml} | 4 ++-- .dx/group_vars/{all.yml => all.yaml} | 0 .dx/{images.yml => images.yaml} | 2 +- .dx/inventory/{aliases.yml => aliases.yaml} | 0 .dx/roles/image/defaults/{main.yml => main.yaml} | 0 .dx/roles/image/tasks/{main.yml => main.yaml} | 0 .dx/{stacks.yml => stacks.yaml} | 14 +++++++------- .dx/tasks/solution/{build.yml => build.yaml} | 6 +++--- .dx/tasks/solution/{package.yml => package.yaml} | 0 .dx/tasks/solution/{status.yml => status.yaml} | 0 .dx/tasks/solution/{test.yml => test.yaml} | 2 +- .dx/tasks/toolchain/{package.yml => package.yaml} | 2 +- .dx/tasks/toolchain/{status.yml => status.yaml} | 0 .../actions/prepare/{action.yml => action.yaml} | 0 .github/{dependabot.yml => dependabot.yaml} | 0 ...{project-template.yml => project-template.yaml} | 0 ...beyond-doubt.yml => solution-beyond-doubt.yaml} | 10 +++++----- ...ion-convincing.yml => solution-convincing.yaml} | 4 ++-- .../{solution-sanity.yml => solution-sanity.yaml} | 7 ++----- ...eyond-doubt.yml => toolchain-beyond-doubt.yaml} | 5 ++--- ...{toolchain-sanity.yml => toolchain-sanity.yaml} | 8 ++------ .templatesyncignore | 4 ++-- apps/pom.xml | 2 +- docs/pipeline.adoc | 2 +- libs/pom.xml | 2 +- .../dba/{changelog.yml => changelog.yaml} | 2 +- .../owner/{changelog.yml => changelog.yaml} | 2 +- solutions/usages/{basis.yml => basis.yaml} | 4 ++-- solutions/usages/{func.yml => func.yaml} | 0 solutions/usages/{toy.yml => toy.yaml} | 0 tests/pom.xml | 2 +- 33 files changed, 38 insertions(+), 46 deletions(-) rename .dx/{.yamllint.yml => .yamllint.yaml} (100%) rename .dx/{binaries.yml => binaries.yaml} (100%) rename .dx/{codebase.yml => codebase.yaml} (95%) rename .dx/group_vars/{all.yml => all.yaml} (100%) rename .dx/{images.yml => images.yaml} (97%) rename .dx/inventory/{aliases.yml => aliases.yaml} (100%) rename .dx/roles/image/defaults/{main.yml => main.yaml} (100%) rename .dx/roles/image/tasks/{main.yml => main.yaml} (100%) rename .dx/{stacks.yml => stacks.yaml} (79%) rename .dx/tasks/solution/{build.yml => build.yaml} (91%) rename .dx/tasks/solution/{package.yml => package.yaml} (100%) rename .dx/tasks/solution/{status.yml => status.yaml} (100%) rename .dx/tasks/solution/{test.yml => test.yaml} (97%) rename .dx/tasks/toolchain/{package.yml => package.yaml} (84%) rename .dx/tasks/toolchain/{status.yml => status.yaml} (100%) rename .github/actions/prepare/{action.yml => action.yaml} (100%) rename .github/{dependabot.yml => dependabot.yaml} (100%) rename .github/workflows/{project-template.yml => project-template.yaml} (100%) rename .github/workflows/{solution-beyond-doubt.yml => solution-beyond-doubt.yaml} (95%) rename .github/workflows/{solution-convincing.yml => solution-convincing.yaml} (95%) rename .github/workflows/{solution-sanity.yml => solution-sanity.yaml} (87%) rename .github/workflows/{toolchain-beyond-doubt.yml => toolchain-beyond-doubt.yaml} (88%) rename .github/workflows/{toolchain-sanity.yml => toolchain-sanity.yaml} (81%) rename schemas/postgres/sepulkarium/dba/{changelog.yml => changelog.yaml} (97%) rename schemas/postgres/sepulkarium/owner/{changelog.yml => changelog.yaml} (86%) rename solutions/usages/{basis.yml => basis.yaml} (94%) rename solutions/usages/{func.yml => func.yaml} (100%) rename solutions/usages/{toy.yml => toy.yaml} (100%) diff --git a/.dx/.yamllint.yml b/.dx/.yamllint.yaml similarity index 100% rename from .dx/.yamllint.yml rename to .dx/.yamllint.yaml diff --git a/.dx/binaries.yml b/.dx/binaries.yaml similarity index 100% rename from .dx/binaries.yml rename to .dx/binaries.yaml diff --git a/.dx/codebase.yml b/.dx/codebase.yaml similarity index 95% rename from .dx/codebase.yml rename to .dx/codebase.yaml index 0af17254..1fd18c67 100644 --- a/.dx/codebase.yml +++ b/.dx/codebase.yaml @@ -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' diff --git a/.dx/group_vars/all.yml b/.dx/group_vars/all.yaml similarity index 100% rename from .dx/group_vars/all.yml rename to .dx/group_vars/all.yaml diff --git a/.dx/images.yml b/.dx/images.yaml similarity index 97% rename from .dx/images.yml rename to .dx/images.yaml index 0a238794..59547335 100644 --- a/.dx/images.yml +++ b/.dx/images.yaml @@ -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] diff --git a/.dx/inventory/aliases.yml b/.dx/inventory/aliases.yaml similarity index 100% rename from .dx/inventory/aliases.yml rename to .dx/inventory/aliases.yaml diff --git a/.dx/roles/image/defaults/main.yml b/.dx/roles/image/defaults/main.yaml similarity index 100% rename from .dx/roles/image/defaults/main.yml rename to .dx/roles/image/defaults/main.yaml diff --git a/.dx/roles/image/tasks/main.yml b/.dx/roles/image/tasks/main.yaml similarity index 100% rename from .dx/roles/image/tasks/main.yml rename to .dx/roles/image/tasks/main.yaml diff --git a/.dx/stacks.yml b/.dx/stacks.yaml similarity index 79% rename from .dx/stacks.yml rename to .dx/stacks.yaml index 480287c6..3790a034 100644 --- a/.dx/stacks.yml +++ b/.dx/stacks.yaml @@ -1,5 +1,5 @@ --- -- import_playbook: images.yml # noqa: name[play] +- import_playbook: images.yaml # noqa: name[play] tags: [images, deps] - name: Capturing @@ -7,7 +7,7 @@ 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 @@ -15,7 +15,7 @@ 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 @@ -23,13 +23,13 @@ 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 @@ -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 @@ -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 diff --git a/.dx/tasks/solution/build.yml b/.dx/tasks/solution/build.yaml similarity index 91% rename from .dx/tasks/solution/build.yml rename to .dx/tasks/solution/build.yaml index 1cc1ae41..02524554 100644 --- a/.dx/tasks/solution/build.yml +++ b/.dx/tasks/solution/build.yaml @@ -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" diff --git a/.dx/tasks/solution/package.yml b/.dx/tasks/solution/package.yaml similarity index 100% rename from .dx/tasks/solution/package.yml rename to .dx/tasks/solution/package.yaml diff --git a/.dx/tasks/solution/status.yml b/.dx/tasks/solution/status.yaml similarity index 100% rename from .dx/tasks/solution/status.yml rename to .dx/tasks/solution/status.yaml diff --git a/.dx/tasks/solution/test.yml b/.dx/tasks/solution/test.yaml similarity index 97% rename from .dx/tasks/solution/test.yml rename to .dx/tasks/solution/test.yaml index af70699f..edac3c73 100644 --- a/.dx/tasks/solution/test.yml +++ b/.dx/tasks/solution/test.yaml @@ -9,7 +9,7 @@ ansible.builtin.command: cmd: > docker compose - --file compose.yml + --file compose.yaml --profile {{ opsenv }} up --remove-orphans diff --git a/.dx/tasks/toolchain/package.yml b/.dx/tasks/toolchain/package.yaml similarity index 84% rename from .dx/tasks/toolchain/package.yml rename to .dx/tasks/toolchain/package.yaml index 0343e9b0..ec6ff4ff 100644 --- a/.dx/tasks/toolchain/package.yml +++ b/.dx/tasks/toolchain/package.yaml @@ -6,4 +6,4 @@ image_name: "{{ stack_images.toolchain }}" image_home: "{{ playbook_dir }}/../.github" image_context: . - image_push: "{{ focus != 'solution' }}" + image_push: "{{ focus == 'toolchain' }}" diff --git a/.dx/tasks/toolchain/status.yml b/.dx/tasks/toolchain/status.yaml similarity index 100% rename from .dx/tasks/toolchain/status.yml rename to .dx/tasks/toolchain/status.yaml diff --git a/.github/actions/prepare/action.yml b/.github/actions/prepare/action.yaml similarity index 100% rename from .github/actions/prepare/action.yml rename to .github/actions/prepare/action.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yaml similarity index 100% rename from .github/dependabot.yml rename to .github/dependabot.yaml diff --git a/.github/workflows/project-template.yml b/.github/workflows/project-template.yaml similarity index 100% rename from .github/workflows/project-template.yml rename to .github/workflows/project-template.yaml diff --git a/.github/workflows/solution-beyond-doubt.yml b/.github/workflows/solution-beyond-doubt.yaml similarity index 95% rename from .github/workflows/solution-beyond-doubt.yml rename to .github/workflows/solution-beyond-doubt.yaml index 9bab5e4e..81247963 100644 --- a/.github/workflows/solution-beyond-doubt.yml +++ b/.github/workflows/solution-beyond-doubt.yaml @@ -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 @@ -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 }} @@ -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 }} @@ -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 }} diff --git a/.github/workflows/solution-convincing.yml b/.github/workflows/solution-convincing.yaml similarity index 95% rename from .github/workflows/solution-convincing.yml rename to .github/workflows/solution-convincing.yaml index 7c2927e0..b78c68b5 100644 --- a/.github/workflows/solution-convincing.yml +++ b/.github/workflows/solution-convincing.yaml @@ -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 diff --git a/.github/workflows/solution-sanity.yml b/.github/workflows/solution-sanity.yaml similarity index 87% rename from .github/workflows/solution-sanity.yml rename to .github/workflows/solution-sanity.yaml index f2d5c746..36b9621a 100644 --- a/.github/workflows/solution-sanity.yml +++ b/.github/workflows/solution-sanity.yaml @@ -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 }} diff --git a/.github/workflows/toolchain-beyond-doubt.yml b/.github/workflows/toolchain-beyond-doubt.yaml similarity index 88% rename from .github/workflows/toolchain-beyond-doubt.yml rename to .github/workflows/toolchain-beyond-doubt.yaml index 472cd8d3..8d7dff81 100644 --- a/.github/workflows/toolchain-beyond-doubt.yml +++ b/.github/workflows/toolchain-beyond-doubt.yaml @@ -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 diff --git a/.github/workflows/toolchain-sanity.yml b/.github/workflows/toolchain-sanity.yaml similarity index 81% rename from .github/workflows/toolchain-sanity.yml rename to .github/workflows/toolchain-sanity.yaml index ef5bce69..ba4b45be 100644 --- a/.github/workflows/toolchain-sanity.yml +++ b/.github/workflows/toolchain-sanity.yaml @@ -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 }} diff --git a/.templatesyncignore b/.templatesyncignore index b9d3206d..c8b391a1 100644 --- a/.templatesyncignore +++ b/.templatesyncignore @@ -1,3 +1,3 @@ -.github/workflows/project-template.yml -.github/dependabot.yml +.github/workflows/project-template.yaml +.github/dependabot.yaml **/*.adoc diff --git a/apps/pom.xml b/apps/pom.xml index e751b030..63d65d0b 100644 --- a/apps/pom.xml +++ b/apps/pom.xml @@ -166,7 +166,7 @@ *.xml - *.yml + *.yaml Dockerfile diff --git a/docs/pipeline.adoc b/docs/pipeline.adoc index 8988d470..1df78f70 100644 --- a/docs/pipeline.adoc +++ b/docs/pipeline.adoc @@ -69,7 +69,7 @@ == Консольный интерфейс (CLI) - ansible-playbook .yml + ansible-playbook .yaml == Todo diff --git a/libs/pom.xml b/libs/pom.xml index f6e15ca8..5f8686ed 100644 --- a/libs/pom.xml +++ b/libs/pom.xml @@ -449,7 +449,7 @@ *.xml - *.yml + *.yaml *.properties Dockerfile diff --git a/schemas/postgres/sepulkarium/dba/changelog.yml b/schemas/postgres/sepulkarium/dba/changelog.yaml similarity index 97% rename from schemas/postgres/sepulkarium/dba/changelog.yml rename to schemas/postgres/sepulkarium/dba/changelog.yaml index 633c9f37..3b4ff067 100644 --- a/schemas/postgres/sepulkarium/dba/changelog.yml +++ b/schemas/postgres/sepulkarium/dba/changelog.yaml @@ -1,5 +1,5 @@ databaseChangeLog: - - logical-file-path: dba/changelog.yml + - logical-file-path: dba/changelog.yaml - property: name: author value: bezmen diff --git a/schemas/postgres/sepulkarium/owner/changelog.yml b/schemas/postgres/sepulkarium/owner/changelog.yaml similarity index 86% rename from schemas/postgres/sepulkarium/owner/changelog.yml rename to schemas/postgres/sepulkarium/owner/changelog.yaml index b1f8305c..fb43df90 100644 --- a/schemas/postgres/sepulkarium/owner/changelog.yml +++ b/schemas/postgres/sepulkarium/owner/changelog.yaml @@ -1,5 +1,5 @@ databaseChangeLog: - - logical-file-path: owner/changelog.yml + - logical-file-path: owner/changelog.yaml - property: name: author value: bezmen diff --git a/solutions/usages/basis.yml b/solutions/usages/basis.yaml similarity index 94% rename from solutions/usages/basis.yml rename to solutions/usages/basis.yaml index 5c5050a9..baf3a47a 100644 --- a/solutions/usages/basis.yml +++ b/solutions/usages/basis.yaml @@ -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 @@ -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 diff --git a/solutions/usages/func.yml b/solutions/usages/func.yaml similarity index 100% rename from solutions/usages/func.yml rename to solutions/usages/func.yaml diff --git a/solutions/usages/toy.yml b/solutions/usages/toy.yaml similarity index 100% rename from solutions/usages/toy.yml rename to solutions/usages/toy.yaml diff --git a/tests/pom.xml b/tests/pom.xml index 634e50b3..b89382e6 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -73,7 +73,7 @@ *.xml - *.yml + *.yaml *.properties Dockerfile