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

Install sonic yangs during pipeline build #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sachinholla
Copy link
Contributor

Why I did it

Translib now consumes select sonic yangs from sonic-yang-models.whl during compile time as well as runtime. Hence pipeline builds needs to install the appropriate sonic_yang_models.whl for all translib functionalities to be available for testing.

Also, the pipeline is always downloading sonic-mgmt-common code and other artifacts from master branch. This may not work if we run the pipeline build on other branches. Pipeline should use artifacts of build branch only.

How I did it

  • Download & install sonic_yang_models.whl before build
  • Download source code and artifacts for the build branch only
  • Download from pipeline 142, which runs on all branches

How to verify it

PR build

* Download & install sonic_yang_models.whl before build
* Download source code and artifacts for the build branch only
* Download from pipeline 142, which runs on all branches
patterns: |
target/debs/buster/libyang*.deb
target/python-wheels/bullseye/sonic_yang_models*.whl
Copy link
Contributor

@kwangsuk kwangsuk Mar 4, 2024

Choose a reason for hiding this comment

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

Can you learn a Debian distribution on the fly instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have any references? I could not find another such instance.

Not sure how to determine it generically. Did not find any settings in debian/control or any other setting files under sonic-mgmt-framework repo. As per my understanding the target debian version is chosen buy the docker build rules file, by adding the docker image file name to different makefile variables -- like here and here. These docker makefiles are not used during pipeline builds. In fact we do not download sonic-buildimage code as well. Even if we donwload we cannot invoke these makefiles directly. Also, the code pattern is not generic enough to grep & determine the debian version.

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.

2 participants