Skip to content

Rake tasks

Several administrative rake tasks exist which can be executed from app working directory of a running container.

Deployed mode

All described commands should be executed from /home/dependabot/app directory and are only available for deployed version of application.

Register single project

Manually register project for updates. Repository must have valid dependabot config file.

sh
bundle exec rake 'dependabot:register_project[project_name]'

project_name - project full path or multiple space separated project full paths, example: dependabot-gitlab/dependabot

Register multiple projects

Manually register multiple projects. Repository must have valid dependabot config files.

sh
bundle exec rake 'dependabot:register[projects]'

projects - list of projects full paths separated by space, example: group/project_1 group/project_2

Register with specific access token

Manually register project for updates with specific gitlab access token

sh
bundle exec rake 'dependabot:register_project[project_name,access_token]'
  • project_name - project full path, example: dependabot-gitlab/dependabot
  • access_token - project access token, example: project access token

Bulk register

Manually trigger project registration job

sh
bundle exec rake 'dependabot:automatic_registration'

Remove

Manually remove project.

sh
bundle exec rake 'dependabot:remove[project]'

project - project full path, example: dependabot-gitlab/dependabot

Update vulnerability database

Trigger update of local vulnerability database which is used for security updates

sh
bundle exec rake 'dependabot:update_vulnerability_db'

Create user

Create a user to access projects page. Role can be admin or viewer. If role is not specified, user will be created with admin role.

sh
bundle exec rake 'dependabot:create_user[username,password,role]'

Delete user

Remove existing user

sh
bundle exec rake 'dependabot:delete_user[username]'

Standalone mode

Following tasks can be executed for stateless standalone mode of the application. These commands will also work in deployed mode.

Update

Trigger dependency update for specific project and package ecosystem. This task must be executed in appropriate ecosystem docker image for updates to work correctly.

sh
bundle exec rake 'dependabot:update[project,package_ecosystem,directory]'
  • project - project full path, example: dependabot-gitlab/dependabot
  • package_ecosystem - package-ecosystem parameter like bundler
  • directory - directory is path where dependency files are stored, usually /

This task is used to provide standalone use capability and used internally by updater containers in deployed mode and should not be used directly in most cases.

Validate configuration

Validate dependabot.yml configuration file for a project

sh
bundle exec rake 'dependabot:validate[project]'

project - project full path, example: dependabot-gitlab/dependabot

Update single dependency

Trigger update for single dependency in a project. This task can be useful to update/recreate merge requests for specific dependency.

sh
bundle exec rake 'dependabot:update_single_dependency[dependency_name,project_name,package_ecosystem,directory,force_recreate]'
  • dependency_name - dependency name, example: rails
  • project_name - project full path, example: dependabot-gitlab/dependabot
  • package_ecosystem - package-ecosystem parameter, example: bundler
  • directory - directory is path for particular ecosystem, example: /. Optional, if not set or set to empty value, update will loop through all directories configured for particular project and ecosystem.
  • force_recreate - force recreate merge request, example: true. Optional, default is false. If set to true, merge request will be recreated even if dependency is already up to date or merge request contains any manual changes.