Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lmc-base-classes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
LOFAR2.0
lmc-base-classes
Commits
be2eafb8
Commit
be2eafb8
authored
Feb 13, 2019
by
Aditya Dange
Browse files
Options
Downloads
Patches
Plain Diff
Update files to test the build.
parent
b70f3871
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
Jenkinsfile
+0
-66
0 additions, 66 deletions
Jenkinsfile
Makefile
+6
-4
6 additions, 4 deletions
Makefile
docker-compose.yml
+4
-4
4 additions, 4 deletions
docker-compose.yml
setup.py
+1
-0
1 addition, 0 deletions
setup.py
with
12 additions
and
75 deletions
.gitlab-ci.yml
+
1
−
1
View file @
be2eafb8
...
...
@@ -35,7 +35,7 @@ test:
stage
:
test
script
:
-
make build
#
- make test
-
make test
# - mv build public
# - make push
# artifacts:
...
...
This diff is collapsed.
Click to expand it.
Jenkinsfile
deleted
100644 → 0
+
0
−
66
View file @
b70f3871
node
(
'docker'
)
{
withDockerContainer
(
image:
'tango-lmc-base-classes:latest'
,
args:
'-u root'
)
{
stage
'Cleanup workspace'
sh
'chmod 777 -R .'
sh
'rm -rf *'
stage
'Checkout SCM'
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"refs/heads/${env.BRANCH_NAME}"
]],
extensions:
[[
$class
:
'LocalBranch'
]],
userRemoteConfigs:
scm
.
userRemoteConfigs
,
doGenerateSubmoduleConfigurations:
false
,
submoduleCfg:
[]
])
stage
'Install & Unit Tests'
timestamps
{
timeout
(
time:
30
,
unit:
'MINUTES'
)
{
ansiColor
(
'xterm'
)
{
try
{
// Add a symbolic link to lmc-base-classes dir, as the Ansible scripts
// assume that is part of the path
sh
'ln -sv $WORKSPACE ../lmc-base-classes'
// use Ansible to do pip installs, using current WORKSPACE
// as the software_root
// install coverage manually, so it can be used after tests
sh
'''
PARENT_DIR=`dirname $WORKSPACE`
cd ansible
ansible-playbook -i hosts install_sw.yml \
--limit "local" \
--tags install-sw-lmc-base-classes \
--tags install-sw-skabase \
--verbose \
--extra-vars software_root=$PARENT_DIR
pip install coverage
cd ..
'''
catchError
{
// run tests
sh
'''
python setup.py test \
--addopts="--junitxml results.xml --color=yes --cov=skabase --cov=refelt --cov-report=term --cov-config .coveragerc"
'''
}
// generate HTML coverage report
sh
'coverage html'
}
finally
{
step
([
$class
:
'JUnitResultArchiver'
,
testResults:
'results.xml'
])
archive
'htmlcov/*'
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Makefile
+
6
−
4
View file @
be2eafb8
...
...
@@ -58,7 +58,7 @@ make = tar -c test-harness/ | \
docker run
-i
--rm
--network
=
$(
DOCKER_NETWORK
)
\
-e
TANGO_HOST
=
databaseds:10000
\
-v
$(
CACHE_VOLUME
)
:/home/tango/.cache
\
--volumes-from
=
rsyslog-
dishmaster
:rw
\
--volumes-from
=
rsyslog-
lmcbaseclasses
:rw
\
-v
/build
-w
/build
-u
tango
$(
DOCKER_RUN_ARGS
)
$(
IMAGE_TO_TEST
)
\
bash
-c
"sudo chown -R tango:tango /build &&
\
tar x --strip-components 1 --warning=all &&
\
...
...
@@ -74,8 +74,10 @@ test: build ## test the application
rm
-fr
build
;
\
docker
cp
$(
BUILD
)
:/build .
;
\
docker
rm
-f
-v
$(
BUILD
);
\
docker logs dish-master_dishmaster_1
;
\
docker logs dish-master_dishmaster_1
>
build/container.log 2>&1
;
\
# docker logs lmc-base-classes_lmcbaseclasses_1;
\
# docker logs lmc-base-classes_lmcbaseclasses_1 > build/container.log 2>&1;
\
docker logs
$(
CACHE_VOLUME
);
\
docker logs
$(
CACHE_VOLUME
)
>
build/container.log 2>&1
;
\
DOCKER_REGISTRY_HOST
=
$(
DOCKER_REGISTRY_HOST
)
DOCKER_REGISTRY_USER
=
$(
DOCKER_REGISTRY_USER
)
docker-compose down
;
\
exit
$$
status
...
...
@@ -91,7 +93,7 @@ piplock: build ## overwrite Pipfile.lock with the image version
interactive
:
up
interactive
:
##
start an interactive session using the project image (caution: R/W mounts source directory to /app)
docker run
--rm
-it
--name
=
$(
PROJECT
)
-dev
-e
TANGO_HOST
=
databaseds:10000
--network
=
$(
DOCKER_NETWORK
)
\
-v
$(
CURDIR
)
:/app
--volumes-from
=
rsyslog-
dishmaster
:rw
$(
IMAGE_TO_TEST
)
/bin/bash
-v
$(
CURDIR
)
:/app
--volumes-from
=
rsyslog-
lmcbaseclasses
:rw
$(
IMAGE_TO_TEST
)
/bin/bash
down
:
##
stop develop/test environment and any interactive session
docker ps |
grep
$(
PROJECT
)
-dev
&&
docker stop
$(
PROJECT
)
-dev
||
true
...
...
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
4
−
4
View file @
be2eafb8
...
...
@@ -20,7 +20,7 @@ services:
tangodb
:
image
:
ska-registry.av.it.pt/ska-docker/tango-db:latest
depends_on
:
-
rsyslog-
dishmaster
-
rsyslog-
lmcbaseclasses
environment
:
-
MYSQL_ROOT_PASSWORD=secret
-
MYSQL_DATABASE=tango
...
...
@@ -63,8 +63,8 @@ services:
-
TANGO_HOST=databaseds:10000
command
:
>
sh -c "wait-for-it.sh databaseds:10000 --timeout=30 --strict --
tango_admin --add-server
DishMaster/test DishMaster test/DishMaster
/01 &&\
tango_admin --add-server
SKABaseDevice/SKABaseDevice SKABaseDevice ska/basedevice
/01 &&\
sudo ln -sf /var/run/rsyslog/dev/log /dev/log &&\
/venv/bin/python /app/
DishMaster/DishMaster
.py test"
/venv/bin/python /app/
lmc-base-classes/skabase/SKABaseDevice
.py test"
volumes_from
:
-
rsyslog-dishmaster:rw
\ No newline at end of file
-
rsyslog-lmcbaseclasses:rw
\ No newline at end of file
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
0
View file @
be2eafb8
...
...
@@ -46,6 +46,7 @@ setup(name=name,
"
pytest
"
,
"
pytest-cov
"
,
"
pytest-xdist
"
"
mock
"
],
keywords
=
"
lmc base classes ska
"
,
zip_safe
=
False
)
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