Skip to content

Commit b93aa61

Browse files
authored
Merge pull request docker-java#665 from KostyaSha/conditionCoverity
Condition coverity. Update developers.
2 parents 76bfdc9 + 26c0e27 commit b93aa61

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

.travis/travis-script.sh

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,45 @@
11
#!/usr/bin/env bash
22

3-
set -ex
3+
44

55
IS_COVERITY_SCAN_BRANCH=`ruby -e "puts '${TRAVIS_BRANCH}' =~ /\\A$COVERITY_SCAN_BRANCH_PATTERN\\z/ ? 1 : 0"`
66

7+
export COVERITY_ALLOWED=true
8+
# Verify upload is permitted
9+
AUTH_RES=`curl -s --form project="$COVERITY_SCAN_PROJECT_NAME" --form token="$COVERITY_SCAN_TOKEN" $SCAN_URL/api/upload_permitted`
10+
if [ "$AUTH_RES" = "Access denied" ]; then
11+
echo -e "\033[33;1mCoverity Scan API access denied. Check COVERITY_SCAN_PROJECT_NAME and COVERITY_SCAN_TOKEN.\033[0m"
12+
COVERITY_ALLOWED=false
13+
else
14+
AUTH=`echo $AUTH_RES | ruby -e "require 'rubygems'; require 'json'; puts JSON[STDIN.read]['upload_permitted']"`
15+
if [ "$AUTH" = "true" ]; then
16+
echo -e "\033[33;1mCoverity Scan analysis authorized per quota.\033[0m"
17+
else
18+
WHEN=`echo $AUTH_RES | ruby -e "require 'rubygems'; require 'json'; puts JSON[STDIN.read]['next_upload_permitted_at']"`
19+
echo -e "\033[33;1mCoverity Scan analysis NOT authorized until $WHEN.\033[0m"
20+
21+
COVERITY_ALLOWED=false
22+
fi
23+
fi
24+
25+
set -ex
726

827
if [ "${FAST_BUILD}" == "true" ]; then
9-
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$COVERITY" == "true" ] && [ "$IS_COVERITY_SCAN_BRANCH" = "1" ]; then
28+
if [ "$TRAVIS_PULL_REQUEST" == "false" ] &&
29+
[ "$COVERITY" == "true" ] &&
30+
[ "$IS_COVERITY_SCAN_BRANCH" = "1" ] &&
31+
[ "$COVERITY_ALLOWED" == "true" ]; then
1032
export COVERITY_SCAN_BUILD_COMMAND="mvn package"
1133
#curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash
1234
./.travis/travisci_build_coverity_scan.sh
1335
else
1436
mvn package
1537
fi
1638
else
17-
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$COVERITY" == "true" ] && [ "$IS_COVERITY_SCAN_BRANCH" = "1" ]; then
39+
if [ "$TRAVIS_PULL_REQUEST" == "false" ] &&
40+
[ "$COVERITY" == "true" ] &&
41+
[ "$IS_COVERITY_SCAN_BRANCH" = "1" ] &&
42+
[ "$COVERITY_ALLOWED" == "true" ]; then
1843
export COVERITY_SCAN_BUILD_COMMAND="mvn verify"
1944
#curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash
2045
./.travis/travisci_build_coverity_scan.sh

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@
3232
</scm>
3333

3434
<developers>
35+
<developer>
36+
<id>marcuslinke</id>
37+
<name>Marcus Linke</name>
38+
<email>marcus.linke@gmx.de</email>
39+
</developer>
40+
<developer>
41+
<id>kostyasha</id>
42+
<name>Kanstantsin Shautsou</name>
43+
<email>kanstantsin.sha@gmail.com</email>
44+
</developer>
3545
<developer>
3646
<id>kpelykh</id>
3747
<name>Konstantin Pelykh</name>

0 commit comments

Comments
 (0)