Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SPSP
Transfer Tool
Commits
0ef7e348
Commit
0ef7e348
authored
Jan 12, 2021
by
Dillenn Terumalai
Browse files
Merge branch 'dev' into 'master'
Version 1.7.0 See merge request
!9
parents
828ea393
acaba857
Pipeline
#1700
passed with stage
in 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
0ef7e348
# SPSP Transfer Tool CI/CD
stages
:
-
test
-
deploy
...
...
@@ -25,6 +24,8 @@ centos test:
-
logs/spsp*.log
expire_in
:
1 week
when
:
on_failure
only
:
-
merge_requests
debian test
:
image
:
debian:10
...
...
@@ -33,7 +34,6 @@ debian test:
-
apt-get install -y netcat
-
apt-get install -y gpg
-
apt-get install -y openssh-client
-
apt-get install -y gpg
-
mkdir -p ~/.ssh
-
echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_ed25519
-
chmod 600 ~/.ssh/id_ed25519
...
...
@@ -43,14 +43,39 @@ debian test:
script
:
-
./spsp init --without-env
-
./spsp test --without-env
inherit
:
default
:
false
artifacts
:
paths
:
-
logs/error.log
-
logs/spsp*.log
expire_in
:
1 week
when
:
on_failure
only
:
-
merge_requests
ubuntu test
:
image
:
ubuntu:20.04
before_script
:
-
apt-get update
-
apt-get install -y netcat
-
apt-get install -y gnupg2
-
apt-get install -y openssh-client
-
mkdir -p ~/.ssh
-
echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_ed25519
-
chmod 600 ~/.ssh/id_ed25519
-
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
stage
:
test
script
:
-
./spsp init --without-env
-
./spsp test --without-env
artifacts
:
paths
:
-
logs/error.log
-
logs/spsp*.log
expire_in
:
1 week
when
:
on_failure
only
:
-
merge_requests
release
:
stage
:
deploy
...
...
spsp
View file @
0ef7e348
...
...
@@ -2,7 +2,7 @@
# SPSP transfer-tool is developed and maintained by SIB. For more information, please contact spsp-support@sib.swiss
VERSION
=
"1.
6
.0"
# bumped to support spsp --help, spsp --version
VERSION
=
"1.
7
.0"
# bumped to support spsp --help, spsp --version
# Define colors that are used in the help screen
...
...
@@ -234,7 +234,7 @@ autoMode() {
if
[
-d
"
$DIRECTORY
"
]
&&
[
"
$DIRECTORY
"
!=
$OUTBOX
]
&&
[
"
$DIRECTORY
"
!=
$SENT
]
&&
[
"
$DIRECTORY
"
!=
$LOGS
]
;
then
if
ls
"
$DIRECTORY
"
/
*
.fast
q
*
1> /dev/null 2>&1
&&
ls
"
$DIRECTORY
"
/
*
.xlsx 1> /dev/null 2>&1
;
then
if
ls
"
$DIRECTORY
"
/
*
.fast
*
1> /dev/null 2>&1
&&
ls
"
$DIRECTORY
"
/
*
.xlsx 1> /dev/null 2>&1
;
then
if
[[
"
$*
"
==
*
--fake
*
]]
||
[[
"
$*
"
==
*
-F
*
]]
;
then
compressFolder
"
$DIRECTORY
"
...
...
@@ -273,8 +273,8 @@ autoMode() {
else
((
ERRORS
=
ERRORS+1
))
((
STEP_ERRORS
=
STEP_ERRORS+1
))
echo
"[
$(
date
+
"%T"
)
] local.ERROR: Missing files (*.fastq/.fastq.gz and/or *.xlsx) inside
$DIRECTORY
of
$VIRUSES
DIRECTORY"
>>
"../
$LOGFILE
"
echo
"[
$(
date
+
"%F %T"
)
] local.ERROR: Missing files (*.fastq/.fastq.gz and/or *.xlsx) inside
$DIRECTORY
of
$VIRUSES
DIRECTORY"
>>
"../
$ERRORLOGFILE
"
echo
"[
$(
date
+
"%T"
)
] local.ERROR: Missing files (*.
fasta/.
fastq/.fastq.gz and/or *.xlsx) inside
$DIRECTORY
of
$VIRUSES
DIRECTORY"
>>
"../
$LOGFILE
"
echo
"[
$(
date
+
"%F %T"
)
] local.ERROR: Missing files (*.
fasta/.
fastq/.fastq.gz and/or *.xlsx) inside
$DIRECTORY
of
$VIRUSES
DIRECTORY"
>>
"../
$ERRORLOGFILE
"
fi
fi
...
...
@@ -288,7 +288,7 @@ autoMode() {
if
[
-d
"
$DIRECTORY
"
]
&&
[
"
$DIRECTORY
"
!=
$OUTBOX
]
&&
[
"
$DIRECTORY
"
!=
$SENT
]
&&
[
"
$DIRECTORY
"
!=
$LOGS
]
;
then
if
ls
"
$DIRECTORY
"
/
*
.fast
q
*
1> /dev/null 2>&1
&&
ls
"
$DIRECTORY
"
/
*
.xlsx 1> /dev/null 2>&1
;
then
if
ls
"
$DIRECTORY
"
/
*
.fast
*
1> /dev/null 2>&1
&&
ls
"
$DIRECTORY
"
/
*
.xlsx 1> /dev/null 2>&1
;
then
if
[[
"
$*
"
==
*
--fake
*
]]
||
[[
"
$*
"
==
*
-F
*
]]
;
then
compressFolder
"
$DIRECTORY
"
...
...
@@ -327,8 +327,8 @@ autoMode() {
else
((
ERRORS
=
ERRORS+1
))
((
STEP_ERRORS
=
STEP_ERRORS+1
))
echo
"[
$(
date
+
"%T"
)
] local.ERROR: Missing files (*.fastq/.fastq.gz and/or *.xlsx) inside
$DIRECTORY
of
$BACTERIA
DIRECTORY"
>>
"../
$LOGFILE
"
echo
"[
$(
date
+
"%F %T"
)
] local.ERROR: Missing files (*.fastq/.fastq.gz and/or *.xlsx) inside
$DIRECTORY
of
$BACTERIA
DIRECTORY"
>>
"../
$ERRORLOGFILE
"
echo
"[
$(
date
+
"%T"
)
] local.ERROR: Missing files (*.
fasta/.
fastq/.fastq.gz and/or *.xlsx) inside
$DIRECTORY
of
$BACTERIA
DIRECTORY"
>>
"../
$LOGFILE
"
echo
"[
$(
date
+
"%F %T"
)
] local.ERROR: Missing files (*.
fasta/.
fastq/.fastq.gz and/or *.xlsx) inside
$DIRECTORY
of
$BACTERIA
DIRECTORY"
>>
"../
$ERRORLOGFILE
"
fi
fi
done
...
...
@@ -494,9 +494,15 @@ generateFakeFiles() {
rm
-rf
./
$VIRUSES
/fake-viruses/
*
truncate
-s
5M ./
$VIRUSES
/fake-viruses/fake-viruses.xlsx
for
i
in
{
1..
10
}
;
do
for
i
in
{
1..
3
}
;
do
truncate
-s
1G ./
$VIRUSES
/fake-viruses/fake-virus
${
i
}
.fastq.gz
done
for
i
in
{
1..3
}
;
do
truncate
-s
1G ./
$VIRUSES
/fake-viruses/fake-virus
${
i
}
.fastq
done
for
i
in
{
1..3
}
;
do
truncate
-s
1G ./
$VIRUSES
/fake-viruses/fake-virus
${
i
}
.fasta
done
if
[
!
-d
"
$BACTERIA
/fake-bacteria"
]
;
then
mkdir
-p
$BACTERIA
/fake-bacteria
...
...
@@ -505,9 +511,15 @@ generateFakeFiles() {
rm
-rf
./
$BACTERIA
/fake-bacteria/
*
truncate
-s
5M ./
$BACTERIA
/fake-bacteria/bacteria.xlsx
for
i
in
{
1..
10
}
;
do
for
i
in
{
1..
3
}
;
do
truncate
-s
1G ./
$BACTERIA
/fake-bacteria/bacteria
${
i
}
.fastq.gz
done
for
i
in
{
1..3
}
;
do
truncate
-s
1G ./
$BACTERIA
/fake-bacteria/bacteria
${
i
}
.fastq
done
for
i
in
{
1..3
}
;
do
truncate
-s
1G ./
$BACTERIA
/fake-bacteria/bacteria
${
i
}
.fasta
done
autoMode
--fake
--no-archive
...
...
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