Skip to content

Conversation

@merrcury
Copy link
Member

This pull request includes significant updates to the deployment workflow and Dockerfile configurations. The changes primarily focus on improving the deployment process by modifying environment settings, introducing new matrices, and updating Dockerfile bases.

Workflow Improvements:

Dockerfile Updates:

merrcury added 30 commits April 1, 2025 16:18
@merrcury merrcury changed the title feat(root): new deployment action feat(root): new deployment and rollback action Apr 15, 2025
if [ "${{ github.event.inputs.environment }}" == "development" ]; then
envs+=("\"development\"")
if [ "${{ github.event.inputs.environment }}" == "staging" ]; then
envs+=("\"staging-eu\"")
Copy link
Contributor

Choose a reason for hiding this comment

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

we have staging-eu?

Copy link
Member Author

Choose a reason for hiding this comment

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

Staging exist in EU region. Some environments name were taken up here in actions. So I made parity in nomenclature with env-location.

services+=("\"webhook\"")
fi
# Parse service secrets and generate deploy_matrix
Copy link
Contributor

Choose a reason for hiding this comment

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

where will we see those matrices? 👏

Copy link
Member Author

Choose a reason for hiding this comment

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

Its for action to use 😅

environment: ${{ fromJson(needs.prepare-matrix.outputs.env_matrix).environment[0] }}
outputs:
docker_image: ${{ steps.build-image.outputs.IMAGE }}
registry: ${{ steps.build-image.outputs.registry }}
Copy link
Contributor

Choose a reason for hiding this comment

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

is it common to call an image as registry?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, Let me remove this from here. We are not using this anymore because of matrix.

Copy link
Contributor

Choose a reason for hiding this comment

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

where are the vars defined?

Copy link
Member Author

Choose a reason for hiding this comment

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

In the GitHub Settings

}}${{
github.event.inputs.deploy_ws == 'true' && 'ws, ' || ''
}}${{
github.event.inputs.deploy_webhook == 'true' && 'webhook ' || ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Webhook is not part of Novu V2, so I am not sure if we need it as an option.

fi
if [ "${{ github.event.inputs.environment }}" == "production-us" ]; then
envs+=("\"production-us\"")
envs+=("\"prod-us\"")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit picky comment: I'd prefer production-us it's more descriptive ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

There is already a env with that name

- name: Checkout
uses: actions/checkout@v4

- name: Get NPM Version
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't use NPM semver for the services. We use it only for NPM packages. That is, I suggest using the latest commit hash to pinpoint the latest deployed code.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll have another PR for this

fi
# Parse service secrets and generate deploy_matrix
for service in "${services[@]}"; do
Copy link
Contributor

Choose a reason for hiding this comment

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

I am curious if there is a better way to construct this JSON using an inline node script or maybe zx from Google. This bash string interpolation is easy to understand but it's also super weird.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I'll improve in later PR as it not pressing enough.

@merrcury merrcury merged commit 52a71f1 into next Apr 23, 2025
27 checks passed
@merrcury merrcury deleted the feat/actions branch April 23, 2025 09:21
bricehemery pushed a commit to jack-agency/novu that referenced this pull request Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants