-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathtrain.yaml
75 lines (68 loc) · 3.61 KB
/
train.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
language: python
train_version: 1.0
tools:
- msde/git/2.35.3
- python/core/3.10.11
- msde/msdlbuild/prod
- perl5/core/5.26.1
- msde/deploy-endpoints/prod
toolchains: [ rhel7, rhel8, solaris11_x86_64 ]
runtimes:
- name: rhel7
from_toolchain: rhel7
- name: rhel8
from_toolchain: rhel8
- name: solaris11_x86_64
from_toolchain: solaris11_x86_64
test_setup: &test_setup
- mkdir -p ../install/common/test-results/UNIT/xml/ ../install/common/test-results/INTEGRATION/coveragepy/xml/
build_types:
- build_type:
name: release
build:
- script: git ls-remote --sort='version:refname' --tags /ms/dev/aquilon/aqd/SCM/aqd.git | grep refs/tags/TRAIN_DIST_aquilon/aqd | tail -n 2 | head -n 1 | awk '{print $2}' | sed 's/^\([^/]\+\/\)\{2\}//' > doc/version.txt
- script: msdlbuild clean
- script: make clean
- script: make install
- script: msdlbuild metadata
- script: train-config build --templates-directory treadmill/templates --config-directory treadmill/config --output-directory ../install/common/treadmill
- script: cp -vfar treadmill/monitors ../install/common/treadmill/
test_types:
- test_type:
name: unit
test: set -o pipefail; ./tests/runtests.py --config=./tests/unittest.conf --no-interactive -x integration | tee ./tests/aqdtests.log
- test_type:
name: all
test: set -o pipefail; ./tests/runtests.py --config=./tests/unittest.conf --no-interactive | tee ./tests/aqdtests.log
- test_type:
name: failfast
test: which python; set -o pipefail; python tests/runtests.py --config=tests/unittest.conf --failfast --no-interactive --coverage --verbose | tee tests/aqdtests.log
- test_type:
name: restart
test: ./tests/restarttests.sh
- test_type:
name: infoblox-end-to-end
test: set -o pipefail; AQDCONF=tests/ib-end-to-end.conf ./tests/runtests.py --infoblox-integration --no-interactive --config=tests/ib-end-to-end.conf --failfast | tee ./tests/aqdtests.log
- test_type:
name: lint
test:
- script:
command: # Do not fail build on error, for now.
- *test_setup
- echo -e "\n-- ruff linter check --"
- /ms/dist/python/PROJ/ruff/0.4.2/bin/ruff check --config pyproject.toml . && /ms/dist/python/PROJ/ruff/0.2.1-ms1/bin/ruff --config pyproject.toml --format junit -o ../install/common/test-results/ruff.xml .
- echo -e "\n** ruff is currently informative only, but try to fix issues when possible. Try 'ruff check --fix' on your file for quick wins.**".
- echo -e "\n-- black (darker) code reformatter on commit check --"
- /ms/dist/python/PROJ/darker/1.7.2/bin/darker --diff --check --revision $(git rev-parse --abbrev-ref --symbolic-full-name @{u}) || echo -e "\nFAILED - !!! darker found formating issue. Please run **black** or *tools/darker** on new code to fix and resubmit code. !!!\n"
- test_type:
name: jenkins
test:
- script:
command:
- *test_setup
- AQDCONF=tests/unittest.conf python test/test_xmlrunner.py
- ./tests/jenkinstest.sh
- cp tests/aqdtests.log ../install/common/test-results/aqdtests.log
- cp -R /var/tmp/$USER/run/quattor/logs/ ../install/common/test-results/quattor-logs
- cp ../install/common/test-results/quattor-logs/coverage/aqd.xml ../install/common/test-results/INTEGRATION/coveragepy/xml/coverage-test.xml
- cp ../install/common/test-results/UNIT/xml/test.xml ../install/common/test-results/INTEGRATION/coveragepy/xml/