Skip to content

Commit

Permalink
Add updatecli amps pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn committed Dec 12, 2024
1 parent 46d4068 commit 82644ee
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/updatecli.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ targets:
sourceid: src_{{ $key }}
spec:
file: "{{ $.updatecli_self }}"
key: "artifacts.{{ $key }}.version"
key: "$.artifacts.{{ $key }}.version"
{{- end }}
{{- end }}
53 changes: 53 additions & 0 deletions .github/updatecli_amps.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Update AMPs artifacts for {{ .updatecli_matrix_version }} version using acs-packaging repository

scms:
acsPackaging:
kind: github
spec:
owner: Alfresco
repository: acs-packaging
branch: {{ .updatecli_release_branch }}
token: {{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}
username: {{ requiredEnv "UPDATECLI_GITHUB_USERNAME" }}
acsEntRepo:
kind: github
spec:
owner: Alfresco
repository: alfresco-enterprise-repo
branch: {{ .updatecli_release_branch }}
token: {{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}
username: {{ requiredEnv "UPDATECLI_GITHUB_USERNAME" }}
acsComRepo:
kind: github
spec:
owner: Alfresco
repository: alfresco-community-repo
branch: {{ .updatecli_release_branch }}
token: {{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}
username: {{ requiredEnv "UPDATECLI_GITHUB_USERNAME" }}

sources:
{{- range $key, $artifact := .artifacts }}
{{- if $artifact.updatecli_xml_target }}
src_{{ $key }}:
name: {{ $artifact.name }}
scmid: {{ $artifact.updatecli_scm_id }}
kind: xml
spec:
file: pom.xml
path: "{{ $artifact.updatecli_xml_target }}"
{{- end }}
{{- end }}

targets:
{{- range $key, $artifact := .artifacts }}
{{- if $artifact.updatecli_xml_target }}
yml_{{ $key }}:
name: {{ $artifact.name }} yml
kind: yaml
sourceid: src_{{ $key }}
spec:
file: "{{ $.updatecli_self }}"
key: "$.artifacts.{{ $key }}.version"
{{- end }}
{{- end }}
14 changes: 14 additions & 0 deletions .github/updatecli_amps_values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
artifacts:
alfresco-share-services:
updatecli_scm_id: acsEntRepo
updatecli_xml_target: "/project/properties/dependency.alfresco-community-repo.version"
alfresco-aos-module:
updatecli_scm_id: acsComRepo
updatecli_xml_target: "/project/properties/alfresco.aos-module.version"
alfresco-device-sync-repo:
updatecli_scm_id: acsPackaging
updatecli_xml_target: "/project/properties/alfresco.desktop-sync.version"
alfresco-googledrive-repo-enterprise:
updatecli_scm_id: acsComRepo
updatecli_xml_target: "/project/properties/alfresco.googledrive.version"
6 changes: 6 additions & 0 deletions .github/updatecli_values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
artifacts:
alfresco-content-services-distribution:
updatecli_matrix_target: acs
alfresco-content-services-community-distribution:
updatecli_matrix_target: acs
9 changes: 6 additions & 3 deletions .github/workflows/bumpVersions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,22 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: alfresco/alfresco-updatecli
ref: ${{ inputs.alfresco-updatecli-ref || 'master' }}
ref: ${{ inputs.alfresco-updatecli-ref || '086e51db36050f0321572010f9e936c268027d96' }}
path: alfresco-updatecli

- name: Build manifest and run Updatecli pipelines
- name: Updatecli apply
shell: bash
run: |
set +x
for i in */artifacts-*.yaml; do
updatecli apply -c .github/updatecli.tpl -v ./${i} -v alfresco-updatecli/deployments/values/supported-matrix.yaml
updatecli apply -c .github/updatecli.tpl -v ${i} -v .github/updatecli_values.yaml -v alfresco-updatecli/deployments/values/supported-matrix.yaml
updatecli apply -c .github/updatecli_amps.tpl -v ${i} -v .github/updatecli_amps_values.yaml
done
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
UPDATECLI_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
UPDATECLI_GITHUB_USERNAME: ${{ vars.BOT_GITHUB_USERNAME}}

- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
Expand Down
1 change: 1 addition & 0 deletions repository/artifacts-23.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
updatecli_self: repository/artifacts-23.yaml
updatecli_matrix_version: current
updatecli_release_branch: release/23.3
artifacts:
postgresql:
name: postgresql
Expand Down
1 change: 1 addition & 0 deletions repository/artifacts-73.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
updatecli_self: repository/artifacts-73.yaml
updatecli_matrix_version: 7.3.N
updatecli_release_branch: release/7.3.2
artifacts:
postgresql:
name: postgresql
Expand Down
1 change: 1 addition & 0 deletions repository/artifacts-74.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
updatecli_self: repository/artifacts-74.yaml
updatecli_matrix_version: 7.4.N
updatecli_release_branch: release/7.4.2
artifacts:
postgresql:
name: postgresql
Expand Down

0 comments on commit 82644ee

Please sign in to comment.