Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sonar #3

Merged
merged 11 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/CI-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

# Use SonarScanner from Docker to ensure it uses the correct Java version
- name: Run SonarScanner in Docker
run: |
docker run --rm \
-e SONAR_TOKEN=${{ secrets.SONAR_TOKEN }} \
-e SONAR_HOST_URL=https://sonarcloud.io \
-v $(pwd):/usr/src \
sonarsource/sonar-scanner-cli:latest \
sonar-scanner \
-Dsonar.projectKey=ThomasAdriaanse_Personal-website \
-Dsonar.organization=thomasadriaanse \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=${{ secrets.SONAR_TOKEN }}

# Log in to Amazon ECR
- name: Log in to Amazon ECR
run: |
Expand Down Expand Up @@ -56,4 +76,4 @@ jobs:
docker run -d -p 5000:5000 --name new_website_container ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/website-new:latest

# restart nginx to update website
sudo systemctl restart nginx
sudo systemctl restart nginx
3 changes: 3 additions & 0 deletions api/content/blogs/Devops.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ title: Devops
date: 2024-09-11
published: Yes




# Learning Devops
Previously when I was creating my website, I tried to be as simple as possible for the developmment pipeline. I figuered that I prefer to spend my time learning about the infrastruccture of websites, then the infrastructure of the development process. My process looked like this:

Expand Down
Loading