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

Chore/config dev test yml #204

Merged
merged 5 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 18 additions & 22 deletions scripts/cd_dev_jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,43 @@ pipeline {
tools {
gradle 'gradle'
}


stages {
stage('GitHub') {

stage('Build and Run Redis Container') {
steps {
script {
sh 'docker run --name test_redis_docker -p 6379:6379 --network jenkins_default -d --rm redis:alpine'
}
}
}

stage('GitHub pull') {
steps {
checkout scmGit(
branches: [[name: 'dev']],
extensions: [submodule(parentCredentials: true, trackingSubmodules: true)],
userRemoteConfigs: [[credentialsId: 'git-account', url: 'https://github.com/Sal-Mal/salmal-be']]
userRemoteConfigs: [[credentialsId: 'git_account', url: 'https://github.com/Sal-Mal/salmal-be']]
)
}
}

stage('Build Gradle') {
steps {
sh "./gradlew clean bootJar"
}
}
stage('Build Docker Image') {
steps {
script {
dir('docker/') {
docker.build('tray1147/salmal')
}
}
sh "SPRING_PROFILES_ACTIVE=dev ./gradlew clean bootJar"
}
}

stage('Push Docker Image to Docker Hub') {
steps {
script {
docker.withRegistry('https://index.docker.io/v1/', DOCKER_HUB_ID) {
docker.image('tray117/salmal').push('latest')
docker.image('tray117/salmal').push('${BUILD_NUMBER}')
}
}
}
}
}

post {
success {
sh "docker stop test_redis_docker"
echo '์„ฑ๊ณต์ ์œผ๋กœ ์‚ด๋ง์„œ๋ฒ„ ๋„์ปค ์ด๋ฏธ์ง€๊ฐ€ ๋„์ปคํ—ˆ๋ธŒ๋กœ ํ‘ธ์‹œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.'
}
failure {
sh "docker stop test_redis_docker"
echo '์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.'
}

Expand Down
57 changes: 57 additions & 0 deletions src/test/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# DB

spring:
datasource:
url: jdbc:h2:mem:testdb;MODE=MYSQL
username: sa
password:
driver-class-name: org.h2.Driver
redis:
port: 6379
host: test_redis_docker

---
# JPA

spring:
jpa:
properties:
hibernate:
format_sql: true
show-sql: true
hibernate:
ddl-auto: create-drop

---
#JWT

jwt:
secret-key: secretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecret
access-token-expiry: 10800000 # 3์‹œ๊ฐ„(ms)
refresh-token-expiry: 1209600033 # 2์ฃผ

---
# AWS

cloud:
aws:
credentials:
access-key: access-key
secret-key: secret-key
region:
static: ap-northeast-2
stack:
auto: false
s3:
bucket-name: s3-bucket-name
bucket-path: xxx.bucketpath.com/


image:
path:
vote: vote
member: member

google:
fcm:
path : /cucumber/key/salmal-f12a4-firebase-adminsdk-gg0hz-e3c86da03f.json
12 changes: 0 additions & 12 deletions src/test/resources/cucumber/features/Test.feature

This file was deleted.

Loading