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 e33a0aa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,33 @@ jobs:
exit 1
runAnalysisTest:
runs-on: ubuntu-latest
container:
image: alpine:latest
volumes:
- sonarqube_data:/tmp/sonarqube_data
- sonarqube_logs:/tmp/sonarqube_logs
- sonarqube_extensions:/tmp/sonarqube_extensions
services:
sonarqube:
image: sonarqube:lts-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:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_logs:/opt/sonarqube/logs
- sonarqube_extensions:/opt/sonarqube/extensions
# 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: |
sudo ls /tmp/sonarqube_logs
- run: ./test/waitForSonarQubeUp.sh
timeout-minutes: 3
- name: Run action on sample project
Expand Down
4 changes: 2 additions & 2 deletions test/waitForSonarQubeUp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ sleep 5
isUp=$(check_sq_is_up)
until [[ "$isUp" == "UP" ]]; do
echo $isUp
ls ./sonarqube_data
cat ./sonarqube_data/logs/sonar.log
sudo ls /tmp/sonarqube_logs
sudo cat /tmp/sonarqube_logs/sonar.log
sleep 1
isUp=$(check_sq_is_up)
done
Expand Down

0 comments on commit e33a0aa

Please sign in to comment.