Skip to content
PREFLIGHT 0.9.0
Menu

The renovate component#

This page covers the renovate component: what the job does, how to include it, and every input it takes. Goal: one scheduled job keeps image digests, GitHub action SHAs and package versions current across the group's repositories, and merges the updates whose pipeline is green. The component flies on autopilot; majors keep a human in the seat.

What the job does#

The component runs Renovate as a scheduled or manual job that bumps image digests, GitHub action SHAs and package versions across the group's repositories, and merges the green ones itself. Bumps of component: include pins are covered by the preset and wait for review. Majors open a merge request and wait for a person. See Renovate for what auto-merges and what waits.

Under the hood, the job:

  • Runs only in scheduled pipelines ($CI_PIPELINE_SOURCE == "schedule") and manual pipelines started from the web ($CI_PIPELINE_SOURCE == "web").
  • Points Renovate at the instance: RENOVATE_PLATFORM is gitlab and RENOVATE_ENDPOINT is $CI_API_V4_URL.
  • Turns on autodiscovery (RENOVATE_AUTODISCOVER: "true"), limited to the autodiscover_filter glob, default $CI_PROJECT_NAMESPACE/*, relative to the runner project's namespace.
  • Writes its config.js at job time. The registryAliases entry for the GitLab instance comes from the predefined CI_SERVER_FQDN variable: GitLab expands the key before the shell runs, and Node resolves the value when Renovate loads config.js. No hostname is stored in the template, so the public mirror stays clean.
  • Adds the Squire kit commands to the config.js allowedCommands list when squire_kit_tasks is true, so the preset's Squire rule can refresh a kit in its merge request (see Squire kits). The list is empty otherwise.
  • Passes git_author through as RENOVATE_GIT_AUTHOR and dry_run through as RENOVATE_DRY_RUN.
  • Is interruptible and times out after 1 hour.

Include the component#

Add the include to the runner project's .gitlab-ci.yml, pinned to a full commit SHA with the tag in a trailing comment, and set git_author:

include:
  - component: $CI_SERVER_FQDN/enterprise-apps/preflight/renovate@fb73b538f3980292119b5b306ff64383d760a214 # 0.9.0
    inputs:
      git_author: "Preflight Bot <preflight-bot@example.com>"

Inputs#

Input Type Default What it does
job_name string renovate Name of the job. Set it when you include this component more than once.
image string renovate/renovate:44.251.0@sha256:64adaabe8ee3e34820c2b044b5f87e281aa278bf53e5d76df2ce800f9cc9407a Docker image for the job.
image_prefix string ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX} Registry path in front of image: the job pulls image_prefix/image. The default is the group's GitLab Dependency Proxy, so Docker Hub is asked once and GitLab serves the cached copy. Outside a group with the proxy, set docker.io. No trailing slash.
autodiscover_filter string $CI_PROJECT_NAMESPACE/* Glob limiting which projects Renovate discovers, relative to the runner project's namespace.
dry_run string "null" Dry run mode: null (disabled), lookup or full.
git_author string none Author of the commits and merge requests Renovate creates, in the form Name <email>. Required.
squire_kit_tasks boolean false Allow the Squire kit commands of Preflight's preset (install the new waynestate/squire from Packagist, then squire update on the kit folder), so a Squire kit merge request arrives with its files refreshed. Off, the merge request bumps the version only and shows an artifact error.

Verify#

Start the job manually from the web, or wait for the schedule. Expected: the job bumps the versions it finds and merges the ones whose pipeline is green. To try it without changes, set dry_run to lookup or full; null (disabled) is the default.