Skip to content

fix(github): Support redis/argocd-extension-installer to Renovate #3106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,20 @@
"commands": ["./scripts/renovate-bump-version.sh {{depName}}"]
}
},
{
"matchPackagePatterns": ["argoprojlabs/argocd-extension-installer"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ref: #3072 (comment)

           "prTitle": "chore(deps): update quay.io/argoprojlabs/argocd-extension-installer docker tag to v0.0.8",
           "upgrades": [
             {
               "datasource": "docker",
               "depName": "quay.io/argoprojlabs/argocd-extension-installer",
               "displayPending": "",
               "fixedVersion": "v0.0.5",
               "currentVersion": "v0.0.5",
               "currentValue": "v0.0.5",
               "newValue": "v0.0.8",
               "newVersion": "v0.0.8",
               "packageFile": "charts/argo-cd/values.yaml",
               "updateType": "patch",
               "packageName": "quay.io/argoprojlabs/argocd-extension-installer"
             }
           ]

"commitMessagePrefix": "chore({{{parentDir}}}):",
"postUpgradeTasks": {
"commands": ["./scripts/renovate-bump-version.sh {{depName}}"]
}
},
{
"matchPackagePatterns": ["redis-ha"],
"enabled": false
},
{
"matchPackagePatterns": ["public.ecr.aws/bitnami/redis-exporter"],
"commitMessagePrefix": "chore({{{replace 'public.ecr.aws/' '' depName}}}):",
"commitMessagePrefix": "chore({{{parentDir}}}):",
"postUpgradeTasks": {
"commands": ["./scripts/renovate-bump-version.sh {{depName}}"]
}
Expand Down
9 changes: 8 additions & 1 deletion scripts/renovate-bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ chartName=$(echo "$depName" | sed -e "s+^argoproj/++" -e "s+^argoproj-labs/++")
echo "Changed chart name is: $chartName"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should refactor the whole script:

  • Add more input parameters
    • Chart name (e.g. via parentDir)
    • Dependency name
    • New version of the dependency
      (as a replacement of appVersion=$(grep '^appVersion:' "${parentDir}/Chart.yaml" | awk '{print $2}'))
  • Do not hardcode the line description: Bump ${chartName} to ${appVersion}"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your feedback. I will try to refactor. 📝

echo "----------------------------------------"

parentDir="charts/${chartName}"
case "${chartName}" in
*"redis"*|*"argocd-extension-installer")
parentDir="charts/argo-cd"
;;
*)
parentDir="charts/${chartName}"
;;
esac

# Bump the chart version by one patch version
version=$(grep '^version:' "${parentDir}/Chart.yaml" | awk '{print $2}')
Expand Down
Loading