-
Notifications
You must be signed in to change notification settings - Fork 0
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 environment identification tag in the header #483
base: main
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
designer/server/src/common/components/service-header/template.njk
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @KiranVarma02
Are you happy everything works without needing tests?
You can copy the Nunjucks tests from another component if you like:
https://github.com/DEFRA/forms-designer/blob/main/designer/server/src/common/components/heading/template.test.js
designer/server/src/common/components/service-header/template.njk
Outdated
Show resolved
Hide resolved
{% endswitch -%} | ||
|
||
{{ govukTag({ | ||
text: env | capitalize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use the replace
filter we can keep perf-test
(hyphenated) as the env name
text: env | capitalize, | |
text: env | replace("-", " ") | capitalize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @alexluckett said he want perf test
not perf-test
?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I've asked on Slack, doing that prevents use in URLs:
new URL(`http://forms-runner/.${config.env}.cdp-int.defra.cloud`)
designer/server/src/config.ts
Outdated
@@ -37,14 +38,18 @@ export interface Config { | |||
const schema = joi.object<Config>({ | |||
port: joi.number().default(3000), | |||
env: joi | |||
.string() | |||
.valid('development', 'test', 'perf test', 'production') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still thinking we should match these names to how they're used in URLs
We might want to use them to replace wildcards in URLs in future
.valid('development', 'test', 'perf test', 'production') | |
.valid('dev', 'test', 'perf-test', 'prod') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will let @alexluckett decide that I think!
I don't have strong opinion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll ask on Slack
What shall we use when running locally?
Because the "dev" environment isn't local, e.g.
http://forms-designer.dev.cdp-int.defra.cloud
http://forms-runner.dev.cdp-int.defra.cloud
We'll need maybe local
or localhost
as the default
indent Co-authored-by: Colin Rotherham <[email protected]>
Quality Gate failedFailed conditions |
No description provided.