Skip to content

Commit e896c9e

Browse files
authored
Merge pull request #2809 from elkoniu/update-mantra-send-routine
chore: Send results to mantra using newly introduced template
2 parents bfc7ee4 + 70fbf95 commit e896c9e

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

.gitlab-ci-full-integration-generator.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,16 @@ test:integration:generator:
1616
script:
1717
- apt-get update && apt-get install -y gettext-base
1818
- |
19-
if [ "$NIGHTLY_BUILD" = "true" ]; then
20-
MANTRA_BUILD_NAME="nightly-$(date +%Y-%m-%d)"
21-
else
22-
MANTRA_BUILD_NAME="pullreq-$(date +%Y-%m-%d)-${CI_PIPELINE_ID}"
23-
fi
2419
MANTRA_PROJECT_NAME="full_integration"
2520
2621
# Export for envsubst
27-
export MANTRA_BUILD_NAME MANTRA_PROJECT_NAME
22+
export MANTRA_PROJECT_NAME
2823
2924
- touch gitlab-ci-full-integration-jobs.yml
3025
- CI_NODE_TOTAL=$CI_JOBS_IN_PARALLEL_INTEGRATION
3126
- export CI_NODE_TOTAL CI_NODE_INDEX
3227
- for CI_NODE_INDEX in $(seq $CI_JOBS_IN_PARALLEL_INTEGRATION); do
33-
- envsubst '$CI_NODE_TOTAL,$CI_NODE_INDEX,$MANTRA_BUILD_NAME,$MANTRA_PROJECT_NAME' < .gitlab-ci-full-integration-template.yml >> gitlab-ci-full-integration-jobs.yml
28+
- envsubst '$CI_NODE_TOTAL,$CI_NODE_INDEX,$MANTRA_PROJECT_NAME' < .gitlab-ci-full-integration-template.yml >> gitlab-ci-full-integration-jobs.yml
3429
- done
3530
artifacts:
3631
paths:

.gitlab-ci-full-integration-template.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# The CI job name will be unique after substitution from the generator.
2+
include:
3+
- project: "Northern.tech/Mender/mendertesting"
4+
file: "qa-common/send-results-to-mantra.yml"
5+
ref: "master"
6+
27
test:integration:$CI_NODE_INDEX:
38
rules:
49
- if: $RUN_TESTS_FULL_INTEGRATION == "true"
@@ -56,26 +61,14 @@ test:integration:$CI_NODE_INDEX:
5661
- sysctl -w fs.inotify.max_user_instances=1024
5762
- sysctl -w fs.file-max=600000
5863
- ulimit -n 524288
59-
# Mantra uploader: pull the helper script from mender-qa once. It’s tiny (<1 KiB).
60-
- |
61-
curl -sSfL \
62-
https://raw.githubusercontent.com/mendersoftware/mender-qa/074b590110e1793ada4acac7bb7b1add8fe40981/scripts/mantra_post_test_results \
63-
-o /usr/local/bin/mantra_post_test_results
64-
chmod +x /usr/local/bin/mantra_post_test_results
6564

6665
script:
6766
- cd tests
6867
- ./run.sh
6968

7069
after_script:
7170
# Post results to Mantra
72-
- |
73-
echo "Uploading to Mantra with project=$MANTRA_PROJECT_NAME build=$MANTRA_BUILD_NAME"
74-
75-
/usr/local/bin/mantra_post_test_results --ensure \
76-
"$MANTRA_PROJECT_NAME" \
77-
"$MANTRA_BUILD_NAME" \
78-
tests/results.xml || true # never fail the job if Mantra is down
71+
- !reference [.mantra-push-results]
7972

8073
artifacts:
8174
expire_in: 2w

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ variables:
4747

4848
DOCKER_VERSION:
4949
description: "Docker version to use in jobs"
50-
value: "27.3"
50+
value: "28"
5151

5252
MENDER_SERVER_TAG:
5353
description: "Mender Server Docker tag for running integration tests"

0 commit comments

Comments
 (0)