Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
float
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
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
ai3
float
Commits
62fb5fc6
Commit
62fb5fc6
authored
3 months ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Expose test artifacts to the Gitlab CI interface
parent
e5fbc06f
No related branches found
Branches containing commit
No related tags found
1 merge request
!310
Expose test artifacts to the Gitlab CI interface
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+6
-6
6 additions, 6 deletions
.gitlab-ci.yml
test-driver
+1
-1
1 addition, 1 deletion
test-driver
test/integration-test.yml
+8
-1
8 additions, 1 deletion
test/integration-test.yml
with
15 additions
and
8 deletions
.gitlab-ci.yml
+
6
−
6
View file @
62fb5fc6
...
...
@@ -38,11 +38,16 @@ variables:
CREATE_ENV_VARS
:
"
"
TEST_DIR
:
"
"
tags
:
[
ai3
]
# Some artifacts may be missing, depending on the specific job.
artifacts
:
when
:
on_failure
when
:
always
expire_in
:
1 week
name
:
"
${CI_JOB_NAME}_${CI_COMMIT_REF_SLUG}_${CI_COMMIT_SHORT_SHA}"
reports
:
dotenv
:
deploy.env
junit
:
pytest.xml
paths
:
-
"
.vmine_group_review*"
-
"
${BUILD_DIR}/ansible.log"
-
"
${BUILD_DIR}/logs"
...
...
@@ -72,11 +77,6 @@ full_test_review:
FLOATUP_ARGS
:
"
--state-file
.vmine_group_review_$CI_MERGE_REQUEST_ID
--ttl
6h
--env
deploy.env
--dashboard-url
https://vm.investici.org"
TEST_DIR
:
"
test/full.ref"
allow_failure
:
true
artifacts
:
when
:
always
reports
:
dotenv
:
deploy.env
paths
:
[
'
.vmine_group_review*'
]
environment
:
name
:
review/$CI_COMMIT_REF_SLUG
url
:
$VMINE_GROUP_URL
...
...
This diff is collapsed.
Click to expand it.
test-driver
+
1
−
1
View file @
62fb5fc6
...
...
@@ -131,7 +131,7 @@ do_provision() {
do_test
()
{
for
playbook
in
"
${
float_dir
}
/test/integration-test.yml"
"
$@
"
;
do
log Running
test
playbook
${
playbook
}
${
float_dir
}
/float run
${
playbook
}
\
ANSIBLE_STDOUT_CALLBACK
=
default
ANSIBLE_CALLBACKS_ENABLED
=
default
${
float_dir
}
/float run
-vv
${
playbook
}
\
||
die
"test playbook failed"
done
}
...
...
This diff is collapsed.
Click to expand it.
test/integration-test.yml
+
8
−
1
View file @
62fb5fc6
...
...
@@ -22,16 +22,23 @@
-
name
:
Run tests
command
:
"
podman
run
--rm
--network
host
--mount
type=bind,source=/tmp/test-config.yml,destination=/test-config.yml
--mount
type=bind,source=/artifacts,destination=/artifacts
{{
test_image
}}"
-
name
:
Check existence of pytest.xml
stat
:
path
:
"
/artifacts/pytest.xml"
register
:
pytest_xml_stat
-
name
:
Retrieve test result
slurp
:
src
:
"
/artifacts/pytest.xml"
register
:
pytest_xml
when
:
"
pytest_xml_stat.stat.exists"
-
name
:
Store test results locally
local_action
:
module
:
copy
dest
:
"
pytest.xml"
dest
:
"
{{
lookup('env',
'CI_PROJECT_DIR')
|
default('..')
}}/
pytest.xml"
content
:
"
{{
pytest_xml['content']
|
b64decode
}}"
when
:
"
pytest_xml_stat.stat.exists"
vars
:
test_image
:
"
registry.git.autistici.org/ai3/float:integration-test"
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