mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-17 23:07:55 +00:00
packaging: Add push_to_registry()
This function will push a specific tag to a registry, whenever the PUSH_TO_REGISTRY environment variable is set, otherwise it's a no-op. This will be used in the future to avoid replicating that logic in every builder used by the kata-deploy scripts. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
@@ -47,8 +47,10 @@ docker build -q -t build-kata-deploy \
|
||||
docker run \
|
||||
-v $HOME/.docker:/root/.docker \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v "${kata_dir}:${kata_dir}" \
|
||||
--env CI="${CI:-}" \
|
||||
--env USER=${USER} -v "${kata_dir}:${kata_dir}" \
|
||||
--env USER=${USER} \
|
||||
--env PUSH_TO_REGISTRY="${PUSH_TO_REGISTRY:-"no"}" \
|
||||
--rm \
|
||||
-w ${script_dir} \
|
||||
build-kata-deploy "${kata_deploy_create}" $@
|
||||
|
Reference in New Issue
Block a user