diff --git a/.github/updatecli.tpl b/.github/updatecli.tpl index 673a3ec5..25e25712 100644 --- a/.github/updatecli.tpl +++ b/.github/updatecli.tpl @@ -29,6 +29,6 @@ targets: sourceid: src_{{ $key }} spec: file: "{{ $.updatecli_self }}" - key: "artifacts.{{ $key }}.version" + key: "$.artifacts.{{ $key }}.version" {{- end }} {{- end }} diff --git a/.github/updatecli_amps.tpl b/.github/updatecli_amps.tpl new file mode 100644 index 00000000..96da8b88 --- /dev/null +++ b/.github/updatecli_amps.tpl @@ -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 }} diff --git a/.github/updatecli_amps_values.yaml b/.github/updatecli_amps_values.yaml new file mode 100644 index 00000000..cc8706e0 --- /dev/null +++ b/.github/updatecli_amps_values.yaml @@ -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" diff --git a/.github/updatecli_values.yaml b/.github/updatecli_values.yaml new file mode 100644 index 00000000..f0479f0b --- /dev/null +++ b/.github/updatecli_values.yaml @@ -0,0 +1,6 @@ +--- +artifacts: + alfresco-content-services-distribution: + updatecli_matrix_target: acs + alfresco-content-services-community-distribution: + updatecli_matrix_target: acs diff --git a/.github/workflows/bumpVersions.yml b/.github/workflows/bumpVersions.yml index 8ede3735..aa0170bb 100644 --- a/.github/workflows/bumpVersions.yml +++ b/.github/workflows/bumpVersions.yml @@ -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 diff --git a/repository/artifacts-23.yaml b/repository/artifacts-23.yaml index 00ca4dbb..b868d4d4 100644 --- a/repository/artifacts-23.yaml +++ b/repository/artifacts-23.yaml @@ -1,6 +1,7 @@ --- updatecli_self: repository/artifacts-23.yaml updatecli_matrix_version: current +updatecli_release_branch: release/23.3 artifacts: postgresql: name: postgresql diff --git a/repository/artifacts-73.yaml b/repository/artifacts-73.yaml index edfa01fc..64e1729b 100644 --- a/repository/artifacts-73.yaml +++ b/repository/artifacts-73.yaml @@ -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 diff --git a/repository/artifacts-74.yaml b/repository/artifacts-74.yaml index c069a3f8..c607e9c7 100644 --- a/repository/artifacts-74.yaml +++ b/repository/artifacts-74.yaml @@ -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