Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github action 적용 #28

Open
wants to merge 75 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
73d9e0e
#25 github action test
kpeel5839 Mar 15, 2022
1ab9e53
#25 github actio test
kpeel5839 Mar 15, 2022
5bad231
#25 github action test
kpeel5839 Mar 15, 2022
7f27646
#25 github action test
kpeel5839 Mar 15, 2022
f565dde
#25 github action test
kpeel5839 Mar 15, 2022
f330770
#25 github action test
kpeel5839 Mar 15, 2022
a1ce788
#25 github action 실행 실패하는 gradle wrapper 지우고 진행
kpeel5839 Mar 15, 2022
c3dd163
#25 github action test 한번 더
kpeel5839 Mar 15, 2022
0c686f4
#25 github action test
kpeel5839 Mar 15, 2022
f8ed011
#25 github action test
kpeel5839 Mar 15, 2022
1999d8f
#25 github action test
kpeel5839 Mar 15, 2022
911c379
#25 github action test
kpeel5839 Mar 15, 2022
baf4138
#25 github action test
kpeel5839 Mar 15, 2022
d84e444
#25 github action test
kpeel5839 Mar 15, 2022
f1ae38a
#25 github action test
kpeel5839 Mar 15, 2022
2593374
#25 github action test
kpeel5839 Mar 15, 2022
1798926
#25 github action test
kpeel5839 Mar 15, 2022
6b05928
#25 github action test
kpeel5839 Mar 15, 2022
2cb4df3
#25 github action test
kpeel5839 Mar 15, 2022
f8a6038
#25 github action test
kpeel5839 Mar 15, 2022
34f2ae7
#25 github action test
kpeel5839 Mar 15, 2022
ffb5989
#25 github action test
kpeel5839 Mar 15, 2022
b26c45c
#25 github action test
kpeel5839 Mar 15, 2022
b2a828f
#25 github action test
kpeel5839 Mar 15, 2022
fe1cf8f
#25 github action test
kpeel5839 Mar 15, 2022
782fdd6
#25 github action test
kpeel5839 Mar 15, 2022
90f4293
#25 github action test
kpeel5839 Mar 15, 2022
d8676b3
#25 github action test
kpeel5839 Mar 15, 2022
1c1ef02
#25 github action test
kpeel5839 Mar 15, 2022
1bf7fd5
#25 github action test
kpeel5839 Mar 15, 2022
6fa50c5
#25 github action test
kpeel5839 Mar 15, 2022
8125edd
#25 github action test
kpeel5839 Mar 15, 2022
97bc9f1
#25 github action test
kpeel5839 Mar 15, 2022
db52518
#25 github action test
kpeel5839 Mar 15, 2022
dda5a13
#25 github action test
kpeel5839 Mar 15, 2022
862ae2b
#25 github action test
kpeel5839 Mar 15, 2022
23c748f
#25 github action test
kpeel5839 Mar 15, 2022
8b1d582
#25 github action test
kpeel5839 Mar 15, 2022
966744a
#25 github action test
kpeel5839 Mar 15, 2022
143c1f9
#25 github action test
kpeel5839 Mar 15, 2022
568cb63
#25 github action test
kpeel5839 Mar 15, 2022
3a89029
#25 github action test
kpeel5839 Mar 15, 2022
7cf40b7
#25 github action test
kpeel5839 Mar 15, 2022
aaccbe6
#25 github action test
kpeel5839 Mar 15, 2022
a96385c
#25 github action test
kpeel5839 Mar 15, 2022
468c440
#25 github action test
kpeel5839 Mar 15, 2022
474b7ea
#25 github action test
kpeel5839 Mar 15, 2022
6938865
#25 github action test
kpeel5839 Mar 15, 2022
994d1bc
#25 github action test
kpeel5839 Mar 15, 2022
8cc56bc
#25 github action test
kpeel5839 Mar 15, 2022
c4a45f7
#25 github action test
kpeel5839 Mar 15, 2022
edf9505
#25 github action test
kpeel5839 Mar 15, 2022
db03b46
#25 github action test
kpeel5839 Mar 15, 2022
f9f9903
#25 github action test
kpeel5839 Mar 15, 2022
341bd65
#25 github action test
kpeel5839 Mar 15, 2022
d71e43c
#25 github action test
kpeel5839 Mar 15, 2022
edef928
#25
kpeel5839 Mar 15, 2022
3394f05
#25
kpeel5839 Mar 15, 2022
e2111fd
#25
kpeel5839 Mar 15, 2022
d439b0c
#25g=
kpeel5839 Mar 15, 2022
c77f85b
#25
kpeel5839 Mar 15, 2022
8be8d21
#25
kpeel5839 Mar 16, 2022
c4f71ff
#25
kpeel5839 Mar 16, 2022
d85fbb1
#25
kpeel5839 Mar 16, 2022
35f1f02
#25
kpeel5839 Mar 16, 2022
5908652
#25
kpeel5839 Mar 16, 2022
c164d29
#25
kpeel5839 Mar 16, 2022
cd48d7f
#25
kpeel5839 Mar 16, 2022
a9382a2
#25
kpeel5839 Mar 16, 2022
436a096
#25
kpeel5839 Mar 16, 2022
2b54dca
#25
kpeel5839 Mar 16, 2022
b4f8040
#25
kpeel5839 Mar 16, 2022
91134ad
#25
kpeel5839 Mar 16, 2022
10707db
#25
kpeel5839 Mar 16, 2022
5ab71ee
#25
kpeel5839 Mar 17, 2022
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
Empty file.
6 changes: 6 additions & 0 deletions .github/workflows/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .github/workflows/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .github/workflows/.idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .github/workflows/.idea/workflows.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions .github/workflows/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions .github/workflows/main.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/pullRequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#name: Spring build gradle
#
#on:
# push:
# branches:
# - develop
#
# pull_request:
# branches:
# - main # pull request 시에 적용되는 branch 에다가 적용
#
#jobs:
# build:
# runs-on: ubuntu-latest
# env:
# working-directory: /home/runner/work/dogVelopersServer/dogVelopersServer/dogvelopers
# key: ${{ secrets.KEY }}
#
# steps:
# - uses: actions/checkout@v2
## - uses: mikepenz/action-junit-report@v2
#
# # 소스코드들은 11을 위주로 짰음
# - name: Set up Jdk 11
# uses: actions/setup-java@v1
# with:
# java-version: 11
#
# # Gradle wrapper 파일 실행 권한주기
# - name: Grant execute permission for gradlew
# run: chmod +x gradlew
# working-directory: ${{ env.working-directory }}
#
# # Gradle test를 실행한다
# - name: Test with Gradle
# run: ./gradlew test
# working-directory: ${{ env.working-directory }}
#
# # 테스트 후 Result를 보기위해 Publish Unit Test Results step 추가
# - name: Publish Unit Test Results
# uses: EnricoMi/publish-unit-test-result-action@v1
# if: ${{ always() }} # 테스트가 실패하여도 Report를 보기 위해 `always`로 설정
# with:
# files: dogvelopers/build/test-results/**/*.xml # junit report xml 을 가르킴
#
# - name: gradle build
# run: ./gradlew build
# working-directory: ${{ env.working-directory }}
#
# - name: send to aws
# run: scp -i ${{env.key}} ~/Desktop/dogvelopers.jar [email protected]:~/daemon
74 changes: 74 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Spring build gradle

on:
push:
branches:
- develop # 내가 평소에 PR 하기 전 작업하는 branch 에다가 적용


jobs:
build:
runs-on: ubuntu-latest
services: # 서비스할 목록들 (ex. Redis, Postgresql ...)
mysql: # 사용할 서비스 명
image: mysql:5.7
env: # 사용할 서비스의 환경설정
MYSQL_USER: dogvelopers
MYSQL_PASSWORD: dogs0209!!
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: PLAM
ports: # 열어줄 포트, 8080:3306 형태로도 가능
- 3306
env:
S3_BUCKET_NAME: dogveloper-build
# bucket name 변수 생성
working-directory: /home/runner/work/dogVelopersServer/dogVelopersServer/dogvelopers

steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
working-directory: ${{ env.working-directory }}

- name: Set S3
run: |
echo "${{secrets.APPLICATION_AWS}}" >> ./dogvelopers/src/main/resources/application-aws.yml
echo "${{secrets.APPLICATION_CREDTIALS}}" >> ./dogvelopers/src/main/resources/application-credentials.yml

- name: Set databases
run: |
mysql -u root -p \n
${{ env.MYSQL_PASSWORD }} \n
source /home/runner/work/dogVelopersServer/dogVelopersServer/dogveloper.sql
# - name: install MySql
# run: apt-get install mysql-server

# Gradle test를 실행한다
- name: Test with Gradle
run: ./gradlew test
working-directory: ${{ env.working-directory }}

- name: Build with Gradle
run: ./gradlew clean build
working-directory: ${{ env.working-directory }}

- name: Make zip file
run: zip -r ./$GITHUB_SHA.zip .
shell: bash
working-directory: ${{ env.working-directory }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Upload to S3
run: aws s3 cp --region ap-northeast-2 ./dogvelopers/$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$GITHUB_SHA.zip
146 changes: 2 additions & 144 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,144 +1,2 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
.idea/workspace.xml
appspec.yml

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
.idea/workspace.xml
appspec.yml
*.yml

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
.idea/workspace.xml
appspec.yml

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
*.yml

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
/src/main/resources/application.yml
/src/main/resources/application-aws.yml
/src/main/resources/application-credentials.yml
/.github/workflows/gradle.yml
/.gradle/
/gradle/
/.github/
/gradle/wrapper/
/.idea/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
/src/main/resources/application.yml
/src/main/resources/application-aws.yml
/src/main/resources/application-credentials.yml
/.github/workflows/gradle.yml
/.gradle/
/gradle/
/.github/
/gradle/wrapper/
/.idea/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
/src/main/resources/application.yml
/src/main/resources/application-aws.yml
/src/main/resources/application-credentials.yml
/.github/workflows/gradle.yml
/.gradle/
/gradle/
/.github/
/gradle/wrapper/
/.idea/
application-aws.yml
application-credentials.yml
Loading