diff --git a/.github/workflows/CI-CD.yml b/.github/workflows/CI-CD.yml index 00d610e..28fe7e1 100644 --- a/.github/workflows/CI-CD.yml +++ b/.github/workflows/CI-CD.yml @@ -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: | @@ -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 \ No newline at end of file + sudo systemctl restart nginx diff --git a/api/content/blogs/Devops.md b/api/content/blogs/Devops.md index 2b7f711..98cc3f5 100644 --- a/api/content/blogs/Devops.md +++ b/api/content/blogs/Devops.md @@ -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: