Skip to content

Commit 215d628

Browse files
authored
OPSEXP-3107 Bumps with updatecli v2 (#1120)
1 parent 004f97d commit 215d628

15 files changed

+202
-549
lines changed

.github/updatecli_maven.tpl

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Update Maven artifacts for version {{ .updatecli_matrix_version }}
2+
3+
sources:
4+
{{- range $key, $artifact := .artifacts }}
5+
{{- if all $artifact.updatecli_matrix_component_key $artifact.artifact_name_file $artifact.artifact_name_key $artifact.artifact_version_key }}
6+
src_{{ $key }}_artifact_name:
7+
name: {{ $key }} artifact name
8+
kind: yaml
9+
spec:
10+
file: {{ $artifact.artifact_name_file }}
11+
key: {{ $artifact.artifact_name_key }}
12+
src_{{ $key }}:
13+
name: {{ $key }} artifact
14+
kind: maven
15+
spec:
16+
repository: {{ requiredEnv "NEXUS_USERNAME" }}:{{ requiredEnv "NEXUS_PASSWORD" }}@nexus.alfresco.com/nexus/repository/{{ $artifact.artifact_repository_name | default $.ansible_default_repository_name }}
17+
groupid: {{ $artifact.artifact_group_id | default $.ansible_default_group_id }}
18+
artifactid: '{{ source (printf "src_%s_artifact_name" $key) }}'
19+
dependson:
20+
- src_{{ $key }}_artifact_name
21+
{{- $matrix_filter := index $ "matrix" $.updatecli_matrix_version $artifact.updatecli_matrix_component_key }}
22+
{{- if $matrix_filter }}
23+
{{- $pattern := index $matrix_filter "pattern" }}
24+
{{- $version := index $matrix_filter "version" }}
25+
versionFilter:
26+
kind: {{ if $pattern }}regex{{ else }}semver{{ end }}
27+
pattern: >-
28+
{{- if $pattern }}
29+
^{{ $version }}{{ $pattern }}$
30+
{{- else }}
31+
{{ $version }}
32+
{{- end }}
33+
{{- end }}
34+
{{- end }}
35+
{{- end }}
36+
37+
targets:
38+
{{- range $key, $artifact := .artifacts }}
39+
{{- if all $artifact.updatecli_matrix_component_key $.ansible_version_file $artifact.artifact_version_key }}
40+
yml_{{ $key }}:
41+
name: {{ $key }} yml
42+
kind: yaml
43+
sourceid: src_{{ $key }}
44+
spec:
45+
file: "{{ $.ansible_version_file }}"
46+
key: "{{ $artifact.artifact_version_key }}"
47+
{{- end }}
48+
{{- end }}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
updatecli_matrix_version: current
2+
ansible_version_file: vars/acs23.yml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
updatecli_matrix_version: 7.3.N
2+
ansible_version_file: vars/acs73.yml
3+
artifacts:
4+
alfresco-audit-storage-app:
5+
updatecli_matrix_component_key: false # disabled because unsupported
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
updatecli_matrix_version: 7.4.N
2+
ansible_version_file: vars/acs74.yml
3+
artifacts:
4+
alfresco-audit-storage-app:
5+
updatecli_matrix_component_key: false # disabled because unsupported

.github/updatecli_maven_values.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
ansible_default_repository_name: private
2+
ansible_default_group_id: org.alfresco
3+
artifacts:
4+
# example-artifact:
5+
# artifact_name_file: file where the artifact name can be retrieved
6+
# artifact_name_key: yaml path to the artifact name field
7+
# artifact_version_key: yaml path to the artifact version field (target file is set globally)
8+
# updatecli_matrix_component_key: component name in the supported matrix in alfresco-updatecli
9+
# artifact_group_id: optional, group id of the artifact if different from the default
10+
# alfresco-control-center:
11+
# artifact_name_file: playbooks/group_vars/acc.yml
12+
# artifact_name_key: $.acc_artifact_id
13+
# artifact_version_key: $.acs_play_acc_version
14+
# updatecli_matrix_component_key: adminApp
15+
# alfresco-digital-workspace:
16+
# artifact_name_file: playbooks/group_vars/adw.yml
17+
# artifact_name_key: $.adw_artifact_id
18+
# artifact_version_key: $.acs_play_adw_version
19+
# updatecli_matrix_component_key: adw
20+
alfresco-audit-storage-app:
21+
artifact_name_file: playbooks/group_vars/audit_storage.yml
22+
artifact_name_key: $.acs_play_audit_storage_artifact_name
23+
artifact_version_key: $.acs_play_audit_storage_version
24+
updatecli_matrix_component_key: audit-storage
25+
alfresco-repository:
26+
artifact_name_file: playbooks/group_vars/repository.yml
27+
artifact_name_key: $.acs_play_repository_acs_artifact_name
28+
artifact_version_key: $.acs_play_repository_acs_version
29+
updatecli_matrix_component_key: acs
30+
alfresco-search-enterprise:
31+
artifact_name_file: playbooks/group_vars/search_enterprise.yml
32+
artifact_name_key: $.acs_play_search_enterprise_artifact_name
33+
artifact_version_key: $.acs_play_search_enterprise_version
34+
updatecli_matrix_component_key: search-enterprise
35+
alfresco-search-services:
36+
artifact_name_file: playbooks/group_vars/search.yml
37+
artifact_name_key: $.acs_play_search_artifact_name
38+
artifact_version_key: $.acs_play_search_version
39+
updatecli_matrix_component_key: search
40+
alfresco-sync-service:
41+
artifact_name_file: playbooks/group_vars/syncservice.yml
42+
artifact_name_key: $.acs_play_sync_artifact_name
43+
artifact_version_key: $.acs_play_sync_version
44+
updatecli_matrix_component_key: sync
45+
artifact_group_id: org.alfresco.services.sync
46+
alfresco-transform-core-aio:
47+
artifact_name_file: playbooks/group_vars/transformers.yml
48+
artifact_name_key: $.acs_play_transformers_aio_artifact_name
49+
artifact_version_key: $.acs_play_transformers_aio_version
50+
updatecli_matrix_component_key: tengine-aio
51+
alfresco-transform-router:
52+
artifact_name_file: playbooks/group_vars/transformers.yml
53+
artifact_name_key: $.acs_play_trouter_artifact_name
54+
artifact_version_key: $.acs_play_trouter_version
55+
updatecli_matrix_component_key: trouter
56+
alfresco-shared-file-store-controller:
57+
artifact_name_file: playbooks/group_vars/transformers.yml
58+
artifact_name_key: $.acs_play_sfs_artifact_name
59+
artifact_version_key: $.acs_play_sfs_version
60+
updatecli_matrix_component_key: sfs

.github/workflows/bumpVersions.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
name: Bump versions
3+
run-name: Bump using alfresco-updatecli/${{ inputs.alfresco-updatecli-ref || 'master' }}
4+
5+
on:
6+
push:
7+
paths:
8+
- .github/workflows/bumpVersions.yml
9+
- .github/updatecli_maven.tpl
10+
- .github/updatecli_maven_values.yml
11+
workflow_dispatch:
12+
inputs:
13+
alfresco-updatecli-ref:
14+
description: "The version to use for alfresco/alfresco-updatecli configs"
15+
type: string
16+
default: master
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.run_id }}
20+
cancel-in-progress: true
21+
22+
env:
23+
DEFAULT_BRANCH_NAME: master
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
name: Bump versions
29+
if: github.actor != 'dependabot[bot]'
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
with:
34+
token: ${{ secrets.BOT_GITHUB_TOKEN }}
35+
36+
- name: Install Updatecli
37+
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
38+
39+
- name: Checkout updatecli configs
40+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+
with:
42+
repository: alfresco/alfresco-updatecli
43+
ref: ${{ inputs.alfresco-updatecli-ref || 'master' }}
44+
path: alfresco-updatecli
45+
46+
- name: Updatecli apply
47+
shell: bash
48+
run: |
49+
set -x
50+
for version_file in .github/updatecli_maven_*_values.yml; do
51+
updatecli apply --config .github/updatecli_maven.tpl \
52+
-v alfresco-updatecli/deployments/values/supported-matrix.yaml \
53+
-v .github/updatecli_maven_values.yml \
54+
-v $version_file
55+
done
56+
env:
57+
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
58+
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
59+
UPDATECLI_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
60+
UPDATECLI_GITHUB_USERNAME: ${{ vars.BOT_GITHUB_USERNAME}}
61+
62+
- name: Git Auto Commit
63+
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
64+
with:
65+
commit_message: |
66+
🛠 Updatecli pipeline artifacts bump
67+
commit_user_name: ${{ vars.BOT_GITHUB_USERNAME }}
68+
commit_user_email: ${{ vars.BOT_GITHUB_EMAIL }}
69+
branch: ${{ github.ref_name == env.DEFAULT_BRANCH_NAME && 'updatecli-bump-versions' || github.ref_name }}
70+
create_branch: ${{ github.ref_name == env.DEFAULT_BRANCH_NAME }}
71+
push_options: ${{ github.ref_name == env.DEFAULT_BRANCH_NAME && '--force' || '' }}

.github/workflows/updatecli.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,3 +380,4 @@ apache-tomcat-*.tar.gz
380380
downloads/
381381

382382
.ansible/
383+
alfresco-updatecli/

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,22 @@ doc](./README.md#versioning)
188188

189189
## Release
190190

191-
Follow this quick checklist:
191+
First ensure that the
192+
[supported-matrix](https://github.com/Alfresco/alfresco-updatecli/blob/master/deployments/values/supported-matrix.yaml)
193+
reflects the status of the currently released Alfresco products and update if
194+
necessary before proceeding.
195+
196+
Follow the checklist:
192197

193198
1. Review currently open dependabot/renovate and merge them.
194199
2. For minor releases, ensure to update the links beginning with
195200
`https://support.hyland.com/r/Alfresco` to reflect the latest version or
196201
corresponding minor update documentation.
197202
3. In case of a new ACS major version, copy the versions inside the group_vars/all.yml to a new XX.N-extra-vars.yml
198-
4. Bump versions constraints in scripts/updatecli/updatecli_acs*.yml (workflow will take care of the rest)
203+
4. Run the [updatecli
204+
workflow](https://github.com/Alfresco/alfresco-ansible-deployment/actions/workflows/bumpVersions.yml)
205+
against an existing branch to push bumps there or against `master` to push
206+
the bumps to `updatecli-bump-versions` branch.
199207
5. Ensure that the [versions table in the main readme](docs/overview.md#versioning) has been updated
200208
6. Ensure that docker images and AMI id for the root molecule tests are
201209
reflecting any minor OS release (e.g. [default suite](../molecule/default/))

scripts/updatecli/updatecli_acs23.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)