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 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/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}") 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 "")