diff --git a/.gitea/workflows/sonarqube.yaml b/.gitea/workflows/sonarqube.yaml index 87d897b..9cb5fbf 100644 --- a/.gitea/workflows/sonarqube.yaml +++ b/.gitea/workflows/sonarqube.yaml @@ -99,14 +99,30 @@ jobs: echo "# Terraform Test Results" > test-report.md echo "" >> test-report.md echo "Test execution completed at $(date)" >> test-report.md + echo "" >> test-report.md + echo "Repository: ${{ github.repository }}" >> test-report.md + echo "Run Number: ${{ github.run_number }}" >> test-report.md + echo "Branch: ${{ github.ref }}" >> test-report.md - - name: Upload Test Report + - name: Upload Test Report to MinIO if: always() - uses: actions/upload-artifact@v4 - with: - name: terraform-test-report - path: test-report.md - retention-days: 30 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_SECRET_KEY }} + MINIO_ENDPOINT: ${{ secrets.MINIO_ENDPOINT }} + MINIO_BUCKET: ${{ secrets.MINIO_BUCKET }} + run: | + # Install AWS CLI for S3-compatible operations + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip -q awscliv2.zip + sudo ./aws/install + + # Upload test report to MinIO + TEST_PATH="terraform-tests/${{ github.repository }}/${{ github.run_number }}" + aws s3 cp test-report.md "s3://${MINIO_BUCKET}/${TEST_PATH}/test-report.md" \ + --endpoint-url="${MINIO_ENDPOINT}" + + echo "Test report uploaded to: s3://${MINIO_BUCKET}/${TEST_PATH}/" sonarqube: name: SonarQube Trigger