Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebuild staging branches script #70

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Conversation

Charl1996
Copy link
Contributor

This PR adds the ability for developers to more easily track and rebuild the CommCare Analytics staging branch. At the moment it's very basic.

What's the process?

When you have a feature branch that you want to deploy to staging you should first add it to the scripts/staging.yml file under the branches section and run the command to rebuild the staging branch:

./scripts/rebuildstaging

Note that this will only rebuild the staging branch locally, so afterwards you need to push the staging branch and deploy CCA as we currently do - manually.

How does it work?

Dimagi maintains a pypi package called git-rebuild-branch which this PR is also using. This PR lists it as a dev dependency in the setup.py file, so in order to use it the developer must first run

pip install -e .[dev]

Furthermore, a rebuildingstaging bash script simply invokes the command, which in turns pulls the trunk (in this case master branch) and merge all the listed feature branches into it. All this happens on your local machine of course.

@Charl1996
Copy link
Contributor Author

Once this goes in I will notify everyone so we can make sure all current feature branch that should be on staging is in.

@kaapstorm
Copy link
Contributor

which in turns pulls the trunk (in this case master branch) and merge all the listed feature branches into it.

This had me a little confused. I think you mean, "which in turns pulls the trunk (in this case master branch), then creates a staging branch, and merges all the listed feature branches into staging."

@Charl1996
Copy link
Contributor Author

which in turns pulls the trunk (in this case master branch) and merge all the listed feature branches into it.

This had me a little confused. I think you mean, "which in turns pulls the trunk (in this case master branch), then creates a staging branch, and merges all the listed feature branches into staging."

Oh! Totally! You're 100% right, sorry for the confusion!

@Charl1996 Charl1996 merged commit 172bb13 into master Oct 22, 2024
3 checks passed
@Charl1996 Charl1996 deleted the track-and-build-staging-branch branch October 22, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants