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

feat: Add support for build arguments to build command #449

Merged
merged 4 commits into from
Feb 20, 2024

Conversation

antoinegelloz
Copy link
Contributor

@antoinegelloz antoinegelloz commented Jan 16, 2024

It is now possible to pass build-time variables with the --build-arg option for the dib build command:

dib build \
    --build-arg FOO1="bar1" \
    --build-arg FOO2=$BAR2 \
    --build-arg FOO3=${BAR3}

Alternatively, build arguments can also be set in the .dib.yaml config file:

build_arg:
  - FOO1="bar1"
  - FOO2=$BAR
  - FOO3=${BAR}

@antoinegelloz antoinegelloz force-pushed the add-build-args-to-all-builds branch from d2cbb05 to f4b9b29 Compare January 22, 2024 14:21
@antoinegelloz antoinegelloz force-pushed the add-build-args-to-all-builds branch 3 times, most recently from 48ce52d to 46731ca Compare February 12, 2024 14:00
@codecov-commenter
Copy link

codecov-commenter commented Feb 12, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (e9fb779) 65.55% compared to head (2dfa834) 66.43%.
Report is 3 commits behind head on main.

❗ Current head 2dfa834 differs from pull request most recent head 5852832. Consider uploading reports for the commit 5852832 to get more accurate results

Files Patch % Lines
pkg/dib/generate_dag.go 72.22% 2 Missing and 3 partials ⚠️
pkg/dib/build.go 71.42% 0 Missing and 2 partials ⚠️
pkg/docker/builder.go 83.33% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #449      +/-   ##
==========================================
+ Coverage   65.55%   66.43%   +0.87%     
==========================================
  Files          33       33              
  Lines        1864     1889      +25     
==========================================
+ Hits         1222     1255      +33     
+ Misses        542      529      -13     
- Partials      100      105       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@antoinegelloz antoinegelloz force-pushed the add-build-args-to-all-builds branch from 0330df0 to b424ac8 Compare February 12, 2024 17:24
@antoinegelloz antoinegelloz changed the title Add build args to all builds feat: Add support for build arguments to build command Feb 12, 2024
@antoinegelloz antoinegelloz marked this pull request as ready for review February 12, 2024 17:32
@antoinegelloz antoinegelloz requested review from julienvey, graillus and a team as code owners February 12, 2024 17:32
@antoinegelloz antoinegelloz force-pushed the add-build-args-to-all-builds branch 2 times, most recently from 0d2f8ad to 701d390 Compare February 13, 2024 08:55
@antoinegelloz antoinegelloz marked this pull request as draft February 13, 2024 16:54
@antoinegelloz antoinegelloz force-pushed the add-build-args-to-all-builds branch 2 times, most recently from 7e611d0 to 601ed52 Compare February 15, 2024 10:24
@antoinegelloz antoinegelloz changed the base branch from main to refactor/generate-dag-tests February 15, 2024 13:36
@antoinegelloz antoinegelloz force-pushed the add-build-args-to-all-builds branch 2 times, most recently from d7f7771 to 835376b Compare February 15, 2024 13:43
@antoinegelloz antoinegelloz force-pushed the add-build-args-to-all-builds branch from 835376b to 20224f4 Compare February 15, 2024 13:51
@antoinegelloz antoinegelloz linked an issue Feb 15, 2024 that may be closed by this pull request
@antoinegelloz antoinegelloz marked this pull request as ready for review February 15, 2024 13:54
@antoinegelloz antoinegelloz requested review from Thibaut-gauvin and gminh474 and removed request for julienvey and graillus February 15, 2024 14:02
Base automatically changed from refactor/generate-dag-tests to main February 19, 2024 08:55
@antoinegelloz antoinegelloz merged commit 0120e10 into main Feb 20, 2024
4 checks passed
@antoinegelloz antoinegelloz deleted the add-build-args-to-all-builds branch February 20, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make available --build-arg option
3 participants