Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
TFS
controller
Commits
cc236462
Commit
cc236462
authored
4 years ago
by
Javi Moreno
Browse files
Options
Downloads
Patches
Plain Diff
Changes in the unit test automation
parent
ac587367
No related branches found
No related tags found
1 merge request
!54
Release 2.0.0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/monitoring/.gitlab-ci.yml
+12
-16
12 additions, 16 deletions
src/monitoring/.gitlab-ci.yml
src/monitoring/tests/Dockerfile
+1
-1
1 addition, 1 deletion
src/monitoring/tests/Dockerfile
with
13 additions
and
17 deletions
src/monitoring/.gitlab-ci.yml
+
12
−
16
View file @
cc236462
variables
:
IMAGE_NAME
:
'
monitoring'
# name of the microservice
IMAGE_NAME_TEST
:
'
monitoring-test'
# name of the microservice
IMAGE_TAG
:
'
latest'
# tag of the container image (production, development, etc)
# build the Docker image
...
...
@@ -12,15 +13,6 @@ build monitoring:
-
src/$IMAGE_NAME/**
-
.gitlab-ci.yml
build monitoring test
:
stage
:
build
script
:
-
docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/tests/Dockerfile ./src/
rules
:
-
changes
:
-
src/$IMAGE_NAME/**
-
.gitlab-ci.yml
# tags the Docker image
tag monitoring
:
stage
:
build
...
...
@@ -84,11 +76,15 @@ test monitoring run:
test monitoring pytest
:
stage
:
test
needs
:
-
build monitoring test
before_script
:
-
if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create -d bridge teraflowbridge; fi
-
build monitoring
script
:
-
docker run -d -p 7070:7070 --name monitoring-tests --network=teraflowbridge --rm "$IMAGE_NAME:$IMAGE_TAG"
after_script
:
-
docker stop monitoring-tests
-
docker build -t "$IMAGE_NAME_TEST:$IMAGE_TAG" -f ./src/$IMAGE_NAME_TEST/tests/Dockerfile ./src/ > pytest_report.txt
rules
:
-
changes
:
-
src/$IMAGE_NAME/**
-
.gitlab-ci.yml
artifacts
:
when
:
always
paths
:
-
pytest_report.txt
expire_in
:
1 day
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/monitoring/tests/Dockerfile
+
1
−
1
View file @
cc236462
...
...
@@ -27,4 +27,4 @@ COPY common/logger.py .
ENV
PORT=7070
EXPOSE
7070
RUN
pytest
RUN
pytest
--junitxml
=
report.xml
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