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
dfe22a04
Unverified
Commit
dfe22a04
authored
Oct 23, 2020
by
ODA CI Bot
Browse files
by default no ssh
parent
eeb038ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
make-functions.sh
make-functions.sh
+10
-10
No files found.
make-functions.sh
View file @
dfe22a04
...
...
@@ -109,13 +109,12 @@ function run() {
# TODO: this logic should be within oda eval
function
run-one
()
{
set
-x
cname
=
cc-ci-run-
$SOURCE_NAME
-
${
RANDOM
}
docker run
--entrypoint
cat
$IMAGE
/etc/passwd
>
passwd
< passwd
sed
's/1000/'
$(
id
-u
)
'/'
>
passwd.new
if
[
${
MOUNT_SSH_FLAG
:
-
no
}
==
"yes"
]
;
then
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
...
...
@@ -129,7 +128,6 @@ function run-one() {
$extra
\
--entrypoint
bash
$IMAGE
\
-c
'''
set -x
mkdir -pv /tmp/outputs
export
export | grep CI_J
...
...
@@ -149,18 +147,20 @@ function run-one() {
echo $MINIO_UPLOAD_KEY > /tmp/home-run/.minio
chmod 400 /tmp/home-run/.minio
##
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";
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 -e "\033[32mSUCCESS\033[0mfully cloned private repo from gitlab";
else
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 "\033[31mFAILED033[0m to cloned private repo from gitlab";
echo "make sure that your home contains ssh keys"
exit 1
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