Skip to content

Commit

Permalink
Merge branch 'skip-for-point-release' into 'main'
Browse files Browse the repository at this point in the history
Skip components for patch releases

See merge request nvidia/container-toolkit/container-toolkit!374
  • Loading branch information
Evan Lezar committed Apr 24, 2023
2 parents 926ac77 + c0fe8f2 commit 28b7066
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
9 changes: 7 additions & 2 deletions scripts/build-all-components.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ make -C "${NVIDIA_CONTAINER_TOOLKIT_ROOT}" \
LIBNVIDIA_CONTAINER_TAG="${LIBNVIDIA_CONTAINER_TAG}" \
"${TARGET}"

if [[ -z ${NVIDIA_CONTAINER_TOOLKIT_TAG} ]]; then
# If required we also build the nvidia-container-runtime and nvidia-docker packages.
# Since these are essentially meta packages intended to allow for users to
# transition from older installation workflows, we skip these for rc builds
# (NVIDIA_CONTAINER_TOOLKIT_TAG != "") and releases with a non-zero patch
# version of 0.
if [[ -z ${NVIDIA_CONTAINER_TOOLKIT_TAG} && "${NVIDIA_CONTAINER_TOOLKIT_VERSION%.0}" != "${NVIDIA_CONTAINER_TOOLKIT_VERSION}" ]]; then
# We set the TOOLKIT_VERSION, TOOLKIT_TAG for the nvidia-container-runtime and nvidia-docker targets
# The LIB_TAG is also overridden to match the TOOLKIT_TAG.
# Build nvidia-container-runtime
Expand All @@ -82,5 +87,5 @@ if [[ -z ${NVIDIA_CONTAINER_TOOLKIT_TAG} ]]; then
${TARGET}

else
echo "Skipping nvidia-container-runtime and nvidia-docker builds for release candidate"
echo "Skipping nvidia-container-runtime and nvidia-docker builds."
fi
14 changes: 9 additions & 5 deletions scripts/extract-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,21 @@ function skip-for-release-candidate() {
return 0
fi

# We allow all other packages for non-rc versions.
if [[ "${VERSION/rc./}" == "${VERSION}" ]]; then
return 1
local is_non_patch_full_release=1
# We allow all other packages for non-rc and non-patch release versions.
if [[ "${VERSION/rc./}" != "${VERSION}" ]]; then
is_non_patch_full_release=0
fi
if [[ "${VERSION%.0}" == "${VERSION}" ]]; then
is_non_patch_full_release=0
fi

local package_name=$1
if [[ "${package_name/"nvidia-docker2"/}" != "${package_name}" ]]; then
return 0
return ${is_non_patch_full_release}
fi
if [[ "${package_name/"nvidia-container-runtime"/}" != "${package_name}" ]]; then
return 0
return ${is_non_patch_full_release}
fi
return 1
}
Expand Down

0 comments on commit 28b7066

Please sign in to comment.