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

build(branching): sw-450 restructure, rename #956

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

cdcabrera
Copy link
Member

@cdcabrera cdcabrera commented Jul 18, 2022

What's included

  • build(branching): sw-450 restructure, rename
    • CONTRIBUTING, document branching, tags, release
    • custom_release, align release branching for travis
    • dependabot

Notes

  • @diegomaranhao
  • On QE approval the process will be as follows
    • ci branch will be renamed dev branch
    • main branch will stay the same
    • stage branch will be deleted
    • qa branch will be deleted
    • this PR will be merged into the main branch new prod branch (we've already created it) and the commit rebased across all remaining branches down to dev
    • and that will leave us with 2 branches, dev and main
  • @mirekdlugosz does default branch for this new process matter? we're considering making the new dev branch the default

How to test

Example

...

Updates issue/story

sw-450

@cdcabrera cdcabrera added platform Contains, or is, platform specific work and issues build 202208 project phase labels Jul 18, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jul 18, 2022

Codecov Report

Merging #956 (3d13c99) into prod (ea56c40) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             prod     #956      +/-   ##
==========================================
+ Coverage   93.92%   93.94%   +0.02%     
==========================================
  Files         129      129              
  Lines        4030     4030              
  Branches     1578     1578              
==========================================
+ Hits         3785     3786       +1     
+ Misses        227      226       -1     
  Partials       18       18              
Impacted Files Coverage Δ
src/common/helpers.js 100.00% <0.00%> (+1.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea56c40...3d13c99. Read the comment docs.

@cdcabrera cdcabrera force-pushed the sw-450 branch 3 times, most recently from 8b7d2ed to 3d13c99 Compare July 19, 2022 19:15
@cdcabrera
Copy link
Member Author

cdcabrera commented Jul 19, 2022

Ok @mirekdlugosz I think this aligns a bit more to a future where there may only be 2 branches, just dev and main. Hopefully this aligns to what you were thinking too...

It is fantastically minimal effort on the maintainer side of things, so I'm all for it since it automagically syncs most of the lower environments (mostly because we're using a single branch, main). We apparently had all the parts, just needed to rearrange them a little.

Basically

  • dev is where we develop, not necessarily going to be checked beyond unit tests, dev tests
  • main is where the automation is, and releases are controlled by tags at least until we're no longer using Travis (and we're reasonably sure it'll work based on Travis' logic)

I've outlined the process here

And the logic can be seen here... this is sort of testable by running the script directly ...just make sure you comment out lines 11 and 12. Went through a variety of combinations to confirm, happy path is below...

$ export TRAVIS_BRANCH="v2.5.0"; export TRAVIS_BUILD_STAGE_NAME="Stable"; export TRAVIS_COMMIT_MESSAGE="chore(release): hello world"; bash ./.travis/custom_release.sh

rm -rf "./${BUILD_DIR}/.git"
.travis/release.sh "${DEPLOY_BRANCH}"

@mirekdlugosz
Copy link
Collaborator

Agreed, that looks pretty simple. dev is automatically deployed to stage-beta, main follows dev and is deployed to stage-stable. Every now and then we add tag to somewhere in main to deploy that commit to prod-beta. To release to prod-stable we need both tag and specific commit message, which is probably stronger requirement than what I would have put, but I don't see it as something that needs to be changed.

I played with a script locally and it does seem to do what we expect to do, i.e. it won't accidentally release something to prod environments.

I think we can proceed with that. Once this is merged, I will create PR in app-interfaces repo, so pr_check script is taken from dev, and build script is taken from main.

@cdcabrera cdcabrera changed the base branch from prod to main July 21, 2022 00:00
* CONTRIBUTING, document branching, tags, release
* custom_release, align release branching for travis
* dependabot, align dev branch
@cdcabrera cdcabrera merged commit b424814 into RedHatInsights:main Jul 21, 2022
cdcabrera added a commit that referenced this pull request Jul 21, 2022
* build, rc npm script
* CONTRIBUTING, document branching, tags, release
* custom_release, travis, align release branching
* dependabot, align dev branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
202208 project phase build platform Contains, or is, platform specific work and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants