Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for environment variables with default value in docker-compose files #11765

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

andrcuns
Copy link
Contributor

@andrcuns andrcuns commented Mar 8, 2025

What are you trying to accomplish?

It is fairly common to parametrize image in docker-compose file via variable with default value. Currently environment variable in compose file is ignored completely.

This change allows to update image when it is defined as default value within environment variable.

Anything you want to highlight for special attention from reviewers?

Most of the logic is around adjusting the regexes, so that is probably where most attention is required.

How will you know you've accomplished your goal?

  • Added unit tests for both file_parser and file_updater
  • I also ran this change in an e2e scenario with my app that uses dependabot-core

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@andrcuns andrcuns requested a review from a team as a code owner March 8, 2025 12:14
@github-actions github-actions bot added the L: docker:compose Docker Compose label Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: docker:compose Docker Compose
Projects
Status: Ready
Development

Successfully merging this pull request may close these issues.

1 participant