Skip to content

Commit 8191332

Browse files
authored
[jenkins]: Lock vs tests (#50)
1 parent 2bbe0c0 commit 8191332

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

jenkins/vs/buildimage-vs-all-pr/Jenkinsfile

+12-3
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,26 @@ pipeline {
3333
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'
3434
3535
make configure PLATFORM=vs
36+
make SONIC_CONFIG_BUILD_JOBS=1 target/docker-sonic-vs.gz
3637
37-
touch target/debs/stretch/*.deb
38+
'''
39+
}
40+
}
3841

39-
make SONIC_CONFIG_BUILD_JOBS=1 target/docker-sonic-vs.gz
42+
stage('Test') {
43+
steps {
44+
wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'xterm']) {
45+
lock(resource: "vstest_${env.NODE_NAME}") {
46+
sh '''
47+
#!/bin/bash -xe
4048
4149
docker load < target/docker-sonic-vs.gz
4250
4351
cd platform/vs/tests
4452
sudo py.test -v --junitxml=tr.xml
45-
# pavelsh added -s to see output from the pytest
4653
'''
54+
}
55+
}
4756
}
4857
}
4958

jenkins/vs/buildimage-vs-all/Jenkinsfile

+13
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,24 @@ git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --rel
3636
make configure PLATFORM=vs
3737
make SONIC_CONFIG_BUILD_JOBS=1 target/docker-sonic-vs.gz
3838
39+
'''
40+
}
41+
}
42+
43+
stage('Test') {
44+
steps {
45+
wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'xterm']) {
46+
lock(resource: "vstest_${env.NODE_NAME}") {
47+
sh '''
48+
#!/bin/bash -xe
49+
3950
docker load < target/docker-sonic-vs.gz
4051
4152
cd platform/vs/tests
4253
sudo py.test -v --junitxml=tr.xml
4354
'''
55+
}
56+
}
4457
}
4558
}
4659

0 commit comments

Comments
 (0)