Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
cfaa2f7a
Commit
cfaa2f7a
authored
1 year ago
by
Jan David Mol
Browse files
Options
Downloads
Plain Diff
Merge branch 'add-ds-log-artifacts' into 'master'
L2SS-1646
: Add our services logs as gitlab artifacts See merge request
!803
parents
acaa29ef
7d279142
No related branches found
No related tags found
1 merge request
!803
L2SS-1646: Add our services logs as gitlab artifacts
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker-compose/lofar-device-base/Dockerfile
+9
-4
9 additions, 4 deletions
docker-compose/lofar-device-base/Dockerfile
sbin/run_integration_test.sh
+17
-2
17 additions, 2 deletions
sbin/run_integration_test.sh
with
26 additions
and
6 deletions
docker-compose/lofar-device-base/Dockerfile
+
9
−
4
View file @
cfaa2f7a
...
@@ -20,15 +20,20 @@ RUN --mount=type=cache,target=/var/cache/apt \
...
@@ -20,15 +20,20 @@ RUN --mount=type=cache,target=/var/cache/apt \
sudo
apt-get
install
-y
netcat
sudo
apt-get
install
-y
netcat
COPY
tmp/requirements.txt /tangostationcontrol-requirements.txt
COPY
tmp/requirements.txt /tangostationcontrol-requirements.txt
COPY
tmp/*.whl /
RUN
echo
"TANGO_STATION_CONTROL:
${
TANGO_STATION_CONTROL
}
"
RUN
echo
"TANGO_STATION_CONTROL:
${
TANGO_STATION_CONTROL
}
"
RUN if
[
-z
$TANGO_STATION_CONTROL
]
;
then
\
echo
"Installing requirements only"
;
\
sudo
pip3
install
-r
/tangostationcontrol-requirements.txt
;
\
fi
# This COPY typically triggers a new build instead of pulling from cache.
# We thus perform it after installing the requirements.txt in case
# $TANGO_STATION_CONTROL is not defined.
COPY
tmp/*.whl /
RUN if
[
$TANGO_STATION_CONTROL
]
;
then
\
RUN if
[
$TANGO_STATION_CONTROL
]
;
then
\
echo
"Installing prebuild Station Control wheel"
;
\
echo
"Installing prebuild Station Control wheel"
;
\
sudo
pip3
install
/
*
.whl
;
\
sudo
pip3
install
/
*
.whl
;
\
else
\
echo
"Installing requirements only"
;
\
sudo
pip3
install
-r
/tangostationcontrol-requirements.txt
;
\
fi
fi
# install and use ephimerides and geodetic ("measures") tables for casacore.
# install and use ephimerides and geodetic ("measures") tables for casacore.
...
...
This diff is collapsed.
Click to expand it.
sbin/run_integration_test.sh
+
17
−
2
View file @
cfaa2f7a
...
@@ -121,6 +121,21 @@ function cleanup {
...
@@ -121,6 +121,21 @@ function cleanup {
docker logs
"
${
container
}
"
>
&
"log/
${
container
}
.log"
docker logs
"
${
container
}
"
>
&
"log/
${
container
}
.log"
done
done
bash
"
${
LOFAR20_DIR
}
"
/sbin/dsconfig.sh
--dump
>
& log/dump_ConfigDb.log
bash
"
${
LOFAR20_DIR
}
"
/sbin/dsconfig.sh
--dump
>
& log/dump_ConfigDb.log
mkdir
-p
log/allocations
# obtain the list of tasks, but only those that have actually started.
docker
exec
server.station.nomad.nomad-cluster.jumppad.dev nomad alloc status
-json
| jq
--raw-output
'.[] | (.ID + " " + .Name + " " + (.TaskStates | map_values(select(.StartedAt)) | keys[]) + " " + (.CreateTime/1e9 | todate))'
|
while
read
-r
line
do
read
-r
-a
parts
<<<
"
${
line
}
"
ALLOC_ID
=
"
${
parts
[0]
}
"
ALLOC_NAME
=
"
${
parts
[1]
}
"
TASK_NAME
=
"
${
parts
[2]
}
"
CREATE_TIME
=
"
${
parts
[3]
}
"
echo
"Saving logs for job
${
TASK_NAME
}
allocation
${
ALLOC_ID
}
"
docker
exec
server.station.nomad.nomad-cluster.jumppad.dev nomad alloc logs
-stderr
"
${
ALLOC_ID
}
"
"
${
TASK_NAME
}
"
>
"log/allocations/
${
ALLOC_NAME
}
-
${
TASK_NAME
}
-
${
CREATE_TIME
}
-
${
ALLOC_ID
}
.stderr.log"
docker
exec
server.station.nomad.nomad-cluster.jumppad.dev nomad alloc logs
-stdout
"
${
ALLOC_ID
}
"
"
${
TASK_NAME
}
"
>
"log/allocations/
${
ALLOC_NAME
}
-
${
TASK_NAME
}
-
${
CREATE_TIME
}
-
${
ALLOC_ID
}
.stdout.log"
done
fi
fi
if
[
-z
"
${
preserve
}
"
]
;
then
if
[
-z
"
${
preserve
}
"
]
;
then
make stop
>
/dev/null 2>&1
make stop
>
/dev/null 2>&1
...
@@ -155,7 +170,7 @@ function integration_test {
...
@@ -155,7 +170,7 @@ function integration_test {
-v
"
$LOFAR20_DIR
"
:/opt/lofar/tango:rw
-v
"
$LOFAR20_DIR
"
:/opt/lofar/tango:rw
-w
=
"/opt/lofar/tango/tangostationcontrol"
-w
=
"/opt/lofar/tango/tangostationcontrol"
)
)
echo
"run integration
${
1
}
..."
echo
"run integration
${
1
}
starting at
$(
date
+
'%F %T'
)
..."
docker
"
${
docker_args
[@]
}
"
-e
"TEST_MODULE=
${
1
}
"
"git.astron.nl:5000/lofar2.0/tango/ci-build-runner:
$TAG
"
\
docker
"
${
docker_args
[@]
}
"
-e
"TEST_MODULE=
${
1
}
"
"git.astron.nl:5000/lofar2.0/tango/ci-build-runner:
$TAG
"
\
tox
-e
integration
tox
-e
integration
}
}
...
@@ -169,7 +184,7 @@ function await {
...
@@ -169,7 +184,7 @@ function await {
echo
-n
'.'
;
echo
-n
'.'
;
sleep
2
;
sleep
2
;
current_time
=
"
$(
date
-u
+%s
)
"
current_time
=
"
$(
date
-u
+%s
)
"
elapsed_seconds
=
$(
"
$current_time
"
-
"
$start_time
"
)
elapsed_seconds
=
$(
(
"
$current_time
"
-
"
$start_time
"
)
)
if
[
"
${
elapsed_seconds
}
"
-gt
"
${
timeout_sec
}
"
]
;
then
if
[
"
${
elapsed_seconds
}
"
-gt
"
${
timeout_sec
}
"
]
;
then
echo
". [timeout]"
;
echo
". [timeout]"
;
exit
1
;
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