diff --git a/.github/workflows/backend-dev-unitest.yaml b/.github/workflows/backend-dev-unitest.yaml new file mode 100644 index 00000000..65c2558e --- /dev/null +++ b/.github/workflows/backend-dev-unitest.yaml @@ -0,0 +1,62 @@ +name: backend-dev-junittest + +on: + pull_request: + branches: + - "develop" + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./backend + steps: + - uses: actions/checkout@v2 + with: + ssh-key: ${{ secrets.PRIVATEREPO_SSHKEY }} + submodules: 'recursive' + + - name: copy springboot profile + run: | + cp ./src/main/resources/CIAT_private/springboot/application-test.yaml ./src/main/resources/application.yaml + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: test + run: | + gradle test + + - name: Discord Alert Success + uses: sarisia/actions-status-discord@v1 + if: success() + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + description: "๐ŸŽ‰ ํ…Œ์ŠคํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!" + + - name: Discord Alert Failure + uses: sarisia/actions-status-discord@v1 + if: failure() + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + description: "๐Ÿ”ฅ ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค." + + - name: Publish Unit Test Results + uses: EnricoMi/publish-unit-test-result-action@v1 + if: ${{ always() }} + with: + files: build/test-results/*/.xml + + - name: Cleanup Gradle Cache + # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. + # Restoring these files from a GitHub Actions cache might cause problems for future builds. + if: ${{ always() }} + run: | + rm -f ~/.gradle/caches/modules-2/modules-2.lock + rm -f ~/.gradle/caches/modules-2/gc.properties \ No newline at end of file diff --git a/.github/workflows/backend-dev.yaml b/.github/workflows/backend-dev.yaml new file mode 100644 index 00000000..bfe27e17 --- /dev/null +++ b/.github/workflows/backend-dev.yaml @@ -0,0 +1,122 @@ +name: backend-dev-CICD + +on: + push: + branches: + - "develop" + # ignore path + paths-ignore: + - ".github/workflows/backend-dev-unitest.yaml" + - ".github/workflows/backend-prd.yaml" + - ".github/workflows/frontend-**" + +env: + dockerimage_tag: ${{ github.sha }} + dockerimage_name: choisunguk/siat-dev-backend:${{ github.sha }} + +jobs: + build: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ./backend + + # 1. git submodule์„ ์ด์šฉํ•ด์„œ ์Šคํ”„๋ง๋ถ€ํŠธ ํ”„๋กœํŒŒ์ผ ๋ณต์‚ฌ + # 2. ์Šคํ”„๋ง๋ถ€ํŠธ ํ”„๋กœ์ ํŠธ ๋นŒ๋“œ + # 3. docker build + # 4. docker push + steps: + - uses: actions/checkout@v2 + with: + ssh-key: ${{ secrets.GITHUBACTION_KEY }} + submodules: 'recursive' + + - name: copy springboot profile + run: | + cp ./src/main/resources/CIAT_private/springboot/application-dev.yaml ./src/main/resources/application-dev.yaml + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + server-id: github + settings-path: ${{ github.workspace }} + + - name: gradle build + run: | + gradle clean build --exclude-task test + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: copy dockerfile + run: | + rm -rf ./Dockerfile + cp ./cicd/dev/Dockerfile ./Dockerfile + + - name: Build and push + id: docker_build + run: | + docker build -t ${{ env.dockerimage_name }} . + docker push ${{ env.dockerimage_name }} + + - name: Discord Alert Success + uses: sarisia/actions-status-discord@v1 + if: success() + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + description: "๐ŸŽ‰ ํ…Œ์ŠคํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!" + + - name: Discord Alert Failure + uses: sarisia/actions-status-discord@v1 + if: failure() + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + description: "๐Ÿ”ฅ ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค." + + - name: Cleanup Gradle Cache + # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. + # Restoring these files from a GitHub Actions cache might cause problems for future builds. + if: ${{ always() }} + run: | + rm -f ~/.gradle/caches/modules-2/modules-2.lock + rm -f ~/.gradle/caches/modules-2/gc.properties + + update-argocd-metadata: + needs: build + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ./dev/backend + + steps: + - uses: actions/checkout@v2 + with: + ref: "charts" + ssh-key: ${{ secrets.GITHUBACTION_KEY }} + submodules: 'recursive' + + - name: change values-dev.yaml + run: | + cat < values-dev.yaml + image: + tag: ${{ env.dockerimage_tag }} + EOF + + - name: git push + run: | + git config --global user.email "GitHub Actions Bot@github.com" + git config --global user.name "GitHub Actions Bot" + git add values-dev.yaml + git commit -m "change dockertag" + git pull origin charts + git push origin charts diff --git a/.github/workflows/backend-prd.yaml b/.github/workflows/backend-prd.yaml new file mode 100644 index 00000000..e76cef82 --- /dev/null +++ b/.github/workflows/backend-prd.yaml @@ -0,0 +1,121 @@ +# name: backend-prd-CICD + +# on: +# push: +# branches: +# - "prd" +# paths-ignore: +# - ".github/workflows/backend-dev-unitest.yaml" +# - ".github/workflows/backend-dev" +# - ".github/workflows/frontend-**" + +# env: +# dockerimage_tag: ${{ github.sha }} +# dockerimage_name: choisunguk/ciat-prd-backend:${{ github.sha }} + +# jobs: +# build: +# runs-on: ubuntu-latest + +# defaults: +# run: +# working-directory: ./backend + +# # 1. git submodule์„ ์ด์šฉํ•ด์„œ ์Šคํ”„๋ง๋ถ€ํŠธ ํ”„๋กœํŒŒ์ผ ๋ณต์‚ฌ +# # 2. ์Šคํ”„๋ง๋ถ€ํŠธ ํ”„๋กœ์ ํŠธ ๋นŒ๋“œ +# # 3. docker build +# # 4. docker push +# steps: +# - uses: actions/checkout@v2 +# with: +# ssh-key: ${{ secrets.GITHUBACTION_KEY }} +# submodules: 'recursive' + +# - name: copy springboot profile +# run: | +# cp ./src/main/resources/CIAT_private/springboot/application-prd.yaml ./src/main/resources/application-prd.yaml + +# - name: Set up JDK 11 +# uses: actions/setup-java@v2 +# with: +# java-version: '11' +# distribution: 'adopt' +# server-id: github +# settings-path: ${{ github.workspace }} + +# - name: gradle build +# run: | +# gradle clean build --exclude-task test + +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 + +# - name: Login to DockerHub +# uses: docker/login-action@v1 +# with: +# username: ${{ secrets.DOCKERHUB_USERNAME }} +# password: ${{ secrets.DOCKERHUB_TOKEN }} + +# - name: copy dockerfile +# run: | +# rm -rf ./Dockerfile +# cp ./cicd/prd/Dockerfile ./Dockerfile + +# - name: Build and push +# id: docker_build +# run: | +# docker build -t ${{ env.dockerimage_name }} . +# docker push ${{ env.dockerimage_name }} + +# - name: Discord Alert Success +# uses: sarisia/actions-status-discord@v1 +# if: success() +# with: +# webhook: ${{ secrets.DISCORD_WEBHOOK }} +# description: "๐ŸŽ‰ ํ…Œ์ŠคํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!" + +# - name: Discord Alert Failure +# uses: sarisia/actions-status-discord@v1 +# if: failure() +# with: +# webhook: ${{ secrets.DISCORD_WEBHOOK }} +# description: "๐Ÿ”ฅ ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค." + +# - name: Cleanup Gradle Cache +# # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. +# # Restoring these files from a GitHub Actions cache might cause problems for future builds. +# if: ${{ always() }} +# run: | +# rm -f ~/.gradle/caches/modules-2/modules-2.lock +# rm -f ~/.gradle/caches/modules-2/gc.properties + +# update-argocd-metadata: +# needs: build +# runs-on: ubuntu-latest + +# defaults: +# run: +# working-directory: ./prd/backend + +# steps: +# - uses: actions/checkout@v2 +# with: +# ref: "charts" +# ssh-key: ${{ secrets.GITHUBACTION_KEY }} +# submodules: 'recursive' + +# - name: change values-prd.yaml +# run: | +# cat < values-prd.yaml +# image: +# tag: ${{ env.dockerimage_tag }} +# EOF + +# - name: git push +# run: | +# git config --global user.email "GitHub Actions Bot@github.com" +# git config --global user.name "GitHub Actions Bot" +# git add values-prd.yaml +# git commit -m "change dockertag" +# git pull origin charts +# git push origin charts diff --git a/.github/workflows/gradle_test.yaml b/.github/workflows/gradle_test.yaml index dee9e5f8..5eec9d50 100644 --- a/.github/workflows/gradle_test.yaml +++ b/.github/workflows/gradle_test.yaml @@ -1,56 +1,56 @@ -name: Test +# name: Test -on: - pull_request: - branches: - - "master" +# on: +# pull_request: +# branches: +# - "master" -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./backend - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file +# jobs: +# build: +# runs-on: ubuntu-latest +# defaults: +# run: +# working-directory: ./backend +# steps: +# - uses: actions/checkout@v2 +# - name: Set up JDK 11 +# uses: actions/setup-java@v2 +# with: +# java-version: '11' +# distribution: 'adopt' +# server-id: github # Value of the distributionManagement/repository/id field of the pom.xml +# settings-path: ${{ github.workspace }} # location for the settings.xml file - - name: gradle test - run: | - export jasypt_password=${{ secrets.JASYPT_PASSWORD }} - gradle clean test +# - name: gradle test +# run: | +# export jasypt_password=${{ secrets.JASYPT_PASSWORD }} +# gradle clean test - - name: Discord Alert Success - uses: sarisia/actions-status-discord@v1 - if: success() - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - description: "๐ŸŽ‰ ํ…Œ์ŠคํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!" +# - name: Discord Alert Success +# uses: sarisia/actions-status-discord@v1 +# if: success() +# with: +# webhook: ${{ secrets.DISCORD_WEBHOOK }} +# description: "๐ŸŽ‰ ํ…Œ์ŠคํŠธ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!" - - name: Discord Alert Failure - uses: sarisia/actions-status-discord@v1 - if: failure() - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - description: "๐Ÿ”ฅ ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค." +# - name: Discord Alert Failure +# uses: sarisia/actions-status-discord@v1 +# if: failure() +# with: +# webhook: ${{ secrets.DISCORD_WEBHOOK }} +# description: "๐Ÿ”ฅ ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค." - - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 - if: ${{ always() }} - with: - files: build/test-results/*/.xml +# - name: Publish Unit Test Results +# uses: EnricoMi/publish-unit-test-result-action@v1 +# if: ${{ always() }} +# with: +# files: build/test-results/*/.xml - # ์ถ”๊ฐ€ - - name: Cleanup Gradle Cache - # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. - # Restoring these files from a GitHub Actions cache might cause problems for future builds. - if: ${{ always() }} - run: | - rm -f ~/.gradle/caches/modules-2/modules-2.lock - rm -f ~/.gradle/caches/modules-2/gc.properties \ No newline at end of file +# # ์ถ”๊ฐ€ +# - name: Cleanup Gradle Cache +# # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. +# # Restoring these files from a GitHub Actions cache might cause problems for future builds. +# if: ${{ always() }} +# run: | +# rm -f ~/.gradle/caches/modules-2/modules-2.lock +# rm -f ~/.gradle/caches/modules-2/gc.properties \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9e5b78a2..2871e117 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,17 @@ frontend/dist/* frontend/build frontend/build/* frontend/*.log -frontend/package-lock.json \ No newline at end of file +frontend/package-lock.json + +# backend +# springboot profiles +application.yml +application-dev.yml +application-prd.yml +application-test.yml +# springboot profiles +application.yaml +application-dev.yaml +application-prd.yaml +application-test.yaml + diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..29ad5681 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "CIAT_private"] + path = backend/src/main/resources/CIAT_private + url = git@github.com:INFP-Study/CIAT_private.git diff --git a/README.md b/README.md index 132db618..3d390dd7 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ ### ๊ฒŒ์ŠคํŠธ ๋กœ๊ทธ์ธ๐Ÿ”‘ ``` -id : -pw : +id : admin@ciat.com +pw : ciat1234! ``` diff --git a/backend/.gitignore b/backend/.gitignore index c2065bc2..1fcbd2e2 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -25,6 +25,9 @@ bin/ out/ !**/src/main/**/out/ !**/src/test/**/out/ +*.http +*.yml +*.yaml ### NetBeans ### /nbproject/private/ diff --git a/backend/Readme.md b/backend/Readme.md new file mode 100644 index 00000000..1f357ff6 --- /dev/null +++ b/backend/Readme.md @@ -0,0 +1,83 @@ +# ์‹คํ–‰ ์ค€๋น„ +* ์ด ํ”„๋กœ์ ํŠธ์—์„œ ์—ฐ๋™๋œ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์ •๋ณด ๋“ฑ ๋“ฑ๋ก์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. +* CIAT repo์— ๋“ฑ๋ก๋œ ๋ฉค๋ฒ„๋Š” git submodule์— ์ ‘๊ทผ์ •๋ณด๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. +```sh +git submodule update --init --recursive +``` + +## ์Šคํ”„๋ง๋ถ€ํŠธ ํ”„๋กœํŒŒ์ผ ํ…œํ”Œ๋ฆฟ +* ์ด ํ…œํ”Œ๋ฆฟ์€ ์™ธ๋ถ€์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•œ ์„ค๋ช…์ž…๋‹ˆ๋‹ค. +```yaml +server: + port: 9400 + servlet: + session: + cookie: + http-only: false + secure: false +jwt: + secret: + +logging: + level: + com: + infp: + ciat: debug + amazonaws: + util: + EC2MetadataUtils: error + +spring: + servlet: + multipart: + max-file-size: 2MB + max-request-size: 2MB + security: + oauth2: + client: + registration: + google: + client-id: + client-secret: + scope: + - profile + - email + datasource: + url: + driver-class-name: org.mariadb.jdbc.Driver + username: <๊ณ„์ •> + password: <๋น„๋ฐ€๋ฒˆํ˜ธ> + jpa: + open-in-view: false + generate-ddl: true + show-sql: true + hibernate: + ddl-auto: update + database-platform: org.hibernate.dialect.MariaDB103Dialect + +#๊ณต๊ณตํฌํƒˆ api service key, public url +nongsaro: + url: <๊ณต๊ณตํฌํƒˆ> + key: <๊ณต๊ณตํฌํ„ธ access key> + +cloud: + aws: + credentials: + accessKey: + secretKey: + s3: + bucket: + region: + static: + stack: + auto: false +``` + +# ์‹คํ–‰ +* JVM ์‹คํ–‰์ธ์ž ์„ค์ • +```sh +# aaws sdk ์„ค์ •: ec2๋ฉ”ํƒ€๋ฐ์ดํ„ฐ ๋น„ํ™œ์„ฑํ™” +-Dcom.amazonaws.sdk.disableEc2Metadata=true +``` diff --git a/backend/build.gradle b/backend/build.gradle index fb5d2f7b..c581b9b2 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -23,7 +23,6 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6' - implementation group: 'com.github.ulisesbocchio', name: 'jasypt-spring-boot-starter', version: '3.0.3' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' @@ -40,13 +39,10 @@ dependencies { testImplementation 'org.springframework.security:spring-security-test' implementation 'com.sun.xml.bind:jaxb1-impl:2.2.5.1' annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" - - implementation 'org.springframework.boot:spring-boot-starter-mail' - + implementation 'org.springframework.boot:spring-boot-starter-mail' } test { - environment "jasypt.encryptor.password", System.getenv("jasypt_password") useJUnitPlatform() } diff --git a/backend/cicd/dev/Jenkinsfile b/backend/cicd/dev/Jenkinsfile deleted file mode 100644 index 25a90fad..00000000 --- a/backend/cicd/dev/Jenkinsfile +++ /dev/null @@ -1,61 +0,0 @@ -pipeline { - agent any - tools {gradle "gradle"} - - environment { - APP_NAME = "ciat-backend-dev" - NAMESPACE = "infp" - DOCKER_IMAGE = "ciat-dev-backend" - TAG = "${BUILD_NUMBER}" - DOCKER_IMAGENAME = "${DOCKER_IMAGE}:${TAG}" - JASYPT_KEY = credentials('SIAT_DEV_JASYPT') - MODE = "dev" - TLS_SECRETNAME = "ciat-dev" - INGRESS_HOST1 = "ciat-dev.choicloudlab.com" - } - - stages { - stage('project build'){ - steps{ - dir('backend'){ - withGradle { - sh 'gradle clean build --exclude-task test' - } - } - } - } - stage('docker build&push'){ - steps{ - dir('backend'){ - sh 'rm -rf ./Dockerfile Jenkinsfile charts' - sh 'cp -rf cicd/dev/* ./' - withCredentials([string(credentialsId: 'dockerID', variable: 'dockerID')]) { - script{ - sh 'docker build -t ${dockerID}/${DOCKER_IMAGENAME} .' - // ๋น„์šฉ๋ฌธ์ œ๋กœ ์ฃผ์„ - // withCredentials([usernamePassword(credentialsId: 'docker', passwordVariable: 'dockerpassword', usernameVariable: 'dockeruser')]) { - // sh 'docker login -u ${dockeruser} -p ${dockerpassword}' - // sh 'docker push ${dockerID}/${DOCKER_IMAGENAME}' - // } - } - } - } - } - } - stage('deploy'){ - steps{ - dir('backend'){ - withCredentials([string(credentialsId: 'dockerID', variable: 'dockerID')]) { - sh 'sed -i "s/__IMAGENAME__/${dockerID}\\/${DOCKER_IMAGE}/g" charts/values.yaml' - sh 'sed -i "s/__TAGNAME__/${TAG}/g" charts/values.yaml' - sh 'sed -i "s/__JASYPT__/${JASYPT_KEY}/g" charts/values.yaml' - sh 'sed -i "s/__MODE__/${MODE}/g" charts/values.yaml' - sh 'sed -i "s/__HOST1__/${INGRESS_HOST1}/g" charts/values.yaml' - sh 'sed -i "s/__TLS__SECRETNAME__/${TLS_SECRETNAME}/g" charts/values.yaml' - sh "helm upgrade --install --namespace ${NAMESPACE} ${APP_NAME} ./charts" - } - } - } - } - } -} diff --git a/backend/cicd/dev/charts/.helmignore b/backend/cicd/dev/charts/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/backend/cicd/dev/charts/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/backend/cicd/dev/charts/Chart.yaml b/backend/cicd/dev/charts/Chart.yaml deleted file mode 100644 index 76c5db78..00000000 --- a/backend/cicd/dev/charts/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: alpha -description: SIAT dev -type: application -version: 0.1.0 -appVersion: "0.1.0" diff --git a/backend/cicd/dev/charts/override_values.yaml b/backend/cicd/dev/charts/override_values.yaml new file mode 100644 index 00000000..c11a4ddc --- /dev/null +++ b/backend/cicd/dev/charts/override_values.yaml @@ -0,0 +1,2 @@ +image: + tag: 4ecdd67bd9014076a05787c142575e5770913a36 diff --git a/backend/cicd/dev/charts/templates/NOTES.txt b/backend/cicd/dev/charts/templates/NOTES.txt deleted file mode 100644 index 97dd3a9b..00000000 --- a/backend/cicd/dev/charts/templates/NOTES.txt +++ /dev/null @@ -1,22 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "charts.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "charts.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "charts.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "charts.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} diff --git a/backend/cicd/dev/charts/templates/_helpers.tpl b/backend/cicd/dev/charts/templates/_helpers.tpl deleted file mode 100644 index 68f9e0e2..00000000 --- a/backend/cicd/dev/charts/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "charts.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "charts.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "charts.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "charts.labels" -}} -helm.sh/chart: {{ include "charts.chart" . }} -{{ include "charts.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "charts.selectorLabels" -}} -app.kubernetes.io/name: {{ include "charts.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "charts.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "charts.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/backend/cicd/dev/charts/templates/deployment.yaml b/backend/cicd/dev/charts/templates/deployment.yaml deleted file mode 100644 index 311ecfb2..00000000 --- a/backend/cicd/dev/charts/templates/deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "charts.fullname" . }} - labels: - {{- include "charts.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "charts.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "charts.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "charts.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 9400 - protocol: TCP - env: - - name: JAVA_OPTS - value: -Djasypt.encryptor.password={{ .Values.application.secret.jasypt }} -Dspring.profiles.active={{ .Values.application.mode }} -Dcom.amazonaws.sdk.disableEc2Metadata=true - livenessProbe: - httpGet: - path: /healthcheck - port: http - initialDelaySeconds: 60 - periodSeconds: 60 - readinessProbe: - httpGet: - path: /healthcheck - port: http - initialDelaySeconds: 60 - periodSeconds: 60 - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/backend/cicd/dev/charts/templates/hpa.yaml b/backend/cicd/dev/charts/templates/hpa.yaml deleted file mode 100644 index 7138f1d4..00000000 --- a/backend/cicd/dev/charts/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "charts.fullname" . }} - labels: - {{- include "charts.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "charts.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/backend/cicd/dev/charts/templates/ingress.yaml b/backend/cicd/dev/charts/templates/ingress.yaml deleted file mode 100644 index cc6b59f4..00000000 --- a/backend/cicd/dev/charts/templates/ingress.yaml +++ /dev/null @@ -1,56 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "charts.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "charts.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if .Values.ingress.ingressClassName }} - ingressClassName: {{ .Values.ingress.ingressClassName }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/backend/cicd/dev/charts/templates/service.yaml b/backend/cicd/dev/charts/templates/service.yaml deleted file mode 100644 index 451653ca..00000000 --- a/backend/cicd/dev/charts/templates/service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "charts.fullname" . }} - labels: - {{- include "charts.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: {{ .Values.service.targetPort }} - protocol: TCP - name: http -{{- if .Values.service.nodePort }} - nodePort: {{ .Values.service.nodePort }} -{{- end }} - selector: - {{- include "charts.selectorLabels" . | nindent 4 }} diff --git a/backend/cicd/dev/charts/templates/serviceaccount.yaml b/backend/cicd/dev/charts/templates/serviceaccount.yaml deleted file mode 100644 index 9397ca79..00000000 --- a/backend/cicd/dev/charts/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "charts.serviceAccountName" . }} - labels: - {{- include "charts.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/backend/cicd/dev/charts/templates/tests/test-connection.yaml b/backend/cicd/dev/charts/templates/tests/test-connection.yaml deleted file mode 100644 index f482848d..00000000 --- a/backend/cicd/dev/charts/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "charts.fullname" . }}-test-connection" - labels: - {{- include "charts.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "charts.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/backend/cicd/dev/charts/values.yaml b/backend/cicd/dev/charts/values.yaml deleted file mode 100644 index 18f37cfb..00000000 --- a/backend/cicd/dev/charts/values.yaml +++ /dev/null @@ -1,67 +0,0 @@ -replicaCount: 1 - -image: - repository: __IMAGENAME__ - pullPolicy: IfNotPresent - tag: __TAGNAME__ - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - create: false - annotations: {} - name: "" - -podAnnotations: {} -podSecurityContext: {} -securityContext: {} - -service: - type: NodePort - port: 9400 - targetPort: 9400 - nodePort: 30501 - -ingress: - enabled: true - ingressClassName: "nginx" - annotations: - cert-manager.io/cluster-issuer: "letencrypt-prod" - certmanager.k8s.io/acme-challenge-type: dns01 - hosts: - - host: __HOST1__ - paths: - - path: /api/v1 - pathType: Prefix - tls: - - secretName: __TLS__SECRETNAME__ - hosts: - - __HOST1__ - -resources: - limits: - cpu: 300m - memory: 512Mi - requests: - cpu: 300m - memory: 512Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -application: - secret: - jasypt: __JASYPT__ - mode: __MODE__ diff --git a/backend/cicd/prd/Dockerfile b/backend/cicd/prd/Dockerfile new file mode 100644 index 00000000..e75e92f8 --- /dev/null +++ b/backend/cicd/prd/Dockerfile @@ -0,0 +1,4 @@ +FROM adoptopenjdk/openjdk11:ubi +ARG JAR_FILE=build/libs/*-SNAPSHOT.jar +COPY ${JAR_FILE} app.jar +ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar /app.jar"] \ No newline at end of file diff --git a/backend/src/main/java/com/infp/ciat/config/JasyptConfig.java b/backend/src/main/java/com/infp/ciat/config/JasyptConfig.java deleted file mode 100644 index c09dc92a..00000000 --- a/backend/src/main/java/com/infp/ciat/config/JasyptConfig.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.infp.ciat.config; - -import org.jasypt.encryption.StringEncryptor; -import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; -import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class JasyptConfig { - @Bean("jasyptStringEncryptor") - public StringEncryptor stringEncryptor() { - PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor(); - SimpleStringPBEConfig config = new SimpleStringPBEConfig(); - config.setPassword(System.getProperty("jasypt.encryptor.password")); - config.setAlgorithm("PBEWITHHMACSHA512ANDAES_256"); - config.setKeyObtentionIterations("1000"); - config.setPoolSize("1"); - config.setProviderName("SunJCE"); - config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator"); - config.setIvGeneratorClassName("org.jasypt.iv.RandomIvGenerator"); - config.setStringOutputType("base64"); - encryptor.setConfig(config); - - return encryptor; - } -} \ No newline at end of file diff --git a/backend/src/main/java/com/infp/ciat/config/cors/webconfigDev.java b/backend/src/main/java/com/infp/ciat/config/cors/webconfigDev.java index 39625825..d0c20b3a 100644 --- a/backend/src/main/java/com/infp/ciat/config/cors/webconfigDev.java +++ b/backend/src/main/java/com/infp/ciat/config/cors/webconfigDev.java @@ -20,7 +20,6 @@ public void addCorsMappings(CorsRegistry registry) { "https://ciat.choicloudlab.com", "https://smtp.naver.com", "https://smtp.naver.com:465" - ) .allowedMethods("*"); } diff --git a/backend/src/main/java/com/infp/ciat/user/controller/AccountController.java b/backend/src/main/java/com/infp/ciat/user/controller/AccountController.java index 45c5ce0c..7834a9ac 100644 --- a/backend/src/main/java/com/infp/ciat/user/controller/AccountController.java +++ b/backend/src/main/java/com/infp/ciat/user/controller/AccountController.java @@ -4,6 +4,7 @@ import com.infp.ciat.user.controller.dto.request.ResetPasswordRequestDTO; import com.infp.ciat.user.controller.dto.request.SignupRequestDTO; import com.infp.ciat.user.controller.dto.response.LoginSuccessResponse; +import com.infp.ciat.user.controller.dto.response.ResetPasswordResponse; import com.infp.ciat.user.controller.dto.response.SignUpResponse; import com.infp.ciat.user.service.AccountService; import lombok.RequiredArgsConstructor; diff --git a/backend/src/main/java/com/infp/ciat/user/controller/dto/response/ResetPasswordResponse.java b/backend/src/main/java/com/infp/ciat/user/controller/dto/response/ResetPasswordResponse.java new file mode 100644 index 00000000..a8608419 --- /dev/null +++ b/backend/src/main/java/com/infp/ciat/user/controller/dto/response/ResetPasswordResponse.java @@ -0,0 +1,20 @@ +package com.infp.ciat.user.controller.dto.response; + +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@NoArgsConstructor +@Getter +public class ResetPasswordResponse { + + private String email; + + private String originCode; + + @Builder + public ResetPasswordResponse(String email, String originCode) { + this.email = email; + this.originCode = originCode; + } +} diff --git a/backend/src/main/resources/CIAT_private b/backend/src/main/resources/CIAT_private new file mode 160000 index 00000000..71a3bcaa --- /dev/null +++ b/backend/src/main/resources/CIAT_private @@ -0,0 +1 @@ +Subproject commit 71a3bcaab2cdf722326ea8e8eb10273a0f8e6ad5 diff --git a/backend/src/main/resources/application-test.yml b/backend/src/main/resources/application-test.yml deleted file mode 100644 index 561d319b..00000000 --- a/backend/src/main/resources/application-test.yml +++ /dev/null @@ -1,57 +0,0 @@ -spring: - security: - oauth2: - client: - # registration - registration: - # google oauth2 setting - google: - client-id: ENC(yOSSFYzdF6BFvb+VhuwrUUvnEwhdYJQhPAt7O+I9CP/fGWq0EjmEwnYXmz7Yu/QyS9kwLcV4TyTVvnikUI4PKr+eEk1AUVMKNayFLTnIKA8f4KnP82cNsbQKaM/DN2N7Taw0LJHl4CMP8+QBBRI0JA==) - client-secret: ENC(n093NQezyIRURhvV7DI/t5NrG5WL9f/ks4NkKhEew6X+GBEpCuzW4syxqsRYO3jkqYELcDNz2xPUz3X9Dzp3yW2WLLp8k0Hq5rGyyhTgl5I=) - scope: - - profile - - email - # github oauth2 setting - github: - client-id: ENC(avR1sIiT2FjiEV8Gfc9VsnDj64R1Z76CsfJUkbWraReGvQPXBo27UKP6Pm3rhs18EgqNtD7b2Xm5IwezPSkprA==) - client-secret: ENC(6h5LvXhqQHUPBD6JqnwzNRlFlfA0g4tjqgP0cPxOUUiVBYIylACHiBS++qICPA2pAzubXiXMDxXkwj7GRz6Dofsz2utfQ/YNrlVNsAOYhTE=) - datasource: - url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE - driver-class-name: org.h2.Driver - username: sa - password: - jpa: - database-platform: org.hibernate.dialect.H2Dialect - show-sql: true - properties: - hibernate: - format_sql: true - ddl-auto: create -jwt: - secret: ENC(1MBsToCDbYBEvJkfxlSkoBb30kG1MYPqYOcyUcKZOhnodcSkYMncHeTYNyKr0GfYocr9yI3G1cR6DJHykIZTpQ==) - -logging: - level: - com: - infp: - ciat: debug - amazonaws: - util: - EC2MetadataUtils: error - -#๊ณต๊ณตํฌํƒˆ api service key, public url -nongsaro: - url: http://api.nongsaro.go.kr/service/garden/ - key: ENC(53HGLcuFthBpODy/ksdZzUFiyznV5LG4QhgoFUlZvtIMUEU1Mc7Pwtvqd+h8wDidfZmt+aQLx/jmrpM+u7ZUhg==) - -cloud: - aws: - credentials: - accessKey: ENC(qnoRD48Vb/ynF7VFZA8jn3sH8Pf8F3EMLCuHAwFA5yM+dtFiXPANaTQqO/pBxlM+IFp3yDJsVZYJ25EnB8xJVw==) - secretKey: ENC(vkgcPsB5+80n3xZIS5v3NDUP+zphtLKkOJtRU5Jne7dc3+hjp03xoKMS0gCPipYo3CFsf4d2U6DPO+8WEtHayPdLL6nLsF2lBoDDlTVnboY=) - s3: - bucket: ENC(qiCvK88VEfG/jiQV5q16VvdMW1Suru/f5cmfa53G+inOx1hDi+S+NUAXJCkZuTyq) - region: - static: ap-northeast-2 - stack: - auto: false diff --git a/backend/src/test/java/com/infp/ciat/CiatApplicationTests.java b/backend/src/test/java/com/infp/ciat/CiatApplicationTests.java index a76c7aca..25d7f805 100644 --- a/backend/src/test/java/com/infp/ciat/CiatApplicationTests.java +++ b/backend/src/test/java/com/infp/ciat/CiatApplicationTests.java @@ -1,6 +1,5 @@ package com.infp.ciat; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; @@ -13,10 +12,4 @@ class CiatApplicationTests { void contextLoads() { } - @BeforeAll - public static void beforeAll() { - String jasypt_password = System.getenv("jasypt.encryptor.password"); - System.setProperty("jasypt.encryptor.password", jasypt_password); - } - } diff --git a/backend/src/test/java/com/infp/ciat/category/service/MenuServiceTest.java b/backend/src/test/java/com/infp/ciat/category/service/MenuServiceTest.java index 7476607a..e971d928 100644 --- a/backend/src/test/java/com/infp/ciat/category/service/MenuServiceTest.java +++ b/backend/src/test/java/com/infp/ciat/category/service/MenuServiceTest.java @@ -37,11 +37,11 @@ public class MenuServiceTest { @Autowired private MenuRepository menuRepository; - @BeforeAll - public static void beforeAll() { - String jasypt_password = System.getenv("jasypt.encryptor.password"); - System.setProperty("jasypt.encryptor.password", jasypt_password); - } +// @BeforeAll +// public static void beforeAll() { +// String jasypt_password = System.getenv("jasypt.encryptor.password"); +// System.setProperty("jasypt.encryptor.password", jasypt_password); +// } @BeforeEach void createAccount() { diff --git a/backend/src/test/java/com/infp/ciat/user/controller/AccountControllerTest.java b/backend/src/test/java/com/infp/ciat/user/controller/AccountControllerTest.java index f59ec721..f3f6a74f 100644 --- a/backend/src/test/java/com/infp/ciat/user/controller/AccountControllerTest.java +++ b/backend/src/test/java/com/infp/ciat/user/controller/AccountControllerTest.java @@ -55,12 +55,6 @@ public void setUp() { .build(); } - @BeforeAll - public static void beforeAll() { - String jasypt_password = System.getenv("jasypt.encryptor.password"); - System.setProperty("jasypt.encryptor.password", jasypt_password); - } - @Test // @WithMockUser(roles = "USER") public void signup() throws Exception { diff --git a/backend/src/test/java/com/infp/ciat/user/service/AccountServiceTest.java b/backend/src/test/java/com/infp/ciat/user/service/AccountServiceTest.java index 47a9d094..b2b288c9 100644 --- a/backend/src/test/java/com/infp/ciat/user/service/AccountServiceTest.java +++ b/backend/src/test/java/com/infp/ciat/user/service/AccountServiceTest.java @@ -30,11 +30,11 @@ class AccountServiceTest { @Autowired PasswordEncoder passwordEncoder; - @BeforeAll - public static void beforeAll() { - String jasypt_password = System.getenv("jasypt.encryptor.password"); - System.setProperty("jasypt.encryptor.password", jasypt_password); - } +// @BeforeAll +// public static void beforeAll() { +// String jasypt_password = System.getenv("jasypt.encryptor.password"); +// System.setProperty("jasypt.encryptor.password", jasypt_password); +// } @AfterEach public void aftereach() {