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

add nginx image and build #11480

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

add nginx image and build #11480

wants to merge 6 commits into from

Conversation

timothy-spencer
Copy link
Member

@timothy-spencer timothy-spencer commented Nov 7, 2024

🛠 Summary of changes

Added nginx image build for kubernetes.

This is to fix https://gitlab.login.gov/lg-team/mary/containerization-initiative/-/issues/85

@timothy-spencer timothy-spencer changed the title add nginx image and build WIP: add nginx image and build Nov 7, 2024
@timothy-spencer timothy-spencer changed the title WIP: add nginx image and build add nginx image and build Nov 8, 2024
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
BRANCH_TAGGING_STRING: '--destination ${ECR_REGISTRY}/identity-idp/nginx:main'
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
Copy link
Contributor

@mitchellhenke mitchellhenke Nov 12, 2024

Choose a reason for hiding this comment

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

Can we add a condition to not run the build on a PR if the relevant files haven't changed? It would still build on main right?

Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't that break reviewapps if a given idp image lacks a matching nginx image with the same tag?

Copy link
Member Author

Choose a reason for hiding this comment

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

We kinda do want it to get built even if there's no changes to the files, to make sure that we get the latest images and packages. This will help us from having security vulnerabilities if we keep building it regularly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, it would still get built on any change to main, which would be frequently enough for that?

Copy link
Contributor

Choose a reason for hiding this comment

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

the image tag for idp and nginx need to match exactly or the current deploy process will fail, not really a guarantee that the images exist otherwise or to know what the "current" is

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I see what you mean. Sorry, I thought you were saying only build on changes to the files while on main. I'm pretty sure that we can rig that up.

But it seems like we would want to build an nginx image on PRs too, in case we make changes to the dockerfile or .conf, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe I should ask: is there a reason why we wouldn't want to build an image almost every time?

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.

3 participants