-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[sonic-app-ext] support app extensions installation during build #7593
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
Merged
renukamanavalan
merged 5 commits into
sonic-net:master
from
stepanblyschak:app-ext-build
Jun 29, 2021
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c1f7e32
[sonic-app-ext] support app extensions installation during build
7cc9102
Merge branch 'master' of github.com:azure/sonic-buildimage into app-e…
stepanblyschak abe88c0
bring back dhcp_relay
stepanblyschak 9807d93
introduce _INSTALL_PYTHON_WHEELS and _INSTALL_DEBS to not install son…
stepanblyschak 1e3ae92
Merge branch 'master' into app-ext-build
stepanblyschak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # rules to define remote packages that need to be installed | ||
| # during SONiC image build | ||
|
|
||
| ## Example: | ||
| ## PACKAGE = my-package | ||
| ## $(PACKAGE)_REPOSITORY = myrepo/mypackage | ||
| ## $(PACKAGE)_VERSION = 1.0.0 | ||
| ## SONIC_PACKAGES += $(PACKAGE) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -722,6 +722,8 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform | |
| $$(addprefix $(PYTHON_DEBS_PATH)/,$$($$*.gz_PYTHON_DEBS)) \ | ||
| $$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*.gz_PYTHON_WHEELS)) \ | ||
| $$(addsuffix -load,$$(addprefix $(TARGET_PATH)/,$$($$*.gz_LOAD_DOCKERS))) \ | ||
| $$(addsuffix -install,$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*.gz_INSTALL_PYTHON_WHEELS))) \ | ||
| $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*.gz_INSTALL_DEBS))) \ | ||
| $$($$*.gz_PATH)/Dockerfile.j2 \ | ||
| $(call dpkg_depend,$(TARGET_PATH)/%.gz.dep) | ||
| $(HEADER) | ||
|
|
@@ -748,6 +750,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform | |
| $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_whls=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_PYTHON_WHEELS)))\n" | awk '!a[$$0]++')) | ||
| $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_dbgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DBG_PACKAGES)))\n" | awk '!a[$$0]++')) | ||
| $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_pkgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_APT_PACKAGES)))\n" | awk '!a[$$0]++')) | ||
| if [ -d $($*.gz_PATH)/cli-plugin-tests/ ]; then pushd $($*.gz_PATH)/cli-plugin-tests; pytest-$($(SONIC_UTILITIES_PY3)_PYTHON_VERSION) -v $(LOG); popd; fi | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| # Label docker image with componenets versions | ||
| $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_labels=$(foreach component,$($*.gz_DEPENDS) $($*.gz_PYTHON_DEBS) $($*.gz_PYTHON_WHEELS),\ | ||
| $(shell [[ ! -z "$($(component)_VERSION)" && ! -z "$($(component)_NAME)" ]] && \ | ||
|
|
@@ -882,6 +885,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ | |
| $(SONIC_UTILITIES_DATA) \ | ||
| $(SONIC_HOST_SERVICES_DATA)) \ | ||
| $$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \ | ||
| $$(addprefix $(TARGET_PATH)/,$$(SONIC_PACKAGES_LOCAL)) \ | ||
| $$(addprefix $(FILES_PATH)/,$$($$*_FILES)) \ | ||
| $(if $(findstring y,$(ENABLE_ZTP)),$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$(SONIC_ZTP))) \ | ||
| $(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_UTILITIES_PY3)) \ | ||
|
|
@@ -933,9 +937,18 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ | |
| export lazy_build_installer_debs="$(foreach deb, $($*_LAZY_BUILD_INSTALLS), $(addprefix $($(deb)_MACHINE)|,$(deb)))" | ||
| export installer_images="$(foreach docker, $($*_DOCKERS),\ | ||
| $(addprefix $($(docker)_PACKAGE_NAME)|,\ | ||
| $(addprefix $($(docker)_PATH)|,\ | ||
| $(addprefix $($(docker)_MACHINE)|,\ | ||
| $(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker)_VERSION),$(docker)))))))" | ||
| $(addprefix $($(docker)_PATH)|,\ | ||
| $(addprefix $($(docker)_MACHINE)|,\ | ||
| $(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker)_VERSION),$(docker)))))))" | ||
| export sonic_packages="$(foreach package, $(SONIC_PACKAGES),\ | ||
| $(addsuffix |$($(package)_DEFAULT_FEATURE_STATE_ENABLED),\ | ||
| $(addsuffix |$($(package)_DEFAULT_FEATURE_OWNER),\ | ||
| $(addsuffix |$($(package)_VERSION),\ | ||
| $(addsuffix |$($(package)_REPOSITORY), $(package))))))" | ||
| export sonic_local_packages="$(foreach package, $(SONIC_PACKAGES_LOCAL),\ | ||
| $(addsuffix |$($(package)_DEFAULT_FEATURE_STATE_ENABLED),\ | ||
| $(addsuffix |$($(package)_DEFAULT_FEATURE_OWNER),\ | ||
| $(addsuffix |$(addprefix $(TARGET_PATH)/, $(package)), $(package)))))" | ||
| export sonic_py_common_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PY_COMMON_PY2))" | ||
| export sonic_py_common_py3_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PY_COMMON_PY3))" | ||
| export config_engine_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE_PY2))" | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.