Skip to content

volkotyk/sample-liquibase-maven

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Liquibase with Jenkins

Start local Docker containers:

Postgress

docker run --name=psql -U postgres -d postgres

PGAdmin

docker run -it --name=pgadmin -p 80:80 -e 'PGADMIN_DEFAULT_EMAIL=1@1.com' -e 'PGADMIN_DEFAULT_PASSWORD=Pass123' -d dpage/pgadmin4

Jenkins

docker build -t jenkins-dckr -f Dockerfile ./Jenkins
docker run --network external-api --name=jenkins-dckr -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock jenkins-dckr

Configure Jenkins pipeline:

Configure DB update with Jenkins pipeline file:

  • New Item
  • Pipeline
  • Pipeline script from CSM
  • Git
  • Repository URL

Configure DB update with Dockerfile file:

  • New Item
  • Freestyle project
  • Source Code Management
  • Git
  • Repository URL
  • Add build step
  • Execute shell
  • Command
docker build .

Q&A

Where are changelogs presented?

src/main/script/*

Liquibase config

src/main/resources/liquibase.properties

How to add new changes?

  1. Add new file with DB changes to src/main/script/
  2. Add URI of the new file to changelog-master.xml

Where can I add/delete/modified liquibase commands?

Three variants:

  • pom.xml -> build -> plugins -> plugin -> executions -> execution -> goals
  • Jenkinsfile -> pipeline -> stages -> stage -> steps ->
  • Dockerfile RUN mvn liquibase:newCommand

Depenedncies:

  • java
  • maven
  • System variable JAVA_HOME

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 98.8%
  • Shell 1.2%