[no-relnote] Add basic release workflow

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2024-06-17 15:33:11 +02:00
parent e4cdc48854
commit 6358c13dab
7 changed files with 305 additions and 31 deletions

View File

@@ -1,58 +0,0 @@
#!/bin/bash
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
function assert_usage() {
echo "Incorrect arguments: $*"
echo "$(basename ${BASH_SOURCE[0]}) IMAGE DIST_DIR"
exit 1
}
set -e -x
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../scripts && pwd )"
PROJECT_ROOT="$( cd ${SCRIPTS_DIR}/.. && pwd )"
if [[ $# -ne 2 ]]; then
assert_usage $*
fi
IMAGE=$1
DIST_DIR=$2
if [[ -z ${IMAGE} ]]; then
echo "ERROR: IMAGE must be non-empty"
exit 1
fi
if [[ -z ${DIST_DIR} ]]; then
echo "ERROR: DIST_DIR must be non-empty"
exit 1
fi
if [[ -e ${DIST_DIR} ]]; then
echo "ERROR: The specified DIST_DIR ${DIST_DIR} exists."
exit 1
fi
echo "Copying package files from ${IMAGE} to ${DIST_DIR}"
mkdir -p ${DIST_DIR}
docker run --rm \
-v $(pwd):$(pwd) \
-w $(pwd) \
-u $(id -u):$(id -g) \
--entrypoint="bash" \
${IMAGE} \
-c "cp --preserve=timestamps -R /artifacts/* ${DIST_DIR}"

View File

@@ -58,7 +58,7 @@ fi
PACKAGE_CACHE=release-${VERSION}-${REPO}
echo "Fetching packages with SHA '${SHA}' as tag '${VERSION}' to ${PACKAGE_CACHE}"
${SCRIPTS_DIR}/pull-packages.sh \
${SCRIPTS_DIR}/../hack/pull-packages.sh \
${IMAGE_NAME}:${IMAGE_TAG} \
${PACKAGE_CACHE}