-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
166 additions
and
77 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
--- | ||
- name: Building and checking | ||
hosts: lib | ||
tasks: | ||
- ansible.builtin.import_tasks: # noqa: name[missing] | ||
file: tasks/lib/capture.yaml | ||
- ansible.builtin.import_tasks: # noqa: name[missing] | ||
file: tasks/java/check.yaml | ||
vars: | ||
maven_projects: "{{ product.libs|map(attribute='name') }}" | ||
when: binary_status is changed | ||
- ansible.builtin.import_tasks: # noqa: name[missing] | ||
file: tasks/lib/build-check-publish.yaml | ||
vars: | ||
maven_phase: "{{ 'deploy' if repo_mode == 'rw' else 'install' }}" | ||
when: binary_status is changed | ||
|
||
- name: Building and checking | ||
hosts: app | ||
tasks: | ||
- ansible.builtin.import_tasks: # noqa: name[missing] | ||
file: tasks/java/check.yaml | ||
- ansible.builtin.import_tasks: # noqa: name[missing] | ||
file: tasks/app/build-and-check.yaml | ||
file: tasks/app/build-check.yaml | ||
vars: | ||
maven_phase: package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ sources: | |
java: | ||
ansible: | ||
github: | ||
binaries: | ||
hosts: | ||
lib: | ||
images: | ||
hosts: | ||
db: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
- name: Build | ||
ansible.builtin.command: | ||
cmd: >- | ||
mvn {{ maven_phase|mandatory }} | ||
--activate-profiles {{ devenv }} | ||
--no-snapshot-updates | ||
--batch-mode | ||
--fail-fast | ||
--also-make | ||
--threads 2 | ||
--projects {{ | ||
product.libs | ||
| map(attribute='name') | ||
| map('regex_replace', '^', ':') | ||
| join(',') | ||
}} | ||
--define revision={{ binary_tag }} | ||
chdir: "{{ project.dir }}" | ||
strip_empty_ends: false | ||
changed_when: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
- name: Capture CID's | ||
ansible.builtin.command: | ||
cmd: git hash-object --stdin | ||
stdin: | | ||
{% for lib in product.libs %} | ||
{{ lookup('ansible.builtin.pipe', 'git write-tree --prefix=lib/' ~ lib.name) }} | ||
{% endfor %} | ||
register: binary_cid | ||
changed_when: false | ||
|
||
- name: Declare tag | ||
ansible.builtin.set_fact: | ||
binary_tag: "{{ devenv }}-{{ binary_cid.stdout[:7] }}" | ||
changed_when: false | ||
|
||
- name: Capture status | ||
ansible.builtin.command: | ||
cmd: >- | ||
mvn dependency:copy@capture | ||
--projects :lib | ||
{% if repo_mode == 'n/a' %} | ||
--offline | ||
{% else %} | ||
--define remoteRepositories=github::::https://{{ binary_repo }}/{{ project.org }}/{{ project.name }} | ||
{% endif %} | ||
--define revision={{ binary_tag }} | ||
chdir: "{{ project.dir }}" | ||
register: binary_status | ||
failed_when: false | ||
changed_when: | ||
- binary_status.rc != 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters