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

Fix two text replacements in init script #556

Merged
merged 14 commits into from
Aug 20, 2024

Conversation

paulridout
Copy link
Contributor

JIRA link (if applicable)

N/A

Change description

There are two issues with the text replacements made by the init.sh script. These are:

1.) The packagesToScan property in application.yaml is changed from "uk.gov.hmcts.reform.demo.controllers" to "uk.gov.hmcts.reform.$component_name.controllers". It should be changed to "uk.gov.hmcts.reform.$package.controllers" to match the directory rename carried out later in the script.

2.) The chart name property in Chart.yaml is changed from "rpe-spring-boot-template" to "$product_name-$product_name-$component_name" by a combination of the maintainer name and slug replacements. It should be changed to "$product_name-$component_name".

To fix the first issue the changes to the application.yaml file have been moved to a separate section. This replaces all instances of "rpe" with $product_name and then all instances of "reform.demo" with reform.$package".

To fix the second issue a new line of code has been added to the section that processes the Chart.yaml file. This removes the "rpe-" prefix from the chart name value leaving just "spring-boot-template". The remaining "spring-boot-template" part is replaced with "$product_name-$component_name" when the slug replacement is carried out later in the script.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

There are two issues with the text replacements made by the init.sh script.  These are:
1.) The packagesToScan property in application.yaml is changed from "uk.gov.hmcts.reform.demo.controllers" to "uk.gov.hmcts.reform.$component_name.controllers".  It should be changed to "uk.gov.hmcts.reform.$package.controllers" to match the directory rename carried out later in the script.
2.) The chart name property in Chart.yaml is changed from "rpe-spring-boot-template" to "$product_name-$product_name-$component_name" by a combination of the maintainer name and slug replacements.  It should be changed to "$product_name-$component_name".

To fix the first issue the changes to the application.yaml file have been moved to a separate section.  This replaces all instances of "rpe" with $product_name and then all instances of "reform.demo" with reform.$package".

To fix the second issue a new line of code has been added to the section that processes the Chart.yaml file.  This removes the "rpe-" prefix from the chart name value leaving just "spring-boot-template".  The remaining "spring-boot-template" part is replaced with "$product_name-$component_name" when the slug replacement is carried out later in the script.
@paulridout
Copy link
Contributor Author

Build is failing because repository is using DependencyCheck v9 and the related changes to use this version aren't in place yet.

DependencyCheck was automatically updated to v9 by Renovate in #551.

@paulridout
Copy link
Contributor Author

DependencyCheck changes are now in place and build now completes successfully.

@charlesluokb
Copy link
Contributor

@paulridout do you still need this branch? please respond within the next 7 days otherwise this branch will be deleted in 7 days

@paulridout
Copy link
Contributor Author

@paulridout do you still need this branch? please respond within the next 7 days otherwise this branch will be deleted in 7 days

@charlesluokb It's just waiting for a review from someone on PlatOps. I should've chased this up months ago. I'll do so now.

@paulridout paulridout merged commit e111dbc into master Aug 20, 2024
3 checks passed
@paulridout paulridout deleted the fix-init-script-text-replacements branch August 20, 2024 15:14
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.

None yet

4 participants