Renovate


Renovate

Automated updates of dependencies

Container image available

Not tightly integrated into GitLab

Options

Pipeline-integrated optionally with official template

Cron job running separate from GitLab instance

Self-hosted Renovate (formerly paid product)


Hands-On: Pipeline-integrated

  1. Create personal access token with scopes api, read_user, write_repository
  2. Add unprotected CI variable called RENOVATE_TOKEN
  3. Add renovate.json to root of project
  4. Add new job called renovate
  5. Create schedule with non-empty variable RENOVATE
  6. Check job logs
  7. Check merge requests
  8. Check pipelines
  9. Merge at least one change

(See new gitlab-ci.yml)

(With proper configuration Renovate can also automerge tested merge requests.)


Pro tip: Use renovate:slim image

Image is smaller and loads faster

Tools are installed on-demand

Docker is required

renovate:
  image: renovate/renovate:32.236.0-slim
  variables:
    DOCKER_HOST: tcp://127.0.0.1:2375
  services:
  - name: docker:20.10.18-dind
    command: [ "dockerd", "--host", "tcp://0.0.0.0:2375" ]
  script: |
    renovate --platform gitlab \
        --endpoint https://gitlab.seat${SEAT_INDEX}.inmylab.de/api/v4 \
        --token ${RENOVATE_TOKEN} \
        --autodiscover true
  #...

Request tools version using constraints

Or use tool specific directives like engine for npm