Skip to content
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
147 changes: 0 additions & 147 deletions .github/workflows/CD.yml

This file was deleted.

54 changes: 10 additions & 44 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,24 @@ name: CI

on:
pull_request:
branches: [ "main", "dev" ]
branches: ["main", "dev"]

jobs:
build:
runs-on: self-hosted
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v3

- name: .env 파일 생성
run: |

# .env 파일 생성
touch .env

# .env 파일 작성
echo "${{ secrets.ENV_FILE }}" >> .env

chmod 600 .env

shell: bash

- name: build 실행
run: |
chmod +x gradlew
./gradlew clean build
shell: bash

- name: sonarqube
run: |
./gradlew sonar \
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_NAME }} \
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \
-Dsonar.login=${{ secrets.SONAR_TOKEN }}

shell: bash

- name: SonarQube Quality Gate check
id: sonarqube-quality-gate-check
uses: sonarsource/sonarqube-quality-gate-action@master
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
pollingTimeoutSec: 600
scanMetadataReportFile: build/sonar/report-task.txt
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
distribution: temurin
java-version: "17"
cache: gradle

- name: Cleanup
if: always()
- name: Run CI validation
run: |
rm .env
rm -rf build
docker system prune -af --volumes
shell: bash
chmod +x gradlew
./gradlew clean build --no-daemon
Loading