-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhello-world.scif
46 lines (44 loc) · 1.39 KB
/
hello-world.scif
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%appenv hello-world-echo
THEBESTAPP=hello-world-echo
export THEBESTAPP
%applabels hello-world-echo
MAINTAINER dinosaur
WHOAMI dinosaur
%apprun hello-world-echo
echo "The best app is $THEBESTAPP"
%appinstall hello-world-script
echo "echo 'Hello World!'" >> $SCIF_APPBIN/hello-world.sh
chmod u+x $SCIF_APPBIN/hello-world.sh
%appenv hello-world-script
THEBESTAPP=$SCIF_APPNAME
export THEBESTAPP
%apprun hello-custom
echo Hello "$@"
%apprun hello-world-script
/bin/bash hello-world.sh
%appenv hello-world-env
OMG=TACOS
%applabels hello-world-env
MAINTAINER TACOSAURUS
%apphelp hello-world-env
This is the help section for hello-world-env! This app
does not have anything other than an environment installed.
It just defines the environment variable `OMG=TACOS`. Try issuing
a command to the scif entrypoint to echo this variable:
# Local installation
scif exec hello-world-env echo [e]OMG
# Docker image example
docker run vanessa/scif exec hello-world-env echo [e]OMG
[hello-world-env] executing /bin/echo $OMG
TACOS
%applabels hello-world-env
MAINTAINER TESTAPOD
%apptest hello-world-script
echo "Running tests!"
if [ $# -eq 0 ]
then
echo "No arguments supplied, tests pass!"
exit 0
fi
echo "Argument supplied, exiting with ${1}"
exit ${1}