Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lionel Metrailler
ci-template-cc
Commits
881365bf
Commit
881365bf
authored
Oct 24, 2020
by
Lionel Metrailler
Browse files
New make-functions
parents
c174c178
dfe22a04
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
+24
-16
make-functions.sh
make-functions.sh
+24
-16
No files found.
make-functions.sh
View file @
881365bf
...
...
@@ -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
"
\0
33[32mYES mounting ssh keys
\0
33[0m: will rely on ssh when possible"
else
echo
-e
"
\0
33[31mNOT mounting ssh keys
\0
33[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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment