-
Notifications
You must be signed in to change notification settings - Fork 4
4. CI CD
To simplify the process of development, releasing of software, and also keeping the agile development practices in mind, we have a CI/CD workflow intact with our repository which will enforce the automation of the whole deployment process. The workflow focuses on automating the software delivery process so that the team can easily deploy their code to production at any time without compromising on quality.
We have used Github Actions for building the CI/CD pipeline.
Deploying code to Development
- Update the READMe.md file if you are planning to create the release.-
- After merging the PR to the development branch.
- Wait for the workflow in Github Actions to finish.
- The deployment is handled by an auto-deployment script that runs every 15 minutes on the server.
- Once the workflow run is complete, wait for the script to execute, then force refresh your browser https://nmriumdev.nmrxiv.org/ after 15 minutes to verify the deployed code changes.
Please Note - Code cannot be pushed directly to development branch. For any code changes, you will have to make changes in a separate branch and create a pull request to the development branch, which will require all the checks/tests to pass and at least one approval from the reviewer before merging.
Deploying Code to Production
-
Before deploying to the
mainbranch, ensure your code has been tested and verified to work with nmrXiv in the Dev environment. -
If you are planning a release, update the
README.mdfile accordingly. -
Create a pull request from the development branch to the main branch. Merge the PR after all checks have passed and it has been approved by a reviewer.
-
Merging to the main branch triggers the release-please workflow in GitHub Actions, which will automatically create a release and generate a changelog based on conventional commits.
-
The
release-pleaseworkflow requires the e2e tests and lint checks to pass before it can create the release PR. -
Approve the release PR generated by the release-please action.
-
Once the PR is merged, wait a few minutes for the release to be finalized.
-
After the release is created, switch to the prod-helm-deploy branch locally:
git checkout prod-helm-deploy
-
Pull the latest changes from both
prod-helm-deployandmain, then merge them into theprod-helm-deploybranch. -
Push the updated commits back to the
prod-helm-deploybranch. -
Wait for the workflow to complete in GitHub Actions.
-
The deployment is handled by an auto-deployment script that runs every 15 minutes on the server.
-
Once the workflow run is complete, wait for the script to execute, then force refresh your browser https://nmrium.nmrxiv.org/ after 15 minutes to verify the deployed code changes.
Please Note - Deployment would be unsuccessful or incomplete if there is any failure in Github Action at any point of the above steps.