Skip to content

[Build]: Support reproducible build for release branches#9426

Merged
xumia merged 7 commits intosonic-net:masterfrom
xumia:enable-repd-build
Dec 23, 2021
Merged

[Build]: Support reproducible build for release branches#9426
xumia merged 7 commits intosonic-net:masterfrom
xumia:enable-repd-build

Conversation

@xumia
Copy link
Copy Markdown
Collaborator

@xumia xumia commented Dec 2, 2021

Why I did it

Support reproducible build for release branches

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

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

@xumia xumia added Build Request for 202111 Branch For PRs being requested for 202111 branch Request for 202106 Branch labels Dec 2, 2021
liushilongbuaa
liushilongbuaa previously approved these changes Dec 2, 2021
@xumia xumia marked this pull request as ready for review December 3, 2021 03:15
@xumia xumia requested a review from lguohan as a code owner December 3, 2021 03:15
@xumia xumia requested a review from qiluo-msft December 4, 2021 01:08
Copy link
Copy Markdown
Collaborator

@qiluo-msft qiluo-msft Dec 4, 2021

Choose a reason for hiding this comment

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

- '202[1-9]*'


The 5th and 6th digits are the month. Let's pattern match them and keep string length fixed. #Closed

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The regex is not supported in AZP yet, it only supports ? and *.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Copy Markdown
Collaborator

@qiluo-msft qiluo-msft Dec 4, 2021

Choose a reason for hiding this comment

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

What happen if the SourceBranchName is not a number? Should we explicitly handle this case? #Closed

Copy link
Copy Markdown
Collaborator Author

@xumia xumia Dec 9, 2021

Choose a reason for hiding this comment

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

@qiluo-msft , we use string comparing, will skip the reproducible build feature if not in the range.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

VERSION_CONTROL_OPTIONS is not defined in that case. Is it going to be a problem?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It is depended how to use the variable.

Micro: $(VERSION_CONTROL_OPTIONS)   --- not work
Template: ${{ variables.VERSION_CONTROL_OPTIONS }}  --- empty
Runtime: $[variables.VERSION_CONTROL_OPTIONS ]  --- empty

Currently, we are good, we use template way.

@xumia xumia force-pushed the enable-repd-build branch from 24b6b7b to 4578a0a Compare December 9, 2021 08:38
@xumia
Copy link
Copy Markdown
Collaborator Author

xumia commented Dec 9, 2021

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

- 202012
- 20????
exclude:
- 200*
Copy link
Copy Markdown
Collaborator

@qiluo-msft qiluo-msft Dec 9, 2021

Choose a reason for hiding this comment

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

200*

also keep excluding pattern fixed length like 200??? #Closed

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed, thanks.

- reopened
branches:
- '202012'
- '202[1-9]*'
Copy link
Copy Markdown
Collaborator

@qiluo-msft qiluo-msft Dec 9, 2021

Choose a reason for hiding this comment

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

202[1-9]*

limit the length of the branch name? #Closed

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed, thanks.

@xumia
Copy link
Copy Markdown
Collaborator Author

xumia commented Dec 21, 2021

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@xumia xumia merged commit faab7d5 into sonic-net:master Dec 23, 2021
@xumia xumia deleted the enable-repd-build branch December 23, 2021 08:16
judyjoseph pushed a commit that referenced this pull request Dec 27, 2021
[Build]: Support reproducible build for release branches #9426
@qiluo-msft
Copy link
Copy Markdown
Collaborator

@xumia Do you need this commit on 202012 branch?

xumia added a commit to xumia/sonic-buildimage-1 that referenced this pull request Apr 16, 2022
)

[Build]: Support reproducible build for release branches sonic-net#9426
xumia added a commit that referenced this pull request Apr 18, 2022
[Build]: Support reproducible build for release branches #9426
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants