Skip to content

Commit

Permalink
SQ startup
Browse files Browse the repository at this point in the history
  • Loading branch information
henryju committed May 14, 2024
1 parent 1726e88 commit 64b479d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,24 @@ jobs:
runs-on: ubuntu-latest
services:
sonarqube:
image: sonarqube:lts-community
image: sonarqube:8.9-community
ports:
- 9000:9000
options: >-
--health-cmd "curl --fail --user admin:admin http://127.0.0.1:9000/api/system/status || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 1000
volumes:
- /tmp/sonarqube_data:/opt/sonarqube/data
- /tmp/sonarqube_logs:/opt/sonarqube/logs
# options: >-
# --health-cmd "curl --fail --user admin:admin http://127.0.0.1:9000/api/system/status || exit 1"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 1000
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: List files in the repository
run: |
ls /tmp/sonarqube_logs
- run: ./test/waitForSonarQubeUp.sh
timeout-minutes: 3
- name: Run action on sample project
Expand Down
5 changes: 3 additions & 2 deletions test/waitForSonarQubeUp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ sleep 5
isUp=$(check_sq_is_up)
until [[ "$isUp" == "UP" ]]; do
echo $isUp
ls ./sonarqube_data
cat ./sonarqube_data/logs/sonar.log
ls /tmp/sonarqube_data
ls /tmp/sonarqube_logs
cat /tmp/sonarqube_logs/**/*.log
sleep 1
isUp=$(check_sq_is_up)
done
Expand Down

0 comments on commit 64b479d

Please sign in to comment.