Commit 881365bf authored by Lionel Metrailler's avatar Lionel Metrailler
Browse files

New make-functions

parents c174c178 dfe22a04
......@@ -114,15 +114,20 @@ function run-one() {
docker run --entrypoint cat $IMAGE /etc/passwd > passwd
< passwd sed 's/1000/'$(id -u)'/' > passwd.new
if [ ${MOUNT_SSH_FLAG:=no} == "yes" ]; then
extra="-v /${HOME:?HOME variable is not set?}/.ssh:/home/oda/.ssh:ro"
echo -e "\033[32mYES mounting ssh keys\033[0m: will rely on ssh when possible"
else
echo -e "\033[31mNOT mounting ssh keys\033[0m: will rely on https, please be sure sources are synchronous"
fi
docker run \
--name $cname \
-e CI_JOB_TOKEN \
-e MINIO_UPLOAD_KEY \
-e NBARGS_PYDICT \
-v //c/Users/metra/.ssh:/home/oda/.ssh:ro \
$extra \
--entrypoint bash $IMAGE \
-c '''
set -x
mkdir -pv /tmp/outputs
export
export | grep CI_J
......@@ -142,18 +147,21 @@ function run-one() {
echo $MINIO_UPLOAD_KEY > /tmp/home-run/.minio
chmod 400 /tmp/home-run/.minio
##
if [ "'$MOUNT_SSH_FLAG'" == "yes" ]; then
if git clone git@gitlab.astro.unige.ch:integral/cc-workflows/cc-isgri-oda-nustar-reference.git /tmp/test-clone; then
echo "\033[32mSUCCESS\033[0mfully cloned private repo from gitlab";
echo -e "\033[32mSUCCESS\033[0mfully cloned private repo from gitlab";
else
echo "\033[31mFAILED033[0m to cloned private repo from gitlab";
echo -e "\033[31mFAILED033[0m to cloned private repo from gitlab";
echo "make sure that your home contains ssh keys"
exit 1
fi
else
echo "skipping ssh check: ssh will not be used"
fi
git clone /repo /tmp/home-run/repo
cd /tmp/home-run/repo
set -x
echo "${NBARGS_PYDICT:-{\}}" > nbargs.py
cat nbargs.py
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment