Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4881 OpenMRS should support Postgresql
  3. TRUNK-5960

Create a Bamboo CI plan to run liquibase change sets against PostgreSQL

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • Core 2.4.0
    • None
    • None
    • Medium

    Description

      In order to ensure that all the liquibase change sets run on PostgreSQL, as the development of OpenMRS core goes on, create a Bamboo CI plan to run liquibase change sets against PostgreSQL at https://ci.openmrs.org/browse/TRUNK-MASTER

      THE FOLLOWING JOB STRUCTURE WILL BE RUN AFTER THE INTEGRATION TESTS :

      1.DOCKER TASK - Task description - Pull PostgreSQL docker Image

      Command - Pull a Docker image from a Docker registry

      Registry - Docker Hub

      Repository - postgres:12


      2.SCRIPT TASK - Task description - PostgreSQL Container setup

      Interpreter - Shell

      Script location - Inline

      Script body - docker run --rm --name pg-docker -e POSTGRES_PASSWORD=docker -d -p 5433:5432 postgres


      3.MAVEN TASK- Task description - Liquibase Schema setup

      Goal ->  -f api/pom.xml org.liquibase:liquibase-maven-plugin:3.10.2:update -Dliquibase.url=jdbc:postgresql://localhost:5433/postgres -Dliquibase.changelogSchemaName=public -Dliquibase.username=postgres -Dliquibase.password=docker -Dliquibase.driver=org.postgresql.Driver -Dliquibase.changeLogFile=src/main/resources/org/openmrs/liquibase/snapshots/schema-only/liquibase-schema-only-2.3.x.xml -Djava.awt.headless=true -Dliquibase.promptOnNonLocalDatabase=false

      Build JDK - openjdk-8-jdk


      4.MAVEN TASK- Task description - Liquibase Core Data setup

      Goal -> -f api/pom.xml org.liquibase:liquibase-maven-plugin:3.10.2:update -Dliquibase.url=jdbc:postgresql://localhost:5433/postgres -Dliquibase.changelogSchemaName=public -Dliquibase.username=postgres -Dliquibase.password=docker -Dliquibase.driver=org.postgresql.Driver -Dliquibase.changeLogFile=src/main/resources/org/openmrs/liquibase/snapshots/core-data/liquibase-core-data-2.3.x.xml -Djava.awt.headless=true -Dliquibase.promptOnNonLocalDatabase=false

      Build JDK - openjdk-8-jdk


      5.MAVEN TASK- Task description - Liquibase Update To Latest setup

      Goal - -f api/pom.xml org.liquibase:liquibase-maven-plugin:3.10.2:update -Dliquibase.url=jdbc:postgresql://localhost:5433/postgres -Dliquibase.changelogSchemaName=public -Dliquibase.username=postgres -Dliquibase.password=docker -Dliquibase.driver=org.postgresql.Driver -Dliquibase.changeLogFile=src/main/resources/org/openmrs/liquibase/updates/liquibase-update-to-latest-2.4.x.xml -Djava.awt.headless=true -Dliquibase.promptOnNonLocalDatabase=false

      Build JDK - openjdk-8-jdk


      6.FINAL TASK (should be run even if above tasks fail)

      SCRIPT - docker stop pg-docker

      Gliffy Diagrams

        Attachments

          Activity

            People

              aman Aman Mishra
              aman Aman Mishra
              Daniel Kayiwa Daniel Kayiwa
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: