Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C CI Images
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Sysadmin
  • CI Images
  • Merge requests
  • !32

Build (but don't push) modified docker images in merge requests

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Nicolás Alvarez requested to merge work/merge-request-testing into master May 14, 2022
  • Overview 1
  • Commits 1
  • Changes 1

Tag and push docker images when building them only if $DOCKER_PUSH is set. Set this variable on manual CI jobs on the master branch, preserving existing behavior.

Add a new CI job rule that runs only on merge requests and only for Dockerfiles that were modified. It doesn't have DOCKER_PUSH set, so it will only build the image, and won't tag or push the image.

This way we can know if merge requests break the build for the docker image they are modifying before we merge the change.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: work/merge-request-testing