Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
d94c98f1
Commit
d94c98f1
authored
8 years ago
by
Julien Leduc
Browse files
Options
Downloads
Patches
Plain Diff
enabling system tests in CI and crossing fingers ;)
parent
f246f350
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+19
-0
19 additions, 0 deletions
.gitlab-ci.yml
continuousintegration/orchestration/create_instance.sh
+12
-4
12 additions, 4 deletions
continuousintegration/orchestration/create_instance.sh
with
31 additions
and
4 deletions
.gitlab-ci.yml
+
19
−
0
View file @
d94c98f1
...
...
@@ -4,6 +4,7 @@ stages:
-
test:valgrind
-
build:dockerimage
-
rename:dockerimage
-
systemtests
before_script
:
-
export CTA_BUILD_ID=${CI_PIPELINE_ID}git${CI_BUILD_REF:0:8}
...
...
@@ -87,3 +88,21 @@ ctageneric_docker_rename:
-
export NEWTAG=${CTA_BUILD_ID}
-
cd continuousintegration/ci_helpers/
-
./rename_tag.sh
archiveretrieve
:
stage
:
systemtests
script
:
-
export NAMESPACE="archiveretrieve-${CTA_BUILD_ID}-$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)"
-
echo "Creating systemtest instance using sqlite and local objectstore"
-
cd continuousintegration/orchestration/; ./create_instance.sh -n ${NAMESPACE} -p ${CI_PIPELINE_ID} -D -O 2>&1 | tee -a ../../create_instance.log
-
cd tests; ./systest.sh 2>&1 | tee -a ../../../systest.sh.log
-
cd ../; ./delete_instance.sh -n ${NAMESPACE} 2>&1 | tee -a ../../delete_instance.log
artifacts
:
paths
:
-
create_instance.log
-
systest.sh.log
-
delete_instance.log
tags
:
-
kubernetes
-
mhvtl
This diff is collapsed.
Click to expand it.
continuousintegration/orchestration/create_instance.sh
+
12
−
4
View file @
d94c98f1
...
...
@@ -12,7 +12,7 @@ keepDatabase=1
keepObjectstore
=
1
usage
()
{
cat
<<
EOF
1>&2
Usage:
$0
-n <namespace> [-o <objectstore_configmap>] [-d <database_configmap>] [-D] [-O]
Usage:
$0
-n <namespace> [-o <objectstore_configmap>] [-d <database_configmap>]
[-p <gitlab pipeline ID>]
[-D] [-O]
Options:
-D wipe database content during initialization phase (database content is kept by default)
...
...
@@ -21,7 +21,7 @@ EOF
exit
1
}
while
getopts
"n:o:d:
t
:DO"
o
;
do
while
getopts
"n:o:d:
p
:DO"
o
;
do
case
"
${
o
}
"
in
o
)
config_objectstore
=
${
OPTARG
}
...
...
@@ -34,6 +34,9 @@ while getopts "n:o:d:t:DO" o; do
n
)
instance
=
${
OPTARG
}
;;
p
)
pipelineid
=
${
OPTARG
}
;;
O
)
keepObjectstore
=
0
;;
...
...
@@ -53,8 +56,13 @@ fi
COMMITID
=
$(
git log
-n1
|
grep
^commit |
cut
-d
\
-f2
|
sed
-e
's/\(........\).*/\1/'
)
echo
"Creating instance for latest image built for
${
COMMITID
}
(highest PIPELINEID)"
imagetag
=
$(
../ci_helpers/list_images.sh 2>/dev/null |
grep
${
COMMITID
}
|
sort
-n
|
tail
-n1
)
if
[
-z
"
${
pipelineid
}
"
]
;
then
echo
"Creating instance for latest image built for
${
COMMITID
}
(highest PIPELINEID)"
imagetag
=
$(
../ci_helpers/list_images.sh 2>/dev/null |
grep
${
COMMITID
}
|
sort
-n
|
tail
-n1
)
else
echo
"Creating instance for image built on commit
${
COMMITID
}
with gitlab pipeline ID
${
pipelineid
}
"
imagetag
=
$(
../ci_helpers/list_images.sh 2>/dev/null |
grep
${
COMMITID
}
|
grep
^
${
pipelineid
}
git |
sort
-n
|
tail
-n1
)
fi
if
[
"
${
imagetag
}
"
==
""
]
;
then
echo
"commit:
${
COMMITID
}
has no docker image available in gitlab registry, please check pipeline status and registry images available."
exit
1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment