Skip to content

Commit

Permalink
feat: #10 Secure Key Manager 인증서를 포함하여 빌드하도록 파이프라인 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
woody35545 authored Apr 15, 2024
1 parent d746c15 commit 33ecb76
Showing 1 changed file with 6 additions and 35 deletions.
41 changes: 6 additions & 35 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Java CI with Maven
name: CI-CD
on:
push:
branches: [ "master" , "develop"]
pull_request:
branches: [ "master" , " develop"]

jobs:
build:
Expand All @@ -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

0 comments on commit 33ecb76

Please sign in to comment.