openmrs-core icon indicating copy to clipboard operation
openmrs-core copied to clipboard

TRUNK-6058 : Create CI Process to create liquibase snapshots

Open ManojLL opened this issue 2 years ago • 12 comments

Description of what I changed

I write a script to automate the liquibase snapshot generating process

Issue I worked on

see https://issues.openmrs.org/browse/TRUNK-6058

Checklist: I completed these to help reviewers :)

  • [X] My IDE is configured to follow the code style of this project.

    No? Unsure? -> configure your IDE, format the code and add the changes with git add . && git commit --amend

  • [ ] I have added tests to cover my changes. (If you refactored existing code that was well tested you do not have to add tests)

    No? -> write tests and add them to this commit git add . && git commit --amend

  • [ ] I ran mvn clean package right before creating this pull request and added all formatting changes to my commit.

    No? -> execute above command

  • [ ] All new and existing tests passed.

    No? -> figure out why and add the fix to your commit. It is your responsibility to make sure your code works.

  • [X] My pull request is based on the latest changes of the master branch.

    No? Unsure? -> execute command git pull --rebase upstream master

ManojLL avatar Nov 30 '23 02:11 ManojLL

@dkayiwa @ibacher could you please review this work?

ManojLL avatar Nov 30 '23 02:11 ManojLL

@ManojLL as per this https://wiki.openmrs.org/display/docs/Pull+Request+Tips you need to transition the JIRA ticket state to indicate that you are waiting for review.

dkayiwa avatar Dec 01 '23 12:12 dkayiwa

Are you able to run this on our bamboo CI server?

dkayiwa avatar Dec 01 '23 12:12 dkayiwa

Are you able to run this on our bamboo CI server?

This has not integrate with CI process yet, I just need to review my work and then we can run this in CI process.

ManojLL avatar Dec 02 '23 05:12 ManojLL

How will you know that it works if you have not tested it out?

dkayiwa avatar Dec 02 '23 20:12 dkayiwa

@dkayiwa here are the steps to generate liquilbase snapshot automatically

  1. set ENV variable called OPENMRS_INSTALLATION_SCRIPT export OPENMRS_INSTALLATION_SCRIPT=<path to openmrs-core folder>/liquibase/scripts/installation.properties
  2. run the script, username and passowrd refer to a MySQL user: cd <path to openmrs-core folder> . liquibase/scripts/generate_liquibase_snapshots.sh <username> <password>

ManojLL avatar Dec 07 '23 04:12 ManojLL

Don't i need to set some sort of permissions to make the script an executable? Can we also avoid running the tests?

dkayiwa avatar Dec 07 '23 12:12 dkayiwa

Can we also avoid running the tests? yes we can , when make a release we run the tests so I think we do not need to run the test again in the script.

ManojLL avatar Dec 07 '23 19:12 ManojLL

So can you make the necessary changes?

dkayiwa avatar Dec 07 '23 23:12 dkayiwa

So can you make the necessary changes?

Update the script to generate snapshot without dropping the existing database.

ManojLL avatar Dec 08 '23 03:12 ManojLL

@ManojLL is this still Draft?

dkayiwa avatar Dec 08 '23 11:12 dkayiwa

tl;dr our action detected no activity on this PR and will close it in 30 days if the stale label is not removed.

OpenMRS welcomes your contribution! It means a lot to us that you want to contribute to equity in healthcare!

This PR has not seen any activity in the last 5 months. That is why we wanted to check whether you are still working on it or need assistance from our side. Please note that this is an automated message and we might very well be the reason why there has not been any activity lately. We certainly do not want to discourage you from contributing. We do need to be honest in that OpenMRS has limited resources for reviewing PRs.

If you do not have time to continue the work or have moved on you don’t need to do anything. We will automatically close the PR in 30 days. We hope to see you back soon :) If you would like to continue working on it or require help from us please remove the stale label and respond by commenting on the issue.

github-actions[bot] avatar Aug 04 '24 00:08 github-actions[bot]