From 2c8b4c9a09d63f4d5c1d3abb3ab79356bcf9dddd Mon Sep 17 00:00:00 2001 From: Hanbin Lee Date: Sun, 12 Mar 2023 18:57:09 +0900 Subject: [PATCH] =?UTF-8?q?[#33]=20fix:=20jenkinsfile,=20flyway=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=EB=82=B4=EC=9A=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile-service | 2 +- README.md | 16 ++++++++++++---- db/flyway.conf | 7 ++++++- script/db_migration.sh | 1 - 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile-service b/Jenkinsfile-service index a123785..69976e8 100644 --- a/Jenkinsfile-service +++ b/Jenkinsfile-service @@ -25,7 +25,7 @@ pipeline { commandLineArgs: "-configFiles=${FLYWAY_CONFIG}", credentialsId: 'ecb29499-7272-4e8b-b3ab-a7a3ab7eafab', url: '', - locations: "${WORKSPACE}/db/migration" + locations: "filesystem:${WORKSPACE}/db/migration" } } diff --git a/README.md b/README.md index da551bb..c3b38a1 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,18 @@
## Specification -- java 17 -- kotlin 1.6.21 -- Spring Boot 2.7.0 -- MySQL 8.0.21 +- Lang + - java 17 + - kotlin 1.6.21 +- Framework + - Spring Boot 2.7.0 +- DB + - MySQL 8.0.21 + - Flyway(migration) +- CI/CD + - Jenkins +- Cloud Server + - AWS Lightsail(Amazon Linux2)
diff --git a/db/flyway.conf b/db/flyway.conf index 1af2acc..621000e 100644 --- a/db/flyway.conf +++ b/db/flyway.conf @@ -2,4 +2,9 @@ flyway.url=jdbc:mysql://localhost:3306/dongne?autoreconnect=true&characterEncodi flyway.user=root flyway.password=beaniejoy flyway.driver=com.mysql.cj.jdbc.Driver -flyway.locations=filesystem:db/migration,db/seed \ No newline at end of file +flyway.locations=filesystem:db/migration,db/seed + +flyway.baselineOnMigrate=true +flyway.baselineVersion=000 +flyway.ignoreMigrationPatterns=*:pending +flyway.cleanDisabled=false \ No newline at end of file diff --git a/script/db_migration.sh b/script/db_migration.sh index c43b2d4..6ba1373 100644 --- a/script/db_migration.sh +++ b/script/db_migration.sh @@ -8,4 +8,3 @@ echo "================ 2. Flyway Validate ============" echo "================ 3. Flyway Migrate =============" ./gradlew :db:flywayMigrate -Dconfig=$1 -