-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 95129a9
Showing
5,191 changed files
with
911,110 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# This workflow will build a Java project with Gradle | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
# Repo Action 페이지에 나타날 이름 | ||
name: Spring Boot & Gradle CI/CD & Docker Hub | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
NAME: goohoon # 계정 명 | ||
REPO: springboot-template # 레포 이름 | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Get Current Time | ||
uses: 1466587594/get-current-time@v2 | ||
id: current-time | ||
with: | ||
format: YYYY-MM-DDTHH:mm:ss | ||
utcOffset: "+09:00" # 기준이 UTC이기 때문에 한국시간인 KST를 맞추기 위해 +9시간 추가 | ||
|
||
- name: Print Current Time | ||
run: echo "Current Time=${{steps.current-time.outputs.formattedTime}}" # current-time 에서 지정한 포맷대로 현재 시간 출력 | ||
shell: bash | ||
|
||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
|
||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew clean build | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{secrets.DOCKERHUB_USERNAME}} | ||
password: ${{secrets.DOCKERHUB_TOKEN}} | ||
|
||
- name: build and release to DockerHub | ||
run: | | ||
docker build -t ${{env.REPO}} . | ||
docker tag $REPO:latest ${{env.NAME}}/${{env.REPO}}:latest | ||
docker push ${{env.NAME}}/${{env.REPO}}:latest | ||
- name: send custom message with args | ||
uses: appleboy/telegram-action@master | ||
with: | ||
to: ${{ secrets.TELEGRAM_TO_ID }} | ||
token: ${{ secrets.TELEGRAM_TOKEN }} | ||
args: ${{ github.actor }} 님의 소스 코드가 반영 됐습니다. ${{ github.event.head_commit.message }} | ||
|
||
|
||
deploy: | ||
needs: build | ||
name: Deploy | ||
runs-on: [ self-hosted, label-development ] | ||
steps: | ||
- name: deploy run | ||
run: | | ||
sh /home/ec2-user/sh/stop.sh | ||
sh /home/ec2-user/sh/start.sh | ||
sh /home/ec2-user/sh/health.sh | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
HELP.md | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### 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/ | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### VS Code ### | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#실행하기 위한 환경만 필요하면 jre, 개발까지면 jdk | ||
FROM openjdk:11-jre | ||
|
||
#컨테이너 안에 jar 파일은 app.jar 될꺼임 | ||
COPY build/libs/springboot-template.jar app.jar | ||
|
||
ENTRYPOINT ["java", "-jar", "app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '2.4.0' | ||
id 'io.spring.dependency-management' version '1.0.10.RELEASE' | ||
id "com.ewerk.gradle.plugins.querydsl" version "1.0.10" | ||
id 'java' | ||
} | ||
|
||
apply plugin: 'io.spring.dependency-management' | ||
apply plugin: "com.ewerk.gradle.plugins.querydsl" | ||
|
||
group = 'com.sloth' | ||
version = '0.0.1-SNAPSHOT' | ||
sourceCompatibility = '11' | ||
|
||
configurations { | ||
compileOnly { | ||
extendsFrom annotationProcessor | ||
} | ||
} | ||
|
||
bootJar{ | ||
archivesBaseName = 'sloth' | ||
archiveFileName = 'sloth.jar' | ||
archiveVersion = "0.0.1" | ||
} | ||
|
||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot-starter-actuator' | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
implementation 'org.springframework.boot:spring-boot-starter-security' | ||
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' | ||
implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' | ||
implementation 'org.springframework.session:spring-session-jdbc' | ||
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5' | ||
implementation 'com.querydsl:querydsl-jpa' | ||
implementation 'com.querydsl:querydsl-apt' | ||
implementation group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-java8time', version: '2.1.0.RELEASE' | ||
implementation "io.springfox:springfox-boot-starter:3.0.0" | ||
implementation group: 'com.github.ulisesbocchio', name: 'jasypt-spring-boot-starter', version: '3.0.3' | ||
implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.68' | ||
|
||
compile group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect', version: '2.4.1' | ||
compile group: 'org.modelmapper', name: 'modelmapper', version: '2.3.9' | ||
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13' | ||
compile group: 'com.navercorp.lucy', name: 'lucy-xss-servlet', version: '2.0.0' | ||
|
||
developmentOnly 'org.springframework.boot:spring-boot-devtools' | ||
runtimeOnly 'com.h2database:h2' | ||
testImplementation group: 'com.h2database', name: 'h2', version: '1.3.176' | ||
|
||
|
||
compileOnly 'org.projectlombok:lombok' | ||
annotationProcessor 'org.projectlombok:lombok' | ||
|
||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
testImplementation 'org.springframework.security:spring-security-test' | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
def querydslDir = "$buildDir/generated/querydsl" | ||
querydsl { | ||
library = "com.querydsl:querydsl-apt" | ||
jpa = true | ||
querydslSourcesDir = querydslDir | ||
} | ||
sourceSets { | ||
main { | ||
java { | ||
srcDirs = ['src/main/java', querydslDir] | ||
} | ||
} | ||
} | ||
compileQuerydsl{ | ||
options.annotationProcessorPath = configurations.querydsl | ||
} | ||
configurations { | ||
querydsl.extendsFrom compileClasspath | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.