Skip to content

Commit

Permalink
환경 변수 보호를 위한 서브 모듈 연결 (#125)
Browse files Browse the repository at this point in the history
* feat: 서브 모듈 추가

* feat: 서브 모듈 환경 설정

* fix: 실험을 위해 현재 브랜치로 CD 실행하도록 변경

* refactor: Dockerfile 경로 변경

* refactor: 실험을 위해 공백 푸시

* refactor: 실험을 성공 후 공백 다시 추가

* refactor: CD 브랜치 dev/BE로 변경

* refactor: CI/CD 파일명 변경
  • Loading branch information
shb03323 authored Jul 27, 2023
1 parent 8d2d732 commit aed6525
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.SUBMODULE_BE_TOKEN }}
submodules: true

- name: Set up JDK 17
uses: actions/setup-java@v3
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "backend/baton/secret"]
path = backend/baton/secret
url = https://github.com/2023-baton/sub-be.git
3 changes: 3 additions & 0 deletions backend/baton/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,6 @@ gradle-app.setting
*.hprof

# End of https://www.toptal.com/developers/gitignore/api/macos,java,gradle,intellij+all

src/main/resources/application-prod.yml
src/main/resources/application-dev.yml
2 changes: 1 addition & 1 deletion Dockerfile → backend/baton/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ WORKDIR /app

COPY ./build/libs/baton-0.0.1-SNAPSHOT.jar /app/baton.jar

CMD ["java", "-jar", "baton.jar"]
CMD ["java", "-jar", "-Dspring.profiles.active=dev", "baton.jar"]
8 changes: 8 additions & 0 deletions backend/baton/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ tasks.named('test') {
useJUnitPlatform()
}

processResources.dependsOn('copySecret')

tasks.register('copySecret', Copy) {
from './secret'
include 'application*.yml'
into 'src/main/resources'
}

tasks.named('asciidoctor') {
inputs.dir snippetsDir
dependsOn test
Expand Down
1 change: 1 addition & 0 deletions backend/baton/secret
Submodule secret added at 8ff341

0 comments on commit aed6525

Please sign in to comment.