-
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
DTSPO 18475 Fix Up #39
Conversation
General Observations and ImprovementsConsistency and Best Practices
Security
Workflow Dispatch
|
…e assigned with a custom property
…trings with more info
…trings with more info
The provided git diff includes a variety of workflow and script updates, each with its focus. Here are additional improvements and specific examples to consider for enhanced code quality, security, and best practices: General
Security
Code Quality and Best Practices
Efficiency
Examples:Best Practice: Improved Action Versioning - uses: actions/checkout@v2.3.4
- uses: azure/login@v1.3.0 Security: Minimized Permissions permissions:
contents: write
issues: read
pull-requests: write Efficiency: Using Matrix for Parallelization jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 14, 16]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm test Cost & Carbon Usage
These recommendations aim to balance code maintainability, security, efficiency, and adherence to best practices. |
Jira link - https://tools.hmcts.net/jira/secure/RapidBoard.jspa?rapidView=1617&projectKey=DTSPO&view=detail&selectedIssue=DTSPO-18475&sprint=14008
Change description
I have created a python script that will be used to create the custom properties as this is currently unsupported through the terraform provider. This script will run and create the property called is_production at the organisation level, which will then be passed down to the repository level from the JSON file.
Made some changes to the terraform pipeline to include the CNP library and ensure that the format check happens during the PR process.
A rule set will be created at the organisation level with rules such as must require 1 PR review before merging, this will then also be passed down to the repository level.
We created a terraform pre check pipeline that will trigger on a pull request and will check if the terraform code needs formatted, if it does then this will fix the code if required. We also ensured the Terraform CI/CD pipeline runs in parallel with the pre-check.
Checklist
🤖AEP PR SUMMARY🤖
ℹ️ Created new files:
⚙️ Updated files:
The pull request introduced a new CI pipeline for PR reviewing and summary, a Terraform pre-check workflow, and a Terraform CI/CD pipeline. Additionally, custom properties were defined for the organization using the set_org_custom_properties.py script. The ReadMe was also updated to display repository counts and link to the production repositories JSON file.