Skip to content

Commit cdd4ea6

Browse files
committed
OPSEXP-3055 Refactor repository war downloads to use defaults
1 parent f85089f commit cdd4ea6

File tree

18 files changed

+90
-36
lines changed

18 files changed

+90
-36
lines changed

.secrets.baseline

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
"filename": "playbooks/acs.yml",
145145
"hashed_secret": "0ca8f28152882e5edb182fc3f7d4ae10a5b10dc5",
146146
"is_verified": false,
147-
"line_number": 500
147+
"line_number": 509
148148
}
149149
],
150150
"roles/activemq/molecule/default/tests/test_activemq.py": [
@@ -173,7 +173,7 @@
173173
"filename": "roles/repository/tasks/main.yml",
174174
"hashed_secret": "0eeb6b7bb932e8594b4ffe039dc15332f670cbd9",
175175
"is_verified": false,
176-
"line_number": 91,
176+
"line_number": 111,
177177
"is_secret": false
178178
}
179179
],
@@ -208,5 +208,5 @@
208208
}
209209
]
210210
},
211-
"generated_at": "2025-02-20T20:40:33Z"
211+
"generated_at": "2025-02-21T15:31:21Z"
212212
}

7.3.N-extra-vars.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ amps:
1717
googledrive_share:
1818
repository: "{{ nexus_repository.releases }}/integrations/alfresco-googledrive-share"
1919
version: 3.4.2
20-
api_explorer:
21-
artifact_name: api-explorer
22-
repository: "{{ nexus_repository.releases }}"
23-
version: 7.3.0
2420
transform:
2521
artifact_name: alfresco-transform-core-aio
2622
repository: "{{ nexus_repository.releases }}"

7.4.N-extra-vars.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ amps:
2020
repository: >-
2121
{{ nexus_repository.releases }}/integrations/alfresco-googledrive-share
2222
version: 3.4.2
23-
api_explorer:
24-
artifact_name: api-explorer
25-
repository: "{{ nexus_repository.releases }}"
26-
version: 7.4.0
2723
transform:
2824
artifact_name: alfresco-transform-core-aio
2925
repository: "{{ nexus_repository.releases }}"

community-extra-vars.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ acs:
44
repository: "{{ nexus_repository.releases }}"
55
version: 23.4.1
66
edition: Community
7-
api_explorer:
8-
artifact_name: api-explorer
9-
repository: "{{ nexus_repository.releases }}"
10-
version: 23.4.0
117
transform:
128
artifact_name: alfresco-transform-core-aio
139
repository: "{{ nexus_repository.releases }}"

docs/deployment-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ Or:
821821
```yaml
822822
war_downloads:
823823
- url: "https://your.repo.com/path/to/your/artifacts/your-api-explorer.war"
824-
sha1_checksum_url: "https://your.repo.com/path/to/your/artifacts/your-api-explorer.war.sha1"
824+
checksum: "sha1:https://your.repo.com/path/to/your/artifacts/your-api-explorer.war.sha1"
825825
dest: "{{ content_folder }}/web-server/webapps/api-explorer.war"
826826
```
827827

group_vars/all.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ amps:
4343
repository: >-
4444
{{ nexus_repository.releases }}/integrations/alfresco-googledrive-share
4545
version: 4.1.0
46-
api_explorer:
47-
artifact_name: api-explorer
48-
repository: "{{ nexus_repository.releases }}"
49-
version: 23.4.0
5046
transform:
5147
artifact_name: alfresco-transform-core-aio
5248
repository: "{{ nexus_repository.releases }}"
@@ -60,12 +56,6 @@ downloads:
6056
{{ transform.repository }}/{{ transform.artifact_name }}/{{ transform.version }}/{{ transform.artifact_name }}-{{ transform.version }}.jar
6157
transform_jar_sha1_checksum_url: >-
6258
{{ transform.repository }}/{{ transform.artifact_name }}/{{ transform.version }}/{{ transform.artifact_name }}-{{ transform.version }}.jar.sha1
63-
war_downloads:
64-
- url: >-
65-
{{ api_explorer.repository }}/{{ api_explorer.artifact_name }}/{{ api_explorer.version }}/{{ api_explorer.artifact_name }}-{{ api_explorer.version }}.war
66-
dest: "{{ content_folder }}/web-server/webapps/api-explorer.war"
67-
sha1_checksum_url: >-
68-
{{ api_explorer.repository }}/{{ api_explorer.artifact_name }}/{{ api_explorer.version }}/{{ api_explorer.artifact_name }}-{{ api_explorer.version }}.war.sha1
6959
amp_downloads:
7060
- url: >-
7161
{{ amps.googledrive_repo.repository }}/{{ amps.googledrive_repo.version }}/alfresco-googledrive-repo-enterprise-{{ amps.googledrive_repo.version }}.amp

playbooks/acs.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,23 @@
285285
raw_properties: "{{ properties_snippets }}"
286286
repository_identity_url: "{{ identity_url | default('') }}"
287287
tomcat_version: "{{ acs_play_tomcat_version }}"
288+
repository_api_explorer_version: "{{ acs_play_repository_api_explorer_version }}"
289+
repository_api_explorer_archive_url: "{{ acs_play_repository_api_explorer_archive_url }}"
290+
repository_api_explorer_archive_checksum_url: "{{ acs_play_repository_api_explorer_archive_checksum_url }}"
291+
repository_extra_war_downloads: "{{ acs_play_repository_extra_war_downloads }}"
292+
repository_war_nexus_username: "{{ nexus_user }}"
293+
repository_war_nexus_password: "{{ nexus_password }}"
288294
post_tasks:
289295
- name: Update installation status file with ACS
290296
become: true
291297
vars:
292298
acs_components:
293299
acs: "{{ acs }}"
294300
amps: "{{ amps }}"
295-
api_explorer: "{{ api_explorer }}"
301+
api_explorer:
302+
artifact_name: "{{ acs_play_repository_api_explorer_artifact_name }}"
303+
repository: "{{ acs_play_repository_api_explorer_repository }}"
304+
version: "{{ acs_play_repository_api_explorer_version }}"
296305
ansible.builtin.blockinfile:
297306
block: "{{ acs_components | to_nice_yaml(indent=2) }}"
298307
create: true
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
acs_play_repository_api_explorer_artifact_name: api-explorer
2+
acs_play_repository_api_explorer_repository: "{{ nexus_repository.releases }}"
3+
acs_play_repository_api_explorer_archive_url: "{{ acs_play_repository_api_explorer_repository }}/{{ acs_play_repository_api_explorer_artifact_name }}/{{ acs_play_repository_api_explorer_version }}/{{ acs_play_repository_api_explorer_artifact_name }}-{{ acs_play_repository_api_explorer_version }}.war"
4+
acs_play_repository_api_explorer_archive_checksum_url: "sha1:{{ acs_play_repository_api_explorer_archive_url }}.sha1"
5+
# additional list of war downloads
6+
acs_play_repository_extra_war_downloads: []
7+
# - url: "https://your.repo.com/path/to/your/artifacts/your-war.war"
8+
# checksum: "sha1:https://your.repo.com/path/to/your/artifacts/your-war.war.sha1"
9+
# dest: "{{ content_folder }}/web-server/webapps/your-war.war"

playbooks/prerun-upgrade-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
acs.edition != installed_components.acs.edition or
4040
acs.version.split('.')[:3] | join('.') != installed_components.acs.version.split('.')[:3] | join('.') or
4141
acs.version is version(installed_components.acs.version, 'lt') or
42-
api_explorer.version != installed_components.api_explorer.version
42+
acs_play_repository_api_explorer_version != installed_components.api_explorer.version
4343
4444
- name: Fail on unsupported AMPS upgrades
4545
ansible.builtin.fail:

roles/repository/defaults/main.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,23 @@ acs_environment:
1111
- $JAVA_OPTS
1212
JAVA_TOOL_OPTIONS:
1313
- $JAVA_TOOL_OPTIONS
14+
# war downloads
15+
repository_api_explorer_artifact_name: api-explorer
16+
repository_api_explorer_repository: https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco
17+
18+
repository_api_explorer_version: 23.4.0
19+
repository_api_explorer_archive_url: "{{ repository_api_explorer_repository }}/{{ repository_api_explorer_artifact_name }}/{{ repository_api_explorer_version }}/{{ repository_api_explorer_artifact_name }}-{{ repository_api_explorer_version }}.war"
20+
repository_api_explorer_archive_checksum_url: "sha1:{{ repository_api_explorer_archive_url }}.sha1"
21+
22+
repository_default_war_downloads:
23+
- url: "{{ repository_api_explorer_archive_url }}"
24+
checksum: "{{ repository_api_explorer_archive_checksum_url }}"
25+
dest: "{{ content_folder }}/web-server/webapps/api-explorer.war"
26+
27+
repository_extra_war_downloads: []
28+
29+
repository_war_nexus_username: null
30+
repository_war_nexus_password: null
1431

1532
# CSRF config
1633
csrf:

0 commit comments

Comments
 (0)