From 879137f54d329a7f058ec4afc59aec3f2e6471d6 Mon Sep 17 00:00:00 2001
From: Pavel Vetokhin
Date: Wed, 20 Sep 2023 18:43:13 +0300
Subject: [PATCH] Refactor codebase checking
---
.dx/inventory/aliases.yml | 10 +++++++---
.dx/sources.yml | 19 +++++++++++++++----
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/.dx/inventory/aliases.yml b/.dx/inventory/aliases.yml
index fae333e4..248d598d 100644
--- a/.dx/inventory/aliases.yml
+++ b/.dx/inventory/aliases.yml
@@ -1,12 +1,16 @@
---
all:
hosts:
- codebase:
- lib:
app:
schema:
test:
- dx:
+ vars:
+ ansible_connection: local
+codebase:
+ hosts:
+ java:
+ ansible:
+ github:
vars:
ansible_connection: local
stack:
diff --git a/.dx/sources.yml b/.dx/sources.yml
index 6d03b67a..6d9fcc91 100644
--- a/.dx/sources.yml
+++ b/.dx/sources.yml
@@ -1,6 +1,6 @@
---
-- name: Sources
- hosts: codebase
+- name: Codebase
+ hosts: java
run_once: true
tasks:
- name: Analyze
@@ -10,15 +10,21 @@
--no-snapshot-updates
--batch-mode
{% if focus == 'solution' %}
- --projects libs,apps
+ --projects apps/foo
{% elif focus == 'pipeline' %}
- --projects tools,tests
+ --projects tests/e2e
{% endif %}
+ --also-make
enforcer:enforce
spotless:check
chdir: "{{ playbook_dir }}/.."
strip_empty_ends: false
changed_when: false
+
+- name: Codebase
+ hosts: ansible
+ run_once: true
+ tasks:
- name: Analyze
ansible.builtin.command:
# list all top level playbooks
@@ -29,6 +35,11 @@
strip_empty_ends: false
changed_when: false
when: focus != 'solution'
+
+- name: Codebase
+ hosts: github
+ run_once: true
+ tasks:
- name: Analyze
ansible.builtin.command:
cmd: yamllint ../.github