From 33ecb761bdbb758c5cdfed0a7cae50407ff06b3b Mon Sep 17 00:00:00 2001 From: Woody_K Date: Mon, 15 Apr 2024 16:48:49 +0900 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20#10=20Secure=20Key=20Manager=20?= =?UTF-8?q?=EC=9D=B8=EC=A6=9D=EC=84=9C=EB=A5=BC=20=ED=8F=AC=ED=95=A8?= =?UTF-8?q?=ED=95=98=EC=97=AC=20=EB=B9=8C=EB=93=9C=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=ED=8C=8C=EC=9D=B4=ED=94=84=EB=9D=BC=EC=9D=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/maven.yml | 41 ++++++------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 89dbf5a..9e365ab 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,9 +1,7 @@ -name: Java CI with Maven +name: CI-CD on: push: branches: [ "master" , "develop"] - pull_request: - branches: [ "master" , " develop"] jobs: build: @@ -12,35 +10,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --file pom.xml - - - name : upload file - uses: appleboy/scp-action@master - with: - host: ${{ secrets.SSH_IP }} - username: ${{ secrets.SSH_ID }} - key: ${{ secrets.SSH_KEY }} - port: ${{ secrets.SSH_PORT }} - source: "target/*.jar" - target: "~/" - rm: false - - - name: execute shell script - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.SSH_IP }} - username: ${{ secrets.SSH_ID }} - key: ${{ secrets.SSH_KEY }} - port: ${{ secrets.SSH_PORT }} - script_stop: true - script: "./startup.sh" - - - name : Run SonarQube - run : mvn sonar:sonar -Dsonar.projectKey=github-action -Dsonar.host.url=${{secrets.SONAR_HOST}} -Dsonar.login=${{secrets.SONAR_TOKEN}} + - name: Prepare secure key manager certKey file + run: | + echo ${{ secrets.SECURE_KEY_MANAGER_CERT_KEY }} > t3team-skm-cert.txt + mkdir src/main/resources/key + base64 -d t3team-skm-cert.txt > src/main/resources/key/t3team-skm-cert.p12 From f85105119e908f87488b0b29661b69654fe1af9a Mon Sep 17 00:00:00 2001 From: Woody_K Date: Mon, 15 Apr 2024 16:49:36 +0900 Subject: [PATCH 2/5] =?UTF-8?q?modify:=20#10=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EB=A5=BC=20=EC=9C=84=ED=95=B4=20=EC=A1=B0=EA=B1=B4=EC=97=90=20?= =?UTF-8?q?`feature/ci-cd`=20=EB=B8=8C=EB=9E=9C=EC=B9=98=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9e365ab..400c903 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,7 +1,7 @@ name: CI-CD on: push: - branches: [ "master" , "develop"] + branches: [ "master" , "develop", "feature/ci-cd" ] jobs: build: From 86d14c3487a9035cc27f0580032031f2756f6801 Mon Sep 17 00:00:00 2001 From: Woody_K Date: Mon, 15 Apr 2024 16:53:30 +0900 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20#10=20=EB=B9=8C=EB=93=9C=EC=8B=9C?= =?UTF-8?q?=20=ED=95=84=EC=9A=94=ED=95=9C=20=ED=99=98=EA=B2=BD=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=ED=8F=AC=ED=95=A8=ED=95=98=EC=97=AC=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/maven.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 400c903..4cc7867 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,3 +15,13 @@ jobs: echo ${{ secrets.SECURE_KEY_MANAGER_CERT_KEY }} > t3team-skm-cert.txt mkdir src/main/resources/key base64 -d t3team-skm-cert.txt > src/main/resources/key/t3team-skm-cert.p12 + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + + - name: Build with Maven + run: mvn package ${{ secrets.MAVEN_PACKAGE_OPTIONS }} From 2f356a95a8f0f86882ca6f289559ed84595c66d8 Mon Sep 17 00:00:00 2001 From: Woody_K Date: Mon, 15 Apr 2024 16:55:46 +0900 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20#10=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=EA=B3=BC=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/maven.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 4cc7867..f497912 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -25,3 +25,24 @@ jobs: - name: Build with Maven run: mvn package ${{ secrets.MAVEN_PACKAGE_OPTIONS }} + + - name : upload file + uses: appleboy/scp-action@master + with: + host: ${{ secrets.SSH_IP }} + username: ${{ secrets.SSH_ID }} + key: ${{ secrets.SSH_KEY }} + port: ${{ secrets.SSH_PORT }} + source: "target/*.jar" + target: "~/" + rm: false + + - name: execute shell script + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SSH_IP }} + username: ${{ secrets.SSH_ID }} + key: ${{ secrets.SSH_KEY }} + port: ${{ secrets.SSH_PORT }} + script_stop: true + script: "./startup.sh" From 8d9b854dc2e7021f3e589536f12f5fc0a248a9e1 Mon Sep 17 00:00:00 2001 From: Woody_K Date: Mon, 15 Apr 2024 17:00:25 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=08style:=20=EC=BD=94=EB=93=9C=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/{maven.yml => cicd.yml} | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename .github/workflows/{maven.yml => cicd.yml} (90%) diff --git a/.github/workflows/maven.yml b/.github/workflows/cicd.yml similarity index 90% rename from .github/workflows/maven.yml rename to .github/workflows/cicd.yml index f497912..363efaa 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/cicd.yml @@ -1,11 +1,10 @@ name: CI-CD on: push: - branches: [ "master" , "develop", "feature/ci-cd" ] + branches: [ "master" , "develop" ] jobs: build: - runs-on: ubuntu-latest steps: @@ -26,7 +25,7 @@ jobs: - name: Build with Maven run: mvn package ${{ secrets.MAVEN_PACKAGE_OPTIONS }} - - name : upload file + - name : delivery uses: appleboy/scp-action@master with: host: ${{ secrets.SSH_IP }} @@ -37,7 +36,7 @@ jobs: target: "~/" rm: false - - name: execute shell script + - name: deploy uses: appleboy/ssh-action@master with: host: ${{ secrets.SSH_IP }}