From 5bce756ab7238316a55e020e564e125416c5033f Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sat, 22 Feb 2025 14:00:02 +0900 Subject: [PATCH 01/26] =?UTF-8?q?=F0=9F=99=88=20gitfix=20:=20.gitignore=20?= =?UTF-8?q?=EC=88=98=EC=A0=95.=20-=20application-deploy.yml=20-=20applicat?= =?UTF-8?q?ion-local.yml=20-=20docker-compose.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index cf7451b..836c99c 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,9 @@ out/ ### Application Setting File ### application.properties -application.yml \ No newline at end of file +application.yml +application-deploy.yml +application-local.yml + +### Docker ### +docker-compose.yml \ No newline at end of file From d54d441b1a74c08493ae037403fda551408d9fc3 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sat, 22 Feb 2025 16:46:08 +0900 Subject: [PATCH 02/26] =?UTF-8?q?=E2=9C=A8=20feat=20:=20=EB=8F=84=EC=BB=A4?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a9a9f73 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17.0.1-jdk-slim +VOLUME /tmp +COPY ./build/libs/28delivery-0.0.1-SNAPSHOT.jar app.jar +ENTRYPOINT ["java", "-jar", "/app.jar"] \ No newline at end of file From 7b3423e72b1bc2b7e6e29f9fa8a4ed486d8571a0 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 00:34:43 +0900 Subject: [PATCH 03/26] =?UTF-8?q?=E2=9C=A8=20feat=20:=20CI/CD=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=20=EA=B5=AC=EB=8F=99=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=8B=9C?= =?UTF-8?q?=EC=9E=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 81 ++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..dc42986 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,81 @@ +name: backend + +on: + push: + branches: + - release + pull_request: + branches: + - dev + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 # 체크아웃으로 깃허브에서 코드 가져오기 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 # 자바 버전 및 JDK 세팅 + with: + java-version: 17 # 17버전 + distribution: 'zulu' # Zulu 사용 + + - name: Grant execute permission for gradlew # 권한으로 인해 넣었던 걸로 기억. 테스트 필요 + run: chmod +x gradlew + + - name: Build with Gradle # 체크아웃한 코드들을 기반으로 그래들 빌드 + run: ./gradlew build + + - name: where is jar? # build/libs 경로 안에 jar 파일이 존재하는지 디버깅하는 step + run: ls -R build/libs + + - name: upload jar # build 한 .jar 파일을 artifact 에 보관하여 다음 job 으로 넘겨줌 + uses: actions/upload-artifact@v3 + with: + name: jar-artifact + path: build/libs/Eleven-Book-shelf-0.0.1-SNAPSHOT.jar + + docker_build_and_push: + needs: build-and-test + runs-on: ubuntu-latest # 여기서 아키텍쳐와 버전을 지정했기 때문에 도커 빌드할때 플랫폼 지정하지 않아도 자동으로 AMD 아키텍쳐로 이미지 파일 빌드를 수행함 + steps: + - name: Download jar # 아티팩트에 업로드한 jar 파일을 다운로드 + uses: actions/download-artifact@v3 + with: + name: jar-artifact + + - name: jar is here? + run: ls + + - name: Log in to Docker Hub + run: echo ${{ secrets.DOCKER_PASSWORD_C }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME_C }} --password-stdin + + - name: Build and push Docker images + run: | + BUILD_VERSION=$((GITHUB_RUN_NUMBER % 10)) + MAJOR_VERSION=$((GITHUB_RUN_NUMBER / 10 + 1)) + FULL_VERSION=v${MAJOR_VERSION}.${BUILD_VERSION} + echo "Docker image version: ${FULL_VERSION}" + docker build -t ${{ secrets.DOCKER_HUB_USERNAME_C }}/${{ secrets.DOCKER_HUB_REPOSITORY_C }}:${FULL_VERSION} . + docker tag ${{ secrets.DOCKER_HUB_USERNAME_C }}/${{ secrets.DOCKER_HUB_REPOSITORY_C }}:${FULL_VERSION} ${{ secrets.DOCKER_HUB_USERNAME_C }}/${{ secrets.DOCKER_HUB_REPOSITORY_C }}:latest + docker push ${{ secrets.DOCKER_HUB_USERNAME_C }}/${{ secrets.DOCKER_HUB_REPOSITORY_C }}:${FULL_VERSION} + docker push ${{ secrets.DOCKER_HUB_USERNAME_C }}/${{ secrets.DOCKER_HUB_REPOSITORY_C }}:latest + + deploy: + runs-on: ubuntu-latest + needs: docker_build_and_push + + steps: + - name: Deploy to server + uses: appleboy/ssh-action@v1.2.1 + with: + host: ${{ secrets.SERVER_HOST_C }} + username: ${{ secrets.SERVER_USERNAME }} + key: ${{ secrets.SERVER_SSH_KEY_C }} + port: 22 + script: | + sudo docker compose down + sudo docker compose pull + sudo docker compose up -d + sudo docker image prune -f \ No newline at end of file From aff46a5664f90d6b14292556123f74e1160db07f Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 00:37:00 +0900 Subject: [PATCH 04/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20=EA=B9=83?= =?UTF-8?q?=ED=97=88=EB=B8=8C=20=EC=95=A1=EC=85=98=20=EC=95=84=ED=8B=B0?= =?UTF-8?q?=ED=8C=A9=ED=8A=B8=20=EB=B2=84=EC=A0=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dc42986..d397904 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,7 +31,7 @@ jobs: run: ls -R build/libs - name: upload jar # build 한 .jar 파일을 artifact 에 보관하여 다음 job 으로 넘겨줌 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jar-artifact path: build/libs/Eleven-Book-shelf-0.0.1-SNAPSHOT.jar @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-latest # 여기서 아키텍쳐와 버전을 지정했기 때문에 도커 빌드할때 플랫폼 지정하지 않아도 자동으로 AMD 아키텍쳐로 이미지 파일 빌드를 수행함 steps: - name: Download jar # 아티팩트에 업로드한 jar 파일을 다운로드 - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jar-artifact From a2de14a383b2b4c6102f693b25a45dfee469fbb8 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 00:42:54 +0900 Subject: [PATCH 05/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20application.yml?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=20=EC=8B=9C=ED=81=AC=EB=A6=BF=EC=97=90=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=ED=9B=84=20=EB=B0=9B=EC=95=84=EC=98=A4?= =?UTF-8?q?=EA=B8=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d397904..18e2c03 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,6 +24,11 @@ jobs: - name: Grant execute permission for gradlew # 권한으로 인해 넣었던 걸로 기억. 테스트 필요 run: chmod +x gradlew + - name: add application-yml + run: | + echo "${{ secrets.APP_YML }}" > src/main/resources/application.yml + + - name: Build with Gradle # 체크아웃한 코드들을 기반으로 그래들 빌드 run: ./gradlew build From 2f9d0e8ff7e2839dfd9145b5061675a6ecb91182 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 00:47:02 +0900 Subject: [PATCH 06/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20application.yml?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=20=EC=B6=94=EA=B0=80=EB=A5=BC=20=EC=9C=84?= =?UTF-8?q?=ED=95=B4=20=EB=B9=88=20=EB=94=94=EB=A0=89=ED=86=A0=EB=A6=AC=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 18e2c03..c1bf2c1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,7 +24,10 @@ jobs: - name: Grant execute permission for gradlew # 권한으로 인해 넣었던 걸로 기억. 테스트 필요 run: chmod +x gradlew - - name: add application-yml + - name: Create resource directory # 디렉토리 루트 생성 + run: mkdir -p src/main/resources + + - name: add application-yml # yml파일 추가 run: | echo "${{ secrets.APP_YML }}" > src/main/resources/application.yml From de3f01d64232381615e6752e0bf7a283fa4ab121 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 00:54:58 +0900 Subject: [PATCH 07/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20application.yml?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=EC=97=90=20=ED=99=98=EA=B2=BD=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EC=B6=94=EA=B0=80=EB=A5=BC=20=EC=9C=84=ED=95=B4=20?= =?UTF-8?q?ENV=5FFILE=20=EC=8B=9C=ED=81=AC=EB=A6=BF=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c1bf2c1..5fe4b13 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,6 +31,9 @@ jobs: run: | echo "${{ secrets.APP_YML }}" > src/main/resources/application.yml + - name: Create .env file + run: | + echo "${{ secrets.ENV_FILE }}" > .env - name: Build with Gradle # 체크아웃한 코드들을 기반으로 그래들 빌드 run: ./gradlew build From bdcec71e3ed31e946a6728f81b76930cfaed6132 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 01:12:16 +0900 Subject: [PATCH 08/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=EC=8B=9C=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=A0=9C?= =?UTF-8?q?=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5fe4b13..739ac18 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -36,7 +36,7 @@ jobs: echo "${{ secrets.ENV_FILE }}" > .env - name: Build with Gradle # 체크아웃한 코드들을 기반으로 그래들 빌드 - run: ./gradlew build + run: ./gradlew build -x test - name: where is jar? # build/libs 경로 안에 jar 파일이 존재하는지 디버깅하는 step run: ls -R build/libs From f717423930e8fa5aff22a67a436cb0463f64c82e Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 01:22:55 +0900 Subject: [PATCH 09/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20jar=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EB=84=A4=EC=9E=84=20=ED=99=95=EC=9D=B8=20=ED=9B=84?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 739ac18..27bb7da 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -45,7 +45,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: jar-artifact - path: build/libs/Eleven-Book-shelf-0.0.1-SNAPSHOT.jar + path: build/libs/28delivery-0.0.1-SNAPSHOT.jar docker_build_and_push: needs: build-and-test From 8b7fa3bc3a44ebdd22c86f57467533f7843bd0f1 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 01:42:14 +0900 Subject: [PATCH 10/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20=EB=8F=84?= =?UTF-8?q?=EC=BB=A4=20=ED=8C=8C=EC=9D=BC=20=EB=AA=BB=EC=B0=BE=EB=8A=94=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=EB=B0=9C=EC=83=9D.=20=EC=9C=84=EC=B9=98?= =?UTF-8?q?=20=EC=B0=BE=EB=8A=94=20=EB=94=94=EB=B2=84=EA=B9=85=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 27bb7da..1ef4b5e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -62,6 +62,11 @@ jobs: - name: Log in to Docker Hub run: echo ${{ secrets.DOCKER_PASSWORD_C }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME_C }} --password-stdin + - name: Check files + run: | + pwd + ls -al + - name: Build and push Docker images run: | BUILD_VERSION=$((GITHUB_RUN_NUMBER % 10)) From e70f7795a05514232b86e5045a29c6279a2ea43e Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 01:56:15 +0900 Subject: [PATCH 11/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20=EB=8F=84?= =?UTF-8?q?=EC=BB=A4=20=ED=8C=8C=EC=9D=BC=20=EB=AA=BB=EC=B0=BE=EB=8A=94=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=EB=B0=9C=EC=83=9D.=20=EC=9C=84=EC=B9=98?= =?UTF-8?q?=20=EC=B0=BE=EB=8A=94=20=EB=94=94=EB=B2=84=EA=B9=85=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80=20=EB=94=94=EB=B2=84=EA=B9=85=20?= =?UTF-8?q?=EB=A0=88=EB=B2=A8=20=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1ef4b5e..bd4ea00 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -66,6 +66,7 @@ jobs: run: | pwd ls -al + find . -name Dockerfile - name: Build and push Docker images run: | From bdcaeab2e37304958d604f13317fc09f73cda594 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 02:00:32 +0900 Subject: [PATCH 12/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=EC=95=84=EC=9B=83=20=EB=AC=B8=EC=A0=9C=EC=9D=B8=20?= =?UTF-8?q?=EA=B2=83=EC=9C=BC=EB=A1=9C=20=EC=98=88=EC=83=81=EB=90=98?= =?UTF-8?q?=EA=B8=B0=EC=97=90=20=EC=B2=B4=ED=81=AC=EC=95=84=EC=9B=83=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=8A=A4=ED=85=9D=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bd4ea00..faa32c4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -51,6 +51,9 @@ jobs: needs: build-and-test runs-on: ubuntu-latest # 여기서 아키텍쳐와 버전을 지정했기 때문에 도커 빌드할때 플랫폼 지정하지 않아도 자동으로 AMD 아키텍쳐로 이미지 파일 빌드를 수행함 steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Download jar # 아티팩트에 업로드한 jar 파일을 다운로드 uses: actions/download-artifact@v4 with: From c4380fd63b39c74a3b9ec14f39159ac7e5b62812 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 02:04:40 +0900 Subject: [PATCH 13/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20=EB=8F=84?= =?UTF-8?q?=EC=BB=A4=ED=8C=8C=EC=9D=BC=20=EA=B2=BD=EB=A1=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a9a9f73..37380d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ FROM openjdk:17.0.1-jdk-slim VOLUME /tmp -COPY ./build/libs/28delivery-0.0.1-SNAPSHOT.jar app.jar +COPY ./28delivery-0.0.1-SNAPSHOT.jar app.jar ENTRYPOINT ["java", "-jar", "/app.jar"] \ No newline at end of file From 865d7cb74b115ca10a5f2e9f7d8380c307f6af62 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 18:06:17 +0900 Subject: [PATCH 14/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=EC=8B=9C=20env=20=ED=8C=8C=EC=9D=BC=20=ED=95=84?= =?UTF-8?q?=EC=88=98=20=EC=97=AC=EB=B6=80=20=EA=B2=80=EC=A6=9D=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index faa32c4..54b41f0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,10 +31,6 @@ jobs: run: | echo "${{ secrets.APP_YML }}" > src/main/resources/application.yml - - name: Create .env file - run: | - echo "${{ secrets.ENV_FILE }}" > .env - - name: Build with Gradle # 체크아웃한 코드들을 기반으로 그래들 빌드 run: ./gradlew build -x test From 86933baf80039c2ec68688e057c9230dc056a9f3 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 19:38:47 +0900 Subject: [PATCH 15/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20yml=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=B6=94=EA=B0=80=20=EB=8B=A8=EA=B3=84=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=97=90=EB=9F=AC=EA=B0=80=20=EB=B0=9C=EC=83=9D?= =?UTF-8?q?=ED=95=98=EB=8A=94=EC=A7=80=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 54b41f0..cde50ae 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,11 +29,21 @@ jobs: - name: add application-yml # yml파일 추가 run: | - echo "${{ secrets.APP_YML }}" > src/main/resources/application.yml + echo "${{ secrets.APP_YML }}" > ./src/main/resources/application.yml + + - name: add application-yml + run: | + echo "${{ secrets.APP_YML }}" > ./src/main/resources/application.yml + echo "==== application.yml 내용 확인 ====" + cat src/main/resources/application.yml - name: Build with Gradle # 체크아웃한 코드들을 기반으로 그래들 빌드 run: ./gradlew build -x test + - name: Check resources + run: | + ls -R build/resources/main + - name: where is jar? # build/libs 경로 안에 jar 파일이 존재하는지 디버깅하는 step run: ls -R build/libs From f1748fa0abf8336901432fa41e40720b5c4d176f Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 19:48:15 +0900 Subject: [PATCH 16/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20yml=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=9C=84=EC=B9=98=20=EC=A7=80=EC=A0=95=20=EB=B0=8F?= =?UTF-8?q?=20=EC=A7=81=EC=A0=91=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cde50ae..e7ffb78 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,11 +24,10 @@ jobs: - name: Grant execute permission for gradlew # 권한으로 인해 넣었던 걸로 기억. 테스트 필요 run: chmod +x gradlew - - name: Create resource directory # 디렉토리 루트 생성 - run: mkdir -p src/main/resources - - name: add application-yml # yml파일 추가 run: | + mkdir -p ./src/main/resources + touch ./src/main/resources/application.yml echo "${{ secrets.APP_YML }}" > ./src/main/resources/application.yml - name: add application-yml From 7c043f6f63def3c464b831f7bf765fd10188a08c Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 20:20:41 +0900 Subject: [PATCH 17/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20yml=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=9D=B8=EC=BD=94=EB=94=A9=20=ED=9B=84=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e7ffb78..1e40c5e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,7 +28,8 @@ jobs: run: | mkdir -p ./src/main/resources touch ./src/main/resources/application.yml - echo "${{ secrets.APP_YML }}" > ./src/main/resources/application.yml + echo "${{ secrets.APP_YML_BASE64 }}" | base64 --decode > ./src/main/resources/application.yml + find src - name: add application-yml run: | From 90d2ac5fb33b964c1af6b92c1a1da15ff49c54ea Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 20:33:56 +0900 Subject: [PATCH 18/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20yml=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=ED=94=8C=EB=A0=88=EC=9D=B4=EC=8A=A4=20=ED=99=80?= =?UTF-8?q?=EB=8D=94=20=EC=A1=B4=EC=9E=AC=20=EC=97=AC=EB=B6=80=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1e40c5e..ec2fd2f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,21 +24,33 @@ jobs: - name: Grant execute permission for gradlew # 권한으로 인해 넣었던 걸로 기억. 테스트 필요 run: chmod +x gradlew - - name: add application-yml # yml파일 추가 + - name: add application-yml # yml 경로 및 파일 추가 run: | mkdir -p ./src/main/resources touch ./src/main/resources/application.yml echo "${{ secrets.APP_YML_BASE64 }}" | base64 --decode > ./src/main/resources/application.yml find src - - name: add application-yml + - name: + Debug: check placeholders in APP_YML_BASE64 + run: | + echo "${{ secrets.APP_YML }}" > checkfile.yml + + echo "===== Checking whether JWT_EXP, JWT_KEY 등이 들어있는지 =====" + grep -n 'jwt:' checkfile.yml || true + grep -n 'expiration: ${JWT_EXP}' checkfile.yml || true + grep -n 'secret:' checkfile.yml || true + + echo "===== Checking done. =====" + + - name: check application-yml # yml 내용 확인 run: | echo "${{ secrets.APP_YML }}" > ./src/main/resources/application.yml echo "==== application.yml 내용 확인 ====" cat src/main/resources/application.yml - name: Build with Gradle # 체크아웃한 코드들을 기반으로 그래들 빌드 - run: ./gradlew build -x test + run: ./gradlew build - name: Check resources run: | From 950e0e1f077bb40fef3b3b95464d968e0bddca19 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 20:35:24 +0900 Subject: [PATCH 19/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20yml=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=ED=94=8C=EB=A0=88=EC=9D=B4=EC=8A=A4=20=ED=99=80?= =?UTF-8?q?=EB=8D=94=20=EC=A1=B4=EC=9E=AC=20=EC=97=AC=EB=B6=80=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ec2fd2f..0fca93c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,7 +30,7 @@ jobs: touch ./src/main/resources/application.yml echo "${{ secrets.APP_YML_BASE64 }}" | base64 --decode > ./src/main/resources/application.yml find src - + - name: Debug: check placeholders in APP_YML_BASE64 run: | From 27b1c51bf52fb506f295e2f8e8e239f353d0a8ba Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 20:59:35 +0900 Subject: [PATCH 20/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20yml=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=ED=94=8C=EB=A0=88=EC=9D=B4=EC=8A=A4=20=ED=99=80?= =?UTF-8?q?=EB=8D=94=20=EC=A1=B4=EC=9E=AC=20=EC=97=AC=EB=B6=80=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=B6=94=EA=B0=80=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0fca93c..91172f1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,9 +30,8 @@ jobs: touch ./src/main/resources/application.yml echo "${{ secrets.APP_YML_BASE64 }}" | base64 --decode > ./src/main/resources/application.yml find src - - - name: - Debug: check placeholders in APP_YML_BASE64 + + - name: check placeholders in APP_YML run: | echo "${{ secrets.APP_YML }}" > checkfile.yml From 3dcced1372f39d90811b4a8d85dd17752ad81afd Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 21:43:35 +0900 Subject: [PATCH 21/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20yml=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20properties=20=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 91172f1..cdbf482 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,29 +27,12 @@ jobs: - name: add application-yml # yml 경로 및 파일 추가 run: | mkdir -p ./src/main/resources - touch ./src/main/resources/application.yml - echo "${{ secrets.APP_YML_BASE64 }}" | base64 --decode > ./src/main/resources/application.yml + touch ./src/main/resources/application.properties + echo "${{ secrets.APP_PROPERTIES }}" > ./src/main/resources/application.properties find src - - name: check placeholders in APP_YML - run: | - echo "${{ secrets.APP_YML }}" > checkfile.yml - - echo "===== Checking whether JWT_EXP, JWT_KEY 등이 들어있는지 =====" - grep -n 'jwt:' checkfile.yml || true - grep -n 'expiration: ${JWT_EXP}' checkfile.yml || true - grep -n 'secret:' checkfile.yml || true - - echo "===== Checking done. =====" - - - name: check application-yml # yml 내용 확인 - run: | - echo "${{ secrets.APP_YML }}" > ./src/main/resources/application.yml - echo "==== application.yml 내용 확인 ====" - cat src/main/resources/application.yml - - name: Build with Gradle # 체크아웃한 코드들을 기반으로 그래들 빌드 - run: ./gradlew build + run: ./gradlew build -x test - name: Check resources run: | From 52b4c711552ad43bdd8ddcd5f2f39d7d601e7d8f Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 22:24:57 +0900 Subject: [PATCH 22/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20=ED=94=8C?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=8A=A4=20=ED=99=80=EB=8D=94=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cdbf482..ebd7abe 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,15 +24,16 @@ jobs: - name: Grant execute permission for gradlew # 권한으로 인해 넣었던 걸로 기억. 테스트 필요 run: chmod +x gradlew - - name: add application-yml # yml 경로 및 파일 추가 + - name: add application-yml run: | mkdir -p ./src/main/resources - touch ./src/main/resources/application.properties - echo "${{ secrets.APP_PROPERTIES }}" > ./src/main/resources/application.properties + cat << 'EOF' > ./src/main/resources/application.yml + $(echo "${{ secrets.APP_YML }}") + EOF find src - name: Build with Gradle # 체크아웃한 코드들을 기반으로 그래들 빌드 - run: ./gradlew build -x test + run: ./gradlew build - name: Check resources run: | From 83800c2f9dd42a5ee0f6079d621211f78c4c4f73 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 22:26:44 +0900 Subject: [PATCH 23/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ebd7abe..995abc7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,7 +33,7 @@ jobs: find src - name: Build with Gradle # 체크아웃한 코드들을 기반으로 그래들 빌드 - run: ./gradlew build + run: ./gradlew build -x test - name: Check resources run: | From 1121b7263b5c7a982d907f6a6492d9cdaaeef416 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 22:42:47 +0900 Subject: [PATCH 24/26] =?UTF-8?q?=F0=9F=A9=B9fix=20:=20eof=20=EC=9E=91?= =?UTF-8?q?=EC=9D=80=20=EB=94=B0=EC=98=B4=ED=91=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 995abc7..17f0b10 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,7 +27,7 @@ jobs: - name: add application-yml run: | mkdir -p ./src/main/resources - cat << 'EOF' > ./src/main/resources/application.yml + cat << EOF > ./src/main/resources/application.yml $(echo "${{ secrets.APP_YML }}") EOF find src From 110952a08fba001eaf0e9108044546dbbf0655ff Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 22:50:45 +0900 Subject: [PATCH 25/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20echo=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=20=ED=9B=84=20=EC=8B=9C=EB=8F=84.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 17f0b10..f494a37 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,7 +28,7 @@ jobs: run: | mkdir -p ./src/main/resources cat << EOF > ./src/main/resources/application.yml - $(echo "${{ secrets.APP_YML }}") + ${{ secrets.APP_YML }} EOF find src From a5659e25a756377f9b0d51689ef6951333fd7c41 Mon Sep 17 00:00:00 2001 From: Imnotcoderdude Date: Sun, 23 Feb 2025 22:54:23 +0900 Subject: [PATCH 26/26] =?UTF-8?q?=F0=9F=A9=B9=20fix=20:=20=EC=9E=91?= =?UTF-8?q?=EC=9D=80=20=EB=94=B0=EC=98=B4=ED=91=9C=20=EB=B6=99=EC=97=AC?= =?UTF-8?q?=EC=84=9C=20=EC=9E=AC=EC=8B=9C=EB=8F=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f494a37..a8e9662 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,7 +27,7 @@ jobs: - name: add application-yml run: | mkdir -p ./src/main/resources - cat << EOF > ./src/main/resources/application.yml + cat << 'EOF' > ./src/main/resources/application.yml ${{ secrets.APP_YML }} EOF find src