Skip to content

Commit a5d1b94

Browse files
RANCHER-2601. Unify snapshot and release update workflows (#16)
* RANCHER-2601: Refactor `release-update-scheduler.yml` for streamlined configuration handling - Simplified workflow by removing unused `build-matrix` step and `update_branches_map` handling. - Adjusted outputs to utilize `get-config.outputs.branch_config` directly. * RANCHER-2601. Rename and update release workflows Renamed "Release update scheduler" to "Application Update Scheduler" across repositories. Updated workflow configuration to accommodate new input fields and parameters for enhanced functionality, including app name and additional branch settings. * RANCHER-2601. Remove snapshot update workflows from apps. This commit removes the `snapshot-update.yml` workflow files from various app repositories. These workflows were responsible for scheduling and manually triggering snapshot version updates, but are no longer required. * RANCHER-2601. Enable snapshot branch configuration across multiple apps Updated `update-config.yml` files to enable the `snapshot` branch with additional settings, including `pre_release` as "only" and `descriptor_build_offset` set to "100100000000000". These changes apply to all affected applications to standardize the branch setup. * RANCHER-2601, Bump up descriptor_build_offset in update-config files All descriptor_build_offset values have been incremented from "100100000000000" to "100200000000000" across multiple app update-config files.
1 parent ed8db92 commit a5d1b94

File tree

3 files changed

+21
-68
lines changed

3 files changed

+21
-68
lines changed

.github/update-config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ update_config:
99

1010
branches:
1111
- snapshot:
12-
enabled: false
12+
enabled: true
1313
need_pr: false
1414
pre_release: "only"
15+
descriptor_build_offset: "100200000000000"
1516
# - R2-2024:
1617
# enable: false
1718
# need_pr: true

.github/workflows/snapshot-update.yml

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

.github/workflows/release-update-scheduler.yml renamed to .github/workflows/update-scheduler.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
name: Release update scheduler
1+
name: Application Update Scheduler
22

3-
run-name: Release update scheduler ${{ github.event_name == 'workflow_dispatch' && '[manual]' || '' }}
3+
run-name: Application update scheduler ${{ github.event_name == 'workflow_dispatch' && '[manual]' || '' }}
44

55
on:
66
schedule:
77
- cron: "*/20 * * * *"
8-
8+
99
workflow_dispatch:
1010
inputs:
1111
dry_run:
12-
description: 'Perform dry run without creating PRs'
12+
description: 'Perform dry run without creating PRs or committing changes'
1313
required: false
1414
type: boolean
1515
default: false
1616

1717
concurrency:
18-
group: release-scan-${{ github.repository }}
18+
group: update-scan-${{ github.repository }}
1919
cancel-in-progress: false
2020

2121
permissions:
@@ -28,43 +28,39 @@ jobs:
2828
name: Get Configuration
2929
runs-on: ubuntu-latest
3030
outputs:
31-
branches: ${{ steps.get-config.outputs.release_branches }}
31+
branches: ${{ steps.get-config.outputs.branches }}
3232
branch_count: ${{ steps.get-config.outputs.branch_count }}
3333
pr_reviewers: ${{ steps.get-config.outputs.pr_reviewers }}
3434
pr_labels: ${{ steps.get-config.outputs.pr_labels }}
35-
matrix_includes: ${{ steps.build-matrix.outputs.includes }}
36-
steps:
37-
- name: Get Release Configuration
35+
branch_config: ${{ steps.get-config.outputs.branch_config }}
36+
steps:
37+
- name: Get Update Configuration
3838
id: get-config
3939
uses: folio-org/kitfox-github/.github/actions/get-update-config@master
4040
with:
4141
repo: ${{ github.repository }}
4242
github_token: ${{ github.token }}
43-
44-
- name: Build Matrix Includes
45-
id: build-matrix
46-
env:
47-
UPDATE_MAP: ${{ steps.get-config.outputs.update_branches_map }}
48-
run: |
49-
INCLUDES=$(echo "$UPDATE_MAP" | jq -c '[to_entries[] | {branch: .key, update_branch: (.value // "")}]')
50-
51-
echo "includes=$INCLUDES" >> "$GITHUB_OUTPUT"
52-
echo "::notice::Matrix includes: $INCLUDES"
5343

5444
update-branches:
5545
name: Update ${{ matrix.branch }}
5646
needs: get-config
5747
if: needs.get-config.outputs.branch_count > 0
5848
strategy:
5949
matrix:
60-
branch: ${{ fromJson(needs.get-config.outputs.branches) }}
61-
include: ${{ fromJson(needs.get-config.outputs.matrix_includes) }}
50+
include: ${{ fromJson(needs.get-config.outputs.branch_config) }}
6251
fail-fast: false
6352
max-parallel: 3
64-
uses: folio-org/kitfox-github/.github/workflows/release-update.yml@master
53+
uses: folio-org/kitfox-github/.github/workflows/application-update.yml@master
6554
with:
66-
release_branch: ${{ matrix.branch }}
55+
app_name: ${{ github.event.repository.name }}
56+
repo: ${{ github.repository }}
57+
branch: ${{ matrix.branch }}
6758
update_branch: ${{ matrix.update_branch }}
59+
need_pr: ${{ matrix.need_pr }}
60+
pre_release: ${{ matrix.pre_release }}
61+
workflow_run_number: ${{ github.run_number }}
62+
descriptor_build_offset: ${{ matrix.descriptor_build_offset }}
63+
rely_on_FAR: ${{ matrix.rely_on_FAR }}
6864
dry_run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run || false }}
6965
pr_reviewers: ${{ needs.get-config.outputs.pr_reviewers }}
7066
pr_labels: ${{ needs.get-config.outputs.pr_labels }}

0 commit comments

Comments
 (0)