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

chore(githubAction): add build workflow initial work for argocd move #15385

Merged
merged 4 commits into from
Dec 11, 2024

Conversation

Basma1912
Copy link
Contributor

One-line summary

  • I used an AI to write some of this code.

Significant changes and points to review

Issue / Bugzilla link

Testing

@pmac
Copy link
Member

pmac commented Dec 3, 2024

It looks fine to me. @stevejalim you mind taking a look?

@pmac pmac requested a review from stevejalim December 3, 2024 17:38
@Basma1912
Copy link
Contributor Author

I just added the prod runner to the workflow.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.06%. Comparing base (54584d8) to head (0bc6e90).
Report is 189 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15385      +/-   ##
==========================================
+ Coverage   78.66%   79.06%   +0.40%     
==========================================
  Files         156      160       +4     
  Lines        8165     8355     +190     
==========================================
+ Hits         6423     6606     +183     
- Misses       1742     1749       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@stevejalim stevejalim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+wc

Looks good to me - thanks @Basma1912 !

I have a couple of queries, all just to be sure I understand it

  1. Am I right that we'll be using eactly the same image for dev, stage and prod, just adding a new tag as we move from main -> stage -> prod?

Put another way, on a push to main, we'll get an image created and tagged with dev-abcd123, then when we push to stage, the image will already exist in GAR and will just have the stage-abcd123 tag added, and then a similar think for prod (with a different style of label). Is my take right? I just want to be sure that we can still be sure that the same container image used on dev/stage is what we ship to prod. (I think it will be)

  1. Am I right that there'll be an event/trigger set in ArgoCD to start running our integration tests against a particular environment once the rollout to that environment is complete?

Thanks for your work on this! ArgoCD seems great

@Basma1912
Copy link
Contributor Author

@stevejalim sorry I missed the mention , looking at this

push to main -> build an image for DEV env
push to run-integration-tests - > build an image for test env
push to stage - > build an image for stage
push tags - > build an image for prod

[ the above is what currently in place for bedrock ]

looking at the event router .. I don't have any context whether all the changes in main eventually get pushed to stage and finally got tagged and deployed to prod

if all branches are kept in sync .. then yes .. stage and dev will be running the same image .. [regardless the build process ran twice ]

if you want to change the current workflow .. and deploy to dev and stage when a push is done to the same branch .. we can do so .

hope this answers your question :)

@stevejalim
Copy link
Collaborator

if you want to change the current workflow

Oh, no need to change it - if we retain what we have now, that's great. Thanks!

jobs:
build_and_publish_public_images:
name: Build public Bedrock images and push to Docker hub
runs-on: [self-hosted, nonprod, prod, us-central1, bedrock]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this to run on both nonprod and prod? Or is there some case somewhere that puts the prod build on prod and nonprod on nonprod?

@Basma1912
Copy link
Contributor Author

you are right no need to include both .. since we are only using the workflow to build image .. I'll keep prod runner only ..is that ok?

@bkochendorfer
Copy link
Member

Yep sounds good

Signed-off-by: Basma1912 <[email protected]>
@Basma1912
Copy link
Contributor Author

@stevejalim when you can , please merge this request .. thank you

@stevejalim stevejalim merged commit 3061d26 into mozilla:main Dec 11, 2024
5 checks passed
@stevejalim
Copy link
Collaborator

@Basma1912 Done! 👍

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.

4 participants