Posts

Showing posts with the label TCP/IP

Setup Flyway,Postgres in Jenkins using Docker

Recently I was trying to setup Flyway on Jenkins for my db in Postgres. The required files can be found here https://github.com/gauravmatta/devops/tree/main/jenkins_flyway The basic files you will need will be  The configuration file in conf folder The sql files in the sql folder The pipeline file "jenkinsfile-2" Here is the sample configuration file flyway.url= jdbc:postgresql://localhost:5432/flyway flyway.user = postgres flyway.password = postgres flyway.schemas= flyway flyway.locations=filesystem:../sql flyway.driver=org.postgresql.Driver Create DB Credentials in Jenkins with ID  "db-creds" We are using this in our sample you may change it but be sure to change it in jenkins pipeline file too. Here is the sample jenkins pipeline file https://github.com/gauravmatta/devops/blob/main/jenkins_flyway/jenkinsfile-2 My postgres is installed on localhost so I am using "--network=host" in my docker command for example docker run --rm --networ...