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

[build] add an environment variable to run make reset unattended #12207

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

mathieulaunay
Copy link
Contributor

@mathieulaunay mathieulaunay commented Sep 28, 2022

  • previously "make reset" was expecting user input from the terminal to do its job
  • setting UNATTENDED to any non-zero string will allow "make reset" to run without interactive confirmation

Why I did it

When doing automated builds of SONiC images, we need to reset the working repositories between each build.

How I did it

Adding an environment variable that is read by Makefile.work

How to verify it

running
UNATTENDED=1 make reset
should make an automatic reset of all working directories

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

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

Description for the changelog

add an environment variable to run "make reset" unattended

Ensure to add label/tag for the feature raised. example - PR#2174 where, Generic Config and Update feature has been labelled as GCU.

N/A

Link to config_db schema for YANG module changes

N/A

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 28, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: mathieulaunay (b34bee9d6f3c533e21a7c35cdb74510107ad03dc)

@Yuval-Mellanox
Copy link

@stepanblyschak could you please provide feedback?

  - previously "make reset" was expecting user input from the terminal
    to do its job
  - setting UNATTENDED to any non-zero string will allow "make reset" to
    run without interactive confirmation
@Yuval-Mellanox
Copy link

@qiluo-msft Hi - can you merge please?

@liat-grozovik
Copy link
Collaborator

liat-grozovik commented Jan 25, 2023

@xumia could u please help to review?

@mathieulaunay
Copy link
Contributor Author

hi, could you please review & merge this?

@Yuval-Mellanox
Copy link

@xumia your assistance please.

@xumia
Copy link
Collaborator

xumia commented Feb 14, 2023

@xumia your assistance please.

LGTM, need to make sure if any automation script using it to reset the env, if yes, need to add the UNATTENDED option before merge.
@liushilongbuaa , could you pls help check if azure pipelines using the make reset to cleanup? Thanks.

@liushilongbuaa
Copy link
Contributor

@xumia your assistance please.

LGTM, need to make sure if any automation script using it to reset the env, if yes, need to add the UNATTENDED option before merge. @liushilongbuaa , could you pls help check if azure pipelines using the make reset to cleanup? Thanks.

azure pipeline didn't use make reset and cleanup.

@liat-grozovik liat-grozovik changed the title build: add an env var to run make reset unattended [build] add an environment variable to run make reset unattended Feb 15, 2023
@liat-grozovik liat-grozovik merged commit 8a4d1b5 into sonic-net:master Feb 15, 2023
@liat-grozovik
Copy link
Collaborator

@mathieulaunay please check if this can be cleanly cherry picked to the desired branches but if not, please have a PR against each branch needed.

@mathieulaunay
Copy link
Contributor Author

@liat-grozovik since it cannot be cherry-picked without conflicts, please find:

@mssonicbld
Copy link
Collaborator

@mathieulaunay PR conflicts with 202211 branch

@mssonicbld
Copy link
Collaborator

@mathieulaunay PR conflicts with 202205 branch

liat-grozovik pushed a commit that referenced this pull request Feb 21, 2023
previously "make reset" was expecting user input from the terminal to do its job
setting UNATTENDED to any non-zero string will allow "make reset" to run without interactive confirmation

- Why I did it
This is the backport to 202211 from master (see PR #12207)
When doing automated builds of SONiC images, we need to reset the working repositories between each build.

- How I did it
Adding an environment variable that is read by Makefile.work

- How to verify it
running
UNATTENDED=1 make reset 
should make an automatic reset of all working directories
@liat-grozovik
Copy link
Collaborator

There are separated PRs per branch (see above references).
202211 is now merged.
202205 waiting for checkers to pass.

StormLiangMS pushed a commit to StormLiangMS/sonic-buildimage that referenced this pull request Mar 28, 2023
Related work items: sonic-net#276, sonic-net#305, sonic-net#332, sonic-net#338, sonic-net#339, sonic-net#1188, sonic-net#1192, sonic-net#1197, sonic-net#1206, sonic-net#1685, sonic-net#1690, sonic-net#1696, sonic-net#1699, sonic-net#1709, sonic-net#1727, sonic-net#1737, sonic-net#1741, sonic-net#1742, sonic-net#2511, sonic-net#2512, sonic-net#2532, sonic-net#2559, sonic-net#2626, sonic-net#2638, sonic-net#2645, sonic-net#2649, sonic-net#2660, sonic-net#2669, sonic-net#2670, sonic-net#2678, sonic-net#10084, sonic-net#11442, sonic-net#11873, sonic-net#12047, sonic-net#12110, sonic-net#12207, sonic-net#12529, sonic-net#12678, sonic-net#13235, sonic-net#13287, sonic-net#13372, sonic-net#13395, sonic-net#13456, sonic-net#13497, sonic-net#13522, sonic-net#13545, sonic-net#13547, sonic-net#13552, sonic-net#13569, sonic-net#13572, sonic-net#13578, sonic-net#13591, sonic-net#13611, sonic-net#13647, sonic-net#13649, sonic-net#13660, sonic-net#13710, sonic-net#13716, sonic-net#13724, sonic-net#13726, sonic-net#13732, sonic-net#13735, sonic-net#13739, sonic-net#13757, sonic-net#13786, sonic-net#13792, sonic-net#13800, sonic-net#13801, sonic-net#13802, sonic-net#13805, sonic-net#13806, sonic-net#13812, sonic-net#13814, sonic-net#13822, sonic-net#13831, sonic-net#13834, sonic-net#13847, sonic-net#13870, sonic-net#13882, sonic-net#13884, sonic-net#13885, sonic-net#13894, sonic-net#13895, sonic-net#13926, sonic-net#13932, sonic-net#13935, sonic-net#13942, sonic-net#13951, sonic-net#13953, sonic-net#13964
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.

9 participants