|
| 1 | +# Patching a release |
| 2 | + |
| 3 | +``` |
| 4 | +source ./scripts/utils.sh |
| 5 | +
|
| 6 | +export REFERENCE=main |
| 7 | +``` |
| 8 | + |
| 9 | +``` |
| 10 | +SHA=$(git rev-parse --short=8 ${REFERENCE}) |
| 11 | +IMAGE_NAME="ghcr.io/nvidia/container-toolkit" |
| 12 | +IMAGE_TAG=${SHA}-packaging |
| 13 | +VERSION=$(get_version_from_image ${IMAGE_NAME}:${IMAGE_TAG} ${SHA}) |
| 14 | +PACKAGE_CACHE=release-${VERSION}-patch-$(git rev-parse --short=8 HEAD) |
| 15 | +``` |
| 16 | + |
| 17 | +``` |
| 18 | +./hack/pull-packages.sh \ |
| 19 | + ${IMAGE_NAME}:${IMAGE_TAG} \ |
| 20 | + ${PACKAGE_CACHE} |
| 21 | +``` |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | +1. Build the required components: |
| 27 | + |
| 28 | +``` |
| 29 | +export DIST_DIR=$(pwd)/${PACKAGE_CACHE}/packages |
| 30 | +./scripts/build-packages.sh ${TARGETS} |
| 31 | +``` |
| 32 | + |
| 33 | +Where `${TARGETS}` is any combination of: |
| 34 | +- `ubuntu18.04-arm64` |
| 35 | +- `ubuntu18.04-amd64` |
| 36 | +- `ubuntu18.04-ppc64le` |
| 37 | +- `centos7-aarch64` |
| 38 | +- `centos7-x86_64` |
| 39 | +- `centos8-ppc64le` |
| 40 | + |
| 41 | +The `ppc64le` targets are generally not covered by QA, and something like: |
| 42 | +``` |
| 43 | +./scripts/build-packages.sh ubuntu18.04-amd64 ubuntu18.04-arm64 centos7-x86_64 centos7-aarch64 |
| 44 | +``` |
| 45 | + |
| 46 | +Should be sufficient. |
| 47 | + |
| 48 | +1. Patch the container-toolkit images: |
| 49 | + 1. The packaging image: |
| 50 | +``` |
| 51 | +BUILD_MULTI_ARCH_IMAGES=true \ |
| 52 | + ARTIFACTS_ROOT=${PACKAGE_CACHE}/packages \ |
| 53 | + VERSION=$(git rev-parse --short=8 HEAD) \ |
| 54 | + make -f deployments/container/Makefile build-packaging |
| 55 | +``` |
| 56 | + |
| 57 | +The other images: |
| 58 | +``` |
| 59 | +BUILD_MULTI_ARCH_IMAGES=true \ |
| 60 | + ARTIFACTS_ROOT=${PACKAGE_CACHE}/packages \ |
| 61 | + VERSION=$(git rev-parse --short=8 HEAD) \ |
| 62 | + make -f deployments/container/Makefile build-ubuntu20.04 |
| 63 | +``` |
| 64 | + |
| 65 | +``` |
| 66 | +BUILD_MULTI_ARCH_IMAGES=true \ |
| 67 | + ARTIFACTS_ROOT=${PACKAGE_CACHE}/packages \ |
| 68 | + VERSION=$(git rev-parse --short=8 HEAD) \ |
| 69 | + make -f deployments/container/Makefile build-ubi8 |
| 70 | +``` |
| 71 | + |
| 72 | +Note that even though the other packages were not updated we still regenearate |
| 73 | +both images so as to ensure consistent image versioning. |
| 74 | + |
| 75 | + |
| 76 | +1. Push the updated packages to the kitmaker repository: |
| 77 | + |
| 78 | +``` |
| 79 | +export ARTIFACTS_DIR=$(pwd)/release-${VERSION}-patch-$(git rev-parse --short=8 HEAD)-artifacts |
| 80 | +``` |
| 81 | + |
| 82 | +``` |
| 83 | +./scripts/extract-packages.sh nvidia/container-toolkit:$(git rev-parse --short=8 HEAD)-packaging |
| 84 | +``` |
| 85 | + |
| 86 | + |
| 87 | +``` |
| 88 | +./scripts/release-kitmaker-artifactory.sh \ |
| 89 | + "https://urm.nvidia.com/artifactory/sw-gpu-cloudnative-generic-local/kitmaker" |
| 90 | +``` |
| 91 | + |
| 92 | +``` |
| 93 | +regctl login nvcr.io -u \$oauthtoken |
| 94 | +``` |
| 95 | + |
| 96 | +``` |
| 97 | +BUILD_MULTI_ARCH_IMAGES=true \ |
| 98 | + ARTIFACTS_ROOT=${PACKAGE_CACHE}/packages \ |
| 99 | + VERSION=$(git rev-parse --short=8 HEAD) \ |
| 100 | + OUT_IMAGE_NAME=nvcr.io/ea-cnt/nv_only/container-toolkit \ |
| 101 | + make -f deployments/container/Makefile push-ubuntu20.04 |
| 102 | +``` |
| 103 | + |
0 commit comments