From a3be98f113c03bb6734081ee604a353444037a4a Mon Sep 17 00:00:00 2001 From: alexeh Date: Fri, 17 Jan 2025 11:19:22 +0100 Subject: [PATCH 1/4] debug image tag --- .github/workflows/publish-docker-images.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index 6692bf311..94b1e0cfa 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -53,7 +53,7 @@ jobs: echo "##[set-output name=env_name_upper;]$mapped_name_upper" id: set_env env: - PILOT: ${{ secrets.PILOT }} + PILOT: ${{ vars.PILOT }} wait_for_tests: name: Wait for tests to finish running @@ -150,6 +150,9 @@ jobs: id-token: 'write' steps: + - name: Debug IMAGE TAG + run: | + echo "IMAGE_TAG: ${{ needs.set_env_name.outputs.env_name }}" - name: Check out the repo uses: actions/checkout@v3 From 34ead1dc7651b05f4b56ee65bfe94522a5e7b124 Mon Sep 17 00:00:00 2001 From: alexeh Date: Mon, 20 Jan 2025 07:54:21 +0100 Subject: [PATCH 2/4] Fix pull env name from settings --- .github/workflows/deploy-to-kubernetes.yml | 4 ++-- .github/workflows/publish-docker-images.yml | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-to-kubernetes.yml b/.github/workflows/deploy-to-kubernetes.yml index 9e0376527..c9e95d289 100644 --- a/.github/workflows/deploy-to-kubernetes.yml +++ b/.github/workflows/deploy-to-kubernetes.yml @@ -36,12 +36,12 @@ jobs: mapped_name=$branch_name fi mapped_name_upper=$(echo "$mapped_name" | tr '[:lower:]' '[:upper:]') - echo "Environment name used: $mapped_name" + echo "Environment name found matching branch name: Using the environment name" echo "##[set-output name=env_name;]$mapped_name" echo "##[set-output name=env_name_upper;]$mapped_name_upper" id: set_env env: - PILOT: ${{ secrets.PILOT }} + PILOT: ${{ vars.PILOT }} wait_for_image_push: name: Wait for Docker images to be pushed diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index 94b1e0cfa..008ec176e 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -48,7 +48,7 @@ jobs: mapped_name=$branch_name fi mapped_name_upper=$(echo "$mapped_name" | tr '[:lower:]' '[:upper:]') - echo "Environment name used: $mapped_name" + echo "Environment name found matching branch name: Using the environment name" echo "##[set-output name=env_name;]$mapped_name" echo "##[set-output name=env_name_upper;]$mapped_name_upper" id: set_env @@ -150,9 +150,6 @@ jobs: id-token: 'write' steps: - - name: Debug IMAGE TAG - run: | - echo "IMAGE_TAG: ${{ needs.set_env_name.outputs.env_name }}" - name: Check out the repo uses: actions/checkout@v3 From 1d9b17a59c5f67d279937a54d76af5a9fc19c27d Mon Sep 17 00:00:00 2001 From: alexeh Date: Tue, 21 Jan 2025 06:26:56 +0100 Subject: [PATCH 3/4] change sender domain, remove click and open tracking --- .../email/sendgrid.email.service.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/api/src/modules/notifications/email/sendgrid.email.service.ts b/api/src/modules/notifications/email/sendgrid.email.service.ts index bffbcffd6..a23d14b82 100644 --- a/api/src/modules/notifications/email/sendgrid.email.service.ts +++ b/api/src/modules/notifications/email/sendgrid.email.service.ts @@ -11,7 +11,8 @@ import * as sgMail from '@sendgrid/mail'; import * as config from 'config'; import { MailDataRequired } from '@sendgrid/helpers/classes/mail'; -const SENDER_MAIL_ADDRESS: string = 'no-reply@landgriffon.com'; +// Can't check rn, but this address might be authenticated in Sendgrid as it is used in the mkt site +const SENDER_MAIL_ADDRESS: string = 'hello@landgriffon.com'; @Injectable() export class SendgridEmailService implements IEmailService { @@ -28,7 +29,18 @@ export class SendgridEmailService implements IEmailService { } async sendMail(mail: SendMailDTO): Promise { - const msg: MailDataRequired = { ...mail, from: SENDER_MAIL_ADDRESS }; + const msg: MailDataRequired = { + ...mail, + from: SENDER_MAIL_ADDRESS, + trackingSettings: { + clickTracking: { + enable: false, + }, + openTracking: { + enable: false, + }, + }, + }; try { return sgMail.send(msg); } catch (e) { From 5d84e4482db5519f4431544eaa598170d270c7f9 Mon Sep 17 00:00:00 2001 From: alexeh Date: Tue, 21 Jan 2025 06:27:09 +0100 Subject: [PATCH 4/4] refactor account activation email body --- .../authentication/password-mail.service.ts | 55 ++++++++++++++----- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/api/src/modules/authentication/password-mail.service.ts b/api/src/modules/authentication/password-mail.service.ts index 287e57ba7..337658513 100644 --- a/api/src/modules/authentication/password-mail.service.ts +++ b/api/src/modules/authentication/password-mail.service.ts @@ -13,23 +13,50 @@ export class PasswordMailService { async sendUserActivationEmail(email: string, token: string): Promise { const htmlContent: string = ` -

Welcome to Landgriffon!

-

An account has been created for you by an administrator. As this is your first time logging in, we request you create a new password for your account.

-
-

To get started, please click on the link below:

-

Secure Password Setup Link

-
-

This link will take you to our app where you can create your new password. For security reasons, this link will expire after 24 hours.

-

Please remember that a strong password includes a mix of letters, numbers, and special characters. Never share your password with anyone, even if they claim to be from Landgriffon.

-

Our team will never ask you for your password in an email, over the phone, or on any social media platform.

-

Thank you for choosing Landgriffon. We are committed to providing you with a secure and seamless experience.

-
-

If you have any questions or need further assistance, please don't hesitate to contact us.

-

Best regards.

`; + + + + + + Welcome to Landgriffon + + +

Welcome to Landgriffon!

+ +

Hi there,

+ +

An account has been created for you. To get started, please set it up by clicking the link below:

+ +

+ + Set Up Your Account + +

+ +

This link will expire in 24 hours for security purposes.

+ +

To ensure a secure account, we recommend using a password with a mix of letters, numbers, and special characters.

+ +

If you didn't request this, please ignore this email.

+ +

For any assistance, feel free to reach out to our support team at + support@landgriffon.com. +

+ +

Best regards,
The Landgriffon Team

+ +
+ +

+ If you have received this email by mistake, please disregard it. You are receiving this email as part of your Landgriffon account registration. +

+ + + `; await this.emailService.sendMail({ to: email, - subject: 'Welcome to Landgriffon - Please Set Up Your Password', + subject: 'Welcome to Landgriffon - Set up your Account', html: htmlContent, }); }