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

chore: add build-args for git-commit etc #14114

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

blakepettersson
Copy link
Member

Add the ability to specify GIT_TAG, GIT_COMMIT, BUILD_DATE and GIT_TREE_STATE as optional build-args. As well as resolving #13683 (which was caused by #12620), this has the bonus of making the docker build slightly more deterministic (since we now have the ability to specify the same inputs into the docker build which was hitherto computed on every docker build).

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

Please see Contribution FAQs if you have questions about your pull-request.

Add the ability to specify `GIT_TAG`, `GIT_COMMIT`, `BUILD_DATE` and
`GIT_TREE_STATE` as optional build-args. As well as resolving argoproj#13683
(which was caused by argoproj#12620), this has the bonus of making the
`docker build` slightly more deterministic (since we now have the
ability to specify the same inputs into the docker build which was
hitherto computed on every `docker build`).

Signed-off-by: Blake Pettersson <[email protected]>
@blakepettersson blakepettersson changed the title build: add build-args for git-commit etc chore: add build-args for git-commit etc Jun 18, 2023
@codecov
Copy link

codecov bot commented Jun 18, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.05 🎉

Comparison is base (c32d5dd) 49.56% compared to head (199979c) 49.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14114      +/-   ##
==========================================
+ Coverage   49.56%   49.62%   +0.05%     
==========================================
  Files         256      256              
  Lines       43920    43925       +5     
==========================================
+ Hits        21770    21796      +26     
+ Misses      19987    19973      -14     
+ Partials     2163     2156       -7     

see 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@34fathombelow 34fathombelow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussing the changes over with Blake via Zoom. I'm in favor of reverting #12620 & #12640.

Although this PR would fix the issue with our images, end users building their own custom images would still be affected. https://argo-cd.readthedocs.io/en/stable/operator-manual/custom_tools/#byoi-build-your-own-image

Copy link
Member

@jsoref jsoref left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this PR

.github/workflows/image-reuse.yaml Outdated Show resolved Hide resolved
Co-authored-by: Josh Soref <[email protected]>
Signed-off-by: Blake Pettersson <[email protected]>
@crenshaw-dev
Copy link
Member

@34fathombelow lgty?

Copy link
Member

@34fathombelow 34fathombelow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@crenshaw-dev Can we cherry-pick this to 2.7?

@crenshaw-dev
Copy link
Member

/cherry-pick release-2.7

@crenshaw-dev crenshaw-dev enabled auto-merge (squash) June 20, 2023 19:06
@crenshaw-dev crenshaw-dev merged commit cdef312 into argoproj:master Jun 20, 2023
@gcp-cherry-pick-bot
Copy link

Cherry-pick failed with Merge error cdef31276a7f3c5ee193baf50794e81bcafa1d22 into temp-cherry-pick-9cd0f3-release-2.7

@blakepettersson
Copy link
Member Author

Thanks guys!

@blakepettersson blakepettersson deleted the build/set-build-args branch June 21, 2023 11:38
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
* build: add build-args for git-commit etc

Add the ability to specify `GIT_TAG`, `GIT_COMMIT`, `BUILD_DATE` and
`GIT_TREE_STATE` as optional build-args. As well as resolving argoproj#13683
(which was caused by argoproj#12620), this has the bonus of making the
`docker build` slightly more deterministic (since we now have the
ability to specify the same inputs into the docker build which was
hitherto computed on every `docker build`).

Signed-off-by: Blake Pettersson <[email protected]>

* Update .github/workflows/image-reuse.yaml

Co-authored-by: Josh Soref <[email protected]>
Signed-off-by: Blake Pettersson <[email protected]>

---------

Signed-off-by: Blake Pettersson <[email protected]>
Co-authored-by: Josh Soref <[email protected]>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
* build: add build-args for git-commit etc

Add the ability to specify `GIT_TAG`, `GIT_COMMIT`, `BUILD_DATE` and
`GIT_TREE_STATE` as optional build-args. As well as resolving argoproj#13683
(which was caused by argoproj#12620), this has the bonus of making the
`docker build` slightly more deterministic (since we now have the
ability to specify the same inputs into the docker build which was
hitherto computed on every `docker build`).

Signed-off-by: Blake Pettersson <[email protected]>

* Update .github/workflows/image-reuse.yaml

Co-authored-by: Josh Soref <[email protected]>
Signed-off-by: Blake Pettersson <[email protected]>

---------

Signed-off-by: Blake Pettersson <[email protected]>
Co-authored-by: Josh Soref <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

4 participants