FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DevOps Division Guidebook
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Information Services
DevOps
General Documentation
DevOps Division Guidebook
Commits
2597be7f
Verified
Commit
2597be7f
authored
4 weeks ago
by
Sebastiaan ten Pas
Browse files
Options
Downloads
Patches
Plain Diff
feat(renovatebot): add page about running post-upgrade tasks
parent
2e101441
No related branches found
No related tags found
No related merge requests found
Pipeline
#721730
passed
3 weeks ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/howtos/renovatebot/post-upgrade-tasks.md
+49
-0
49 additions, 0 deletions
docs/howtos/renovatebot/post-upgrade-tasks.md
mkdocs.yml
+1
-0
1 addition, 0 deletions
mkdocs.yml
pyproject.toml
+3
-0
3 additions, 0 deletions
pyproject.toml
with
53 additions
and
0 deletions
docs/howtos/renovatebot/post-upgrade-tasks.md
0 → 100644
+
49
−
0
View file @
2597be7f
---
title
:
Post-upgrade tasks
---
# Running post-upgrade tasks
[
Post-upgrade tasks
](
https://docs.renovatebot.com/configuration-options/#postupgradetasks
)
that are
executed before a commit is made by Renovate.
Post-upgrade tasks are commands that are executed by Renovate after a dependency has been updated
but before the commit is created. The intention is to run any other command line tools that would
modify existing files or generate new files when a dependency changes.
Each command must match at least one of the patterns defined in allowedCommands (a global-only
configuration option) in order to be executed.
[
Our configuration
](
https://gitlab.developers.cam.ac.uk/uis/devops/infra/gitlab-bots-deployment/-/blob/main/renovatebot-config.js?ref_type=heads#L97
)
is set up such that it can call scripts in the
`./.renovate/`
directory in the root that start with
`post-upgrade*`
.
Examples usages:
{% raw %}
```
json
"postUpgradeTasks"
:
{
"commands"
:
[
"./.renovate/post-upgrade.py '{{{ toJSON upgrades }}}'"
],
"executionMode"
:
"branch"
,
"fileFilters"
:
[
"CHANGELOG.md"
]
}
```
{% endraw %}
Or:
{% raw %}
```
json
"postUpgradeTasks"
:
{
"commands"
:
[
".renovate/post-upgrade.sh
\"
{{{depName}}}
\"
\"
{{{currentVersion}}}
\"
\"
{{{newVersion}}}
\"
"
],
"fileFilters"
:
[
"CHANGELOG.md"
]
}
```
{% endraw %}
Note: make sure that the script is executable.
This diff is collapsed.
Click to expand it.
mkdocs.yml
+
1
−
0
View file @
2597be7f
...
...
@@ -206,6 +206,7 @@ nav:
-
howtos/renovatebot/trigger-renovatebot-from-gitlab-ui.md
-
howtos/renovatebot/trigger-renovatebot-from-cli.md
-
howtos/renovatebot/trigger-renovatebot-from-ci.md
-
howtos/renovatebot/post-upgrade-tasks.md
-
"
Tutorials"
:
-
tutorials/index.md
-
tutorials/automating-gitlab-releases.md
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
0 → 100644
+
3
−
0
View file @
2597be7f
[tool.poe.tasks.fix]
help
=
"Run pre-commit checks to fix formatting errors"
cmd
=
"pre-commit run --all-files"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment