Skip to content

Commit

Permalink
Merge pull request #935 from guwirth/update-ci-sq-5.6.1
Browse files Browse the repository at this point in the history
update Travis and Appveyor CI to SQ 5.6.1 and Scanner 2.6.1
  • Loading branch information
guwirth authored Sep 3, 2016
2 parents 96e1f08 + 3a08402 commit 832dc99
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
22 changes: 13 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ jdk:
env:
- SONARHOME=/tmp/sonarqube-5.6.1

matrix:
fast_finished: true
#matrix:
# fast_finished: true
# allow_failures:
# - env: SONARHOME=/tmp/sonarqube-5.5

# shorten the VM hostname with the new workaround
# https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
addons:
hosts:
- myshorthost
hostname: myshorthost

before_install:
- cat /etc/hosts # optionally check the content *before*
- sudo hostname "$(hostname | cut -c1-63)"
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
- cat /etc/hosts # optionally check the content *after*
- cat /etc/hosts # optionally check the content
- travis_retry sudo apt-add-repository -y ppa:boost-latest/ppa
- travis_retry sudo apt-get -qq update
- travis_retry sudo apt-get -qq install boost1.55
Expand All @@ -24,8 +28,8 @@ install:
- cd /tmp
- travis_retry wget -q https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.1.zip
- unzip -qq sonarqube-5.6.1.zip
- travis_retry wget -q https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.6.zip
- unzip -qq sonar-scanner-2.6.zip
- travis_retry wget -q https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.6.1.zip
- unzip -qq sonar-scanner-2.6.1.zip
- cd -

before_script:
Expand All @@ -36,7 +40,7 @@ before_script:
script:
- mvn install -DskipTests=true
- mvn test
- RAILS_ENV=production PATH=$PATH:/tmp/sonar-scanner-2.6/bin TestDataFolder=~/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata behave --no-capture
- RAILS_ENV=production PATH=$PATH:/tmp/sonar-scanner-2.6.1/bin TestDataFolder=~/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata behave --no-capture

after_failure:
- cat $SONARHOME/logs/sonar.log
Expand Down
14 changes: 7 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ install:
}
if (!(Test-Path -Path "C:\sonar-scanner" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.6.zip',
'https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.6.1.zip',
'C:\sonar-scanner-dist.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sonar-scanner-dist.zip", "C:\sonar-scanner")
}
if (!(Test-Path -Path "C:\sonarqube" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.zip',
'C:\sonarqube-5.6.zip'
'https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.1.zip',
'C:\sonarqube-5.6.1.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sonarqube-5.6.zip", "C:\sonarqube")
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sonarqube-5.6.1.zip", "C:\sonarqube")
}
- ps: |
If ($env:Platform -Match "x86") {
Expand All @@ -37,8 +37,8 @@ install:
$env:VCVARS_PLATFORM="amd64"
$env:LANG_PLATFORM="-x64"
}
- cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;C:\sonar-scanner\sonar-scanner-2.6\bin;%PATH%
- cmd: SET SONARHOME=C:\sonarqube\sonarqube-5.6
- cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;C:\sonar-scanner\sonar-scanner-2.6.1\bin;%PATH%
- cmd: SET SONARHOME=C:\sonarqube\sonarqube-5.6.1
- cmd: SET TestDataFolder=C:\projects\sonar-cxx\integration-tests\testdata
- cmd: SET

Expand Down Expand Up @@ -66,5 +66,5 @@ on_failure:
- ps: Get-ChildItem cxx-checks\target\surefire-reports\*.txt | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem sonar-cxx-plugin\target\surefire-reports\*.txt | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem *.log | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem C:\sonarqube\sonarqube-5.6\logs\* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem C:\sonarqube\sonarqube-5.6.1\logs\* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }

2 changes: 1 addition & 1 deletion integration-tests/features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def start_sonar(sonarhome):
sys.stdout.flush()
now = time.time()
start_script(sonarhome)
if not wait_for_sonar(120, is_webui_up):
if not wait_for_sonar(60, is_webui_up):
sys.stdout.write(RED + "FAILED, duration: %03.1f s\n" % (time.time() - now) + RESET)
return False

Expand Down
4 changes: 2 additions & 2 deletions integration-tests/features/importing_cppcheck_reports.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Feature: Importing Cppcheck reports
AND the server log (if locatable) contains no error/warning messages
BUT the analysis log contains a line matching
"""
.*INFO.*The report '.*' seems to be empty, ignoring.
.*WARN.*The report '.*' seems to be empty, ignoring.
"""
AND the number of violations fed is 0
Expand Down Expand Up @@ -76,7 +76,7 @@ Feature: Importing Cppcheck reports
AND the server log (if locatable) contains no error/warning messages
BUT the analysis log contains a line matching
"""
.*INFO.*Cannot find the file .* skipping violations
.*WARN.*Cannot find the file .* skipping violations
"""
AND the number of violations fed is 0

Expand Down

0 comments on commit 832dc99

Please sign in to comment.