Skip to content

Commit

Permalink
OPSEXP-2174 Refactor updatecli pipeline to dedicated repo (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn authored Jul 6, 2023
1 parent ae69a77 commit bd6959a
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 753 deletions.
46 changes: 30 additions & 16 deletions .github/workflows/bumpVersions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,52 @@ on:
push:
paths:
- .github/workflows/bumpVersions.yml
- updatecli.d/**
- updatecli-matrix-targets.yaml
branches:
- OPSEXP-**
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
updatecli:
runs-on: ubuntu-latest
env:
VALUES: ./updatecli.d/supported-matrix.yaml
UPDATECLI_MANIFEST_FILE: ./updatecli.d/uber-manifest.tpl
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}

- name: Install Updatecli
uses: updatecli/updatecli-action@v2
with:
version: v0.51.0
version: v0.54.0

- name: Checkout updatecli configs
uses: actions/checkout@v3
with:
repository: alfresco/alfresco-updatecli
ref: master
path: alfresco-updatecli

- name: Run Updatecli in diff mode
if: github.event_name == 'push'
- name: Preprocess values file appending existing keys only
shell: bash
run: |
yq '. *? load("alfresco-updatecli/deployments/values/supported-matrix.yaml") |
explode(.)' updatecli-matrix-targets.yaml |
tee ./merged.yaml
- name: updatecli apply
# path to values file must be relative https://github.com/updatecli/updatecli/issues/1253
run: updatecli apply -c alfresco-updatecli/deployments/uber-manifest.tpl -v ./merged.yaml
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 }}
run: |
export GIT_BRANCH="$GITHUB_REF_NAME"
updatecli diff -c "$UPDATECLI_MANIFEST_FILE" -v "$VALUES"

- name: Git Auto Commit
uses: stefanzweifel/[email protected]
with:
commit_message: |
🛠 Updatecli pipeline acs bump
branch: ${{ github.event_name == 'workflow_dispatch' && 'updatecli-bump-acs' || '' }}
create_branch: ${{ github.event_name == 'workflow_dispatch' }}
push_options: ${{ github.event_name == 'workflow_dispatch' && '--force' || '' }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ target
*.war
*.ear


# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Helm packages
*.tgz

# updatecli workflow
alfresco-updatecli
merged.yaml
Loading

0 comments on commit bd6959a

Please sign in to comment.