From e27479e17065c2b377513e91c1c8ef8d7e3a4149 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Wed, 1 Mar 2023 10:43:04 +0200 Subject: [PATCH 1/3] Add GIT_COMMIT_SHORT to packaging image manifest Signed-off-by: Evan Lezar --- build/container/Dockerfile.packaging | 1 + versions.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/build/container/Dockerfile.packaging b/build/container/Dockerfile.packaging index f8975ded..1613c5b8 100644 --- a/build/container/Dockerfile.packaging +++ b/build/container/Dockerfile.packaging @@ -29,6 +29,7 @@ ARG PACKAGE_DIST ARG PACKAGE_VERSION ARG GIT_BRANCH ARG GIT_COMMIT +ARG GIT_COMMIT_SHORT ARG SOURCE_DATE_EPOCH ARG VERSION diff --git a/versions.mk b/versions.mk index 146fcad1..9b1164d3 100644 --- a/versions.mk +++ b/versions.mk @@ -34,5 +34,6 @@ CUDA_VERSION := 12.0.1 GOLANG_VERSION := 1.18.8 GIT_COMMIT ?= $(shell git describe --match="" --dirty --long --always --abbrev=40 2> /dev/null || echo "") +GIT_COMMIT_SHORT ?= $(shell git git rev-parse --short HEAD 2> /dev/null || echo "") GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2> /dev/null || echo "${GIT_COMMIT}") SOURCE_DATE_EPOCH ?= $(shell git log -1 --format=%ct 2> /dev/null || echo "") From a7bf9ddf28c102a4a8210788b4b7b8ebddf01729 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Wed, 1 Mar 2023 10:43:32 +0200 Subject: [PATCH 2/3] Update kitmaker folder structure Signed-off-by: Evan Lezar --- scripts/release-kitmaker-artifactory.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/release-kitmaker-artifactory.sh b/scripts/release-kitmaker-artifactory.sh index 6807f28a..7429e9f1 100755 --- a/scripts/release-kitmaker-artifactory.sh +++ b/scripts/release-kitmaker-artifactory.sh @@ -77,7 +77,7 @@ function extract_info() { IMAGE_EPOCH=$(extract_info "IMAGE_EPOCH") # Note we use the main branch for the kitmaker archive. GIT_BRANCH=main -GIT_COMMIT=$(extract_info "GIT_COMMIT") +GIT_COMMIT_SHORT=$(extract_info "GIT_COMMIT_SHORT") VERSION=$(extract_info "PACKAGE_VERSION") @@ -155,7 +155,7 @@ function upload_archive() { fi local sha1_checksum=$(sha1sum -b "${archive}" | awk '{ print $1 }') - local upload_url="${KITMAKER_ARTIFACTORY_REPO}/${component}-${GIT_BRANCH}/default/$(basename ${archive})" + local upload_url="${KITMAKER_ARTIFACTORY_REPO}/${GIT_BRANCH}/${component}/${os}-${arch}/${version}/$(basename ${archive})" local props=() # Required KITMAKER properties: @@ -164,8 +164,7 @@ function upload_archive() { props+=("os=${os}") props+=("arch=${arch}") props+=("platform=${os}-${arch}") - # TODO: extract the GIT commit from the packaging image - props+=("changelist=${GIT_COMMIT}") + props+=("changelist=${GIT_COMMIT_SHORT}") props+=("branch=${GIT_BRANCH}") # Package properties: props+=("package.epoch=${IMAGE_EPOCH}") From ac5b6d097bece65d10d414d29f874a3371130c26 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Wed, 1 Mar 2023 10:44:27 +0200 Subject: [PATCH 3/3] Use kitmaker folder for releases Signed-off-by: Evan Lezar --- .nvidia-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.nvidia-ci.yml b/.nvidia-ci.yml index 72f0fa8e..366814b5 100644 --- a/.nvidia-ci.yml +++ b/.nvidia-ci.yml @@ -36,8 +36,7 @@ variables: STAGING_REGISTRY: registry.gitlab.com/nvidia/container-toolkit/container-toolkit/staging STAGING_VERSION: ${CI_COMMIT_SHORT_SHA} ARTIFACTORY_REPO_BASE: "https://urm.nvidia.com/artifactory/sw-gpu-cloudnative" - # TODO: We should set the kitmaker release folder here once we have the end-to-end workflow set up - KITMAKER_RELEASE_FOLDER: "testing" + KITMAKER_RELEASE_FOLDER: "kitmaker" .image-pull: stage: image-build