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

[files/build/versions]: support reproduceable build for git #5774

Merged
merged 2 commits into from
Jan 21, 2021
Merged

[files/build/versions]: support reproduceable build for git #5774

merged 2 commits into from
Jan 21, 2021

Conversation

liushilongbuaa
Copy link
Contributor

@liushilongbuaa liushilongbuaa commented Nov 2, 2020

- Why I did it
Some component's make process need thirdparty source file which is downloaded by "git clone", not using a specific commit. When source file is changed, Build process may fail.
- How I did it

  1. Add a version file, files/build/versions/versions-git, to record thirdparty source code version(commit ID).
  2. Replace git binary by a bash script. In the script, when 'git clone' is done, 'git reset' will reset HEAD to the commit recorded in the version file.
  3. When update version file, you need to set parameter 'SONIC_VERSION_CONTROL_COMPONENTS ' and build. At last replace 'files/build/versions/versions-git' by 'files/build/versions/versions-git-latest'
    - How to verify it
    'files/build/versions/versions-git.log' records some infomation.
    - Which release branch to backport (provide reason below if selected)
  • 201811
  • 201911
  • 202006

- Description for the changelog

Control thirdparty source code version used by 'git clone'

- A picture of a cute animal (not mandatory but encouraged)

Makefile.work Outdated Show resolved Hide resolved
files/build/scripts/git Outdated Show resolved Hide resolved
Makefile.work Outdated Show resolved Hide resolved
Makefile.work Outdated Show resolved Hide resolved
xumia
xumia previously approved these changes Jan 19, 2021
Copy link
Collaborator

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

LGTM. Please also check with other reviewers.

@xumia xumia merged commit d75c290 into sonic-net:master Jan 21, 2021
@liushilongbuaa liushilongbuaa deleted the version-control-git branch January 21, 2021 06:16
lguohan added a commit that referenced this pull request Jan 22, 2021
liushilongbuaa added a commit to liushilongbuaa/sonic-buildimage that referenced this pull request Jun 18, 2021
…t#5774)

* support reproduceable build for git clone

Signed-off-by: shilongliu <[email protected]>

* fix

Co-authored-by: shilongliu <[email protected]>
liushilongbuaa pushed a commit to liushilongbuaa/sonic-buildimage that referenced this pull request Jun 18, 2021
qiluo-msft added a commit to qiluo-msft/sonic-buildimage that referenced this pull request Jun 21, 2021
qiluo-msft added a commit to qiluo-msft/sonic-buildimage that referenced this pull request Jun 21, 2021
qiluo-msft added a commit that referenced this pull request Jun 21, 2021
* Revert "fix"

This reverts commit 93585b0.

* Revert "Version control git (#6562)"

This reverts commit 52b8775.

* Revert "Revert "[files/build/versions]: support reproduceable build for git (#5774)""

This reverts commit 1cb8daf.

* Revert "[files/build/versions]: support reproduceable build for git (#5774)"

This reverts commit 547aa9b.
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.

4 participants