Skip to content

Commit

Permalink
OPSEXP-2109: update updatecli (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxgomz authored May 19, 2023
1 parent e22d8d6 commit c9abf46
Show file tree
Hide file tree
Showing 9 changed files with 598 additions and 182 deletions.
55 changes: 10 additions & 45 deletions .github/workflows/bumpVersions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,22 @@
name: Bump component versions

on:
workflow_dispatch:
inputs:
jira_id:
description: ticket reference for the requested update (OPSEXP-1234)
required: true
push:
paths:
- '.github/workflows/bumpVersions.yml'
- 'updatecli.d/**'
- .github/workflows/bumpVersions.yml
- updatecli.d/**
branches:
- 'OPSEXP-**'
- OPSEXP-**

permissions:
contents: "write"
pull-requests: "write"
contents: write
pull-requests: write

jobs:
updatecli:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
version:
- community
- 7.0.N
- 7.1.N
- 7.2.N
- 7.3.N
- latest
env:
MATRIX_VALUES_OUTPUT: /tmp/${{ matrix.version }}-values.yaml
VALUES: ./updatecli.d/supported-matrix.yaml
UPDATECLI_MANIFEST_FILE: ./updatecli.d/uber-manifest.tpl
steps:
- name: Checkout
Expand All @@ -41,13 +26,7 @@ jobs:
- name: Install Updatecli
uses: updatecli/updatecli-action@v2
with:
version: v0.43.0

- name: Prepare values file for ${{ matrix.version }}
working-directory: ./updatecli.d/
run: |
yq -e e 'explode(.) | .matrix["${{ matrix.version }}"]' supported-matrix.yaml \
| tee > "$MATRIX_VALUES_OUTPUT"
version: v0.49.2

- name: Run Updatecli in diff mode
if: github.event_name == 'push'
Expand All @@ -57,20 +36,6 @@ jobs:
UPDATECLI_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GIT_AUTHOR_EMAIL: ${{ vars.BOT_GITHUB_EMAIL }}
GIT_AUTHOR_USERNAME: ${{ vars.BOT_GITHUB_USERNAME }}
run: >-
JIRA_ID="DRAFT" GIT_BRANCH="$GITHUB_REF_NAME"
updatecli diff -c "$UPDATECLI_MANIFEST_FILE" -v "$MATRIX_VALUES_OUTPUT"
- name: Run Updatecli in apply mode
if: github.event_name == 'workflow_dispatch'
env:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
UPDATECLI_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GIT_AUTHOR_EMAIL: ${{ vars.BOT_GITHUB_EMAIL }}
GIT_AUTHOR_USERNAME: ${{ vars.BOT_GITHUB_USERNAME }}
GIT_BRANCH: master
JIRA_ID: ${{ inputs.jira_id }}
run: >-
JIRA_ID=${JIRA_ID:-DRAFT}
updatecli apply -c "$UPDATECLI_MANIFEST_FILE" -v "$MATRIX_VALUES_OUTPUT"
run: |
export GIT_BRANCH="$GITHUB_REF_NAME"
updatecli diff -c "$UPDATECLI_MANIFEST_FILE" -v "$VALUES"
16 changes: 7 additions & 9 deletions .github/workflows/helm-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ name: Helm (Enterprise)
on:
pull_request:
branches:
- 'master'
- master
paths:
- 'helm/**'
- 'test/postman/helm/**'
- '.github/workflows/helm*'
- helm/**
- test/postman/helm/**
- .github/workflows/helm*
push:
branches:
- 'master'
- pr-*
- master
concurrency:
group: ${{ github.head_ref || github.ref_name || github.run_id }}
cancel-in-progress: false
Expand All @@ -21,8 +20,7 @@ jobs:
if: >-
github.event_name == 'push'
|| (
! github.event.pull_request.head.repo.fork
&& github.event.pull_request.head.user.login == 'Alfresco'
github.event.pull_request.head.user.login == 'Alfresco'
&& github.actor != 'dependabot[bot]'
)
outputs:
Expand Down Expand Up @@ -81,7 +79,7 @@ jobs:
echo "app_version=$V" >> $GITHUB_OUTPUT
echo "app_prefix=${SANITIZED_V}" >> $GITHUB_OUTPUT
- uses: >-
Alfresco/alfresco-build-tools/.github/actions/dbp-charts/verify-helm@v1.36.0
Alfresco/alfresco-build-tools/.github/actions/dbp-charts/verify-helm@v1.38.0
with:
skip_checkout: 'true'
test_newman: 'true'
Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,25 @@ Please use [this guide](CONTRIBUTING.md) to make a contribution to the project a
Open a PR that will:

* Update the [versioning table](#versioning)
* If any updates to the updatecli pipelines is required then make the changes and raise the PR.
* Once the PR merge then run the manually [updatecli-workflow](https://github.com/Alfresco/acs-deployment/actions/workflows/bumpVersions.yml)
* That will create the bump version PR automatically.
* If any updates to the updatecli pipelines is required then make the changes
and raise the PR.
* Once the PR merge switch the `updatecli.d/supported-matrix.yaml` `latest`
section to "release mode" by changing all `development_pattern` by `ga_hotfixes_pattern`
* Run locally the updatecli pipeline and commit the resulting files (except the
`updatecli.d/supported-matrix.yaml`) to a new branch.

```bash
export QUAY_USERNAME="<VALUE>"
export QUAY_PASSWORD="<VALUE>"
export UPDATECLI_GITHUB_TOKEN="<VALUE>"
export GIT_AUTHOR_EMAIL='[email protected]'
export GIT_AUTHOR_USERNAME='alfresco-build'
export GIT_BRANCH="$(git branch --show-current)"
updatecli apply --commit=true --push=false -c updatecli.d/uber-manifest.tpl -v updatecli.d/supported-matrix.yaml
```

* Restore formatting of files edited by updatecli (See [updatecli
issue](https://github.com/updatecli/updatecli/issues/1028)
* In [alfresco-content-services](helm/alfresco-content-services/Chart.yaml),
bump chart version to the next stable release (usually by removing the
`-SNAPSHOT` suffix and adding `-Mx` suffix if it's a prerelease)
Expand Down Expand Up @@ -165,4 +181,3 @@ Once the tagged workflow is successful, the release process has completed.
`java -jar plantuml.jar filename`
2. The other way to generate the diagrams is via official plantuml website. Go to the below url and paste your puml code and click on submit.
`http://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000`

5 changes: 5 additions & 0 deletions helm/alfresco-content-services/7.0.N_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ alfresco-sync-service:
primary:
image:
tag: 13.1.0
ooiService:
image:
tag: 2.0.0
msTeams:
enabled: false
global:
tracking:
auth: none
6 changes: 6 additions & 0 deletions helm/alfresco-content-services/7.1.N_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ alfresco-sync-service:
primary:
image:
tag: 13.3.0
msTeamsService:
image:
tag: 1.1.0
ooiService:
image:
tag: 2.0.0
global:
tracking:
auth: none
12 changes: 6 additions & 6 deletions helm/alfresco-content-services/7.2.N_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
repository:
image:
tag: 7.2.1.10
ooiService:
image:
tag: 1.1.3
msTeamsService:
image:
tag: 1.1.0
transformrouter:
image:
tag: 2.0.0
Expand Down Expand Up @@ -72,3 +66,9 @@ alfresco-sync-service:
primary:
image:
tag: 13.3.0
ooiService:
image:
tag: 1.1.3
msTeamsService:
image:
tag: 1.1.0
16 changes: 6 additions & 10 deletions helm/alfresco-content-services/7.3.N_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
repository:
image:
tag: 7.3.1
ooiService:
image:
tag: 1.1.3
msTeams:
enabled: false
msTeamsService:
image:
tag: 1.1.0
transformrouter:
image:
tag: 2.0.0
Expand Down Expand Up @@ -68,8 +60,6 @@ alfresco-digital-workspace:
alfresco-admin-app:
image:
tag: 7.8.1
ooi:
enabled: false
postgresql:
image:
tag: 14.4.0
Expand All @@ -79,3 +69,9 @@ postgresql-syncservice:
alfresco-sync-service:
image:
tag: 3.8.0
ooiService:
image:
tag: 1.1.3
msTeamsService:
image:
tag: 1.1.0
Loading

0 comments on commit c9abf46

Please sign in to comment.