Make populate release script independent of any other
This commit is contained in:
parent
6e8cdb6c39
commit
bd273c7564
1 changed files with 25 additions and 8 deletions
|
@ -6,7 +6,10 @@
|
|||
# - release_tag: tag/branch/commit in repo
|
||||
# - base_prefix: prefix to base directory for softweare installation; e.g. /opt/hlrs
|
||||
#
|
||||
# Environment variables: $TMPDIR must be set
|
||||
# Environment variables:
|
||||
# - $TMPDIR must be set
|
||||
# - $HLRS_REPO_LOCATION, if given, will override the location of various repositories.
|
||||
# If not given, it defaults to "https://code.hlr.de/hlrs-software-stack"
|
||||
#
|
||||
#
|
||||
# Release directory structure:
|
||||
|
@ -59,6 +62,20 @@ create_dir () {
|
|||
echo $rc
|
||||
}
|
||||
|
||||
checkout_repo_inplace () {
|
||||
local repo=$1
|
||||
local tag=$2
|
||||
local dir=$3
|
||||
local err
|
||||
|
||||
pushd $dir > /dev/null
|
||||
git clone --depth=1 --single-branch --branch=$tag -c feature.manyFiles=true $repo .
|
||||
err=$?
|
||||
popd > /dev/null
|
||||
|
||||
return $err
|
||||
}
|
||||
|
||||
|
||||
_VERBOSITY=1
|
||||
|
||||
|
@ -76,22 +93,22 @@ arg_tag=$(canonize_tag $1)
|
|||
arg_prefix=$2
|
||||
|
||||
# Define various repo locations
|
||||
_HLRS_SPACK_REPO=file://$HOME/spack-test/dummy_repo/spack.git
|
||||
_HLRS_SPACK_PLUMBING_REPO=file://$HOME/spack-test/dummy_repo/release_root.git
|
||||
_HLRS_SPACK_CONFIG_REPO=file://$HOME/spack-test/dummy_repo/hlrs-spack.git
|
||||
HLRS_REPO_LOCATION=${HLRS_REPO_LOCATION:-https://code.hlrs.de/hlrs-software-stack}
|
||||
_HLRS_SPACK_REPO=${HLRS_REPO_LOCATION}/spack
|
||||
_HLRS_SPACK_PLUMBING_REPO=${HLRS_REPO_LOCATION}/release_root
|
||||
_HLRS_SPACK_CONFIG_REPO=${HLRS_REPO_LOCATION}/hlrs-spack
|
||||
|
||||
|
||||
# bootstrap staging area
|
||||
log "setup staging area at:"
|
||||
tmp_dir=$(mktemp -d)
|
||||
staging_dir=$tmp_dir/staging
|
||||
staging_dir=$tmp_dir/staging
|
||||
mkdir -p $staging_dir
|
||||
log " $staging_dir"
|
||||
|
||||
# bootstrap plumbing directory
|
||||
log "bootstrap plumbing directory ..."
|
||||
curl -L $_HLRS_SPACK_PLUMBING_REPO/hlrs-plumbing/scripts/xx_checkout_repo.sh | \
|
||||
bash -s -- $_HLRS_SPACK_PLUMBING_REPO \
|
||||
$arg_tag $staging_dir .
|
||||
checkout_repo_inplace $_HLRS_SPACK_PLUMBING_REPO $arg_tag $staging_dir
|
||||
plumbing_dir=$staging_dir/hlrs-plumbing
|
||||
log "... done"
|
||||
|
||||
|
|
Loading…
Reference in a new issue