아카이브 관련 response 추가 및 수정 #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: sonar analysis | |
| on: | |
| pull_request: | |
| branches: [ "dev" ] | |
| jobs: | |
| build-and-analyze: | |
| name: Build and analyze | |
| runs-on: ubuntu-latest | |
| services: | |
| mariadb: | |
| image: mariadb:latest | |
| env: | |
| MYSQL_ROOT_PASSWORD: root | |
| MYSQL_DATABASE: testdb | |
| MYSQL_USER: testuser | |
| MYSQL_PASSWORD: testpass | |
| ports: | |
| - 3306:3306 | |
| redis: | |
| image: redis:latest | |
| ports: | |
| - 6379:6379 | |
| env: | |
| DATABASE_URL: jdbc:mariadb://localhost:3306/testdb | |
| DATABASE_USERNAME: testuser | |
| DATABASE_PASSWORD: testpass | |
| DATABASE_DRIVER: org.mariadb.jdbc.Driver | |
| JWT_SECRET: ${{ secrets.TEST_JWT_SECRET }} | |
| MAX_FILE_SIZE: ${{ secrets.MAX_FILE_SIZE }} | |
| MAX_REQUEST_SIZE : ${{ secrets.MAX_REQUEST_SIZE }} | |
| MINIO_ENDPOINT: ${{secrets.MINIO_ENDPOINT}} | |
| MINIO_ACCESS_KEY: ${{secrets.MINIO_ACCESS_KEY}} | |
| MINIO_SECRET_KEY: ${{secrets.MINIO_SECRET_KEY}} | |
| MINIO_BUCKET_NAME: ${{secrets.MINIO_BUCKET_NAME}} | |
| MINIO_PORTFOLIO_BUCKET_NAME: ${{secrets.MINIO_PORTFOLIO_BUCKET_NAME}} | |
| MINIO_PW: ${{secrets.MINIO_PW}} | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| REDIS_PASSWORD: ${{secrets.REDIS_PASSWORD}} | |
| MINIO_ARCHIVE_THUMBNAIL: ${{secrets.MINIO_ARCHIVE_THUMBNAIL}} | |
| MINIO_ARCHIVE_IMG: ${{secrets.MINIO_ARCHIVE_IMG}} | |
| GOOGLE_CLIENT_ID: ${{secrets.GOOGLE_CLIENT_ID}} | |
| GOOGLE_CLIENT_SECRET: ${{secrets.GOOGLE_CLIENT_SECRET}} | |
| GOOGLE_REDIRECT_URI: ${{secrets.GOOGLE_REDIRECT_URI}} | |
| GOOGLE_AUTHORIZATION_URI: ${{secrets.GOOGLE_AUTHORIZATION_URI}} | |
| GOOGLE_TOKEN_URI: ${{secrets.GOOGLE_TOKEN_URI}} | |
| GOOGLE_USER_INFO_URI: ${{secrets.GOOGLE_USER_INFO_URI}} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for better relevancy of analysis | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: 'zulu' | |
| - name: Clean SonarQube Cache | |
| run: rm -rf ~/.sonar/cache | |
| - name: Cache SonarQube packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.sonar/cache | |
| key: ${{ runner.os }}-sonar | |
| restore-keys: ${{ runner.os }}-sonar | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.gradle/caches | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('sequence_member/**/*.gradle') }} | |
| restore-keys: ${{ runner.os }}-gradle | |
| - name: Set sonar version | |
| id: set_version | |
| run: echo "version=$(date +'%Y%m%d-%H%M')" >> $GITHUB_OUTPUT | |
| - name: Build and analyze | |
| working-directory: sequence_member | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
| SONAR_USE_BUILD_TOOL_JDK: "true" | |
| run: | | |
| ./gradlew build sonar \ | |
| -Dsonar.scanner.skipJreProvisioning=true \ | |
| -Dsonar.projectVersion=${{ steps.set_version.outputs.version }} | |