Instructions
Setup the tool to download the local script (This step is required only once)
- Go to the path M:\ci_releases\Mer_builds\dev\mer.extract.local.scripts\1.0.0\latest. Copy the zip file present here.
- Make a new folder in your local. This is where we will keep all tools used for scanning related actions. This is a one time action and you will reuse the tools that we are copying this time. For example D:\temp\LOCAL_SCRIPT_TOOLS.
- Unzip the file in this new folder.
Download the local Script
- Make a new folder where you want to download the script. You need to create a new folder for this each time you do scanning. For example D:\temp\JPM_LOCAL_SCRIPT_20220728.
- Go to the D:\temp\LOCAL_SCRIPT_TOOLS\mer.extract.local.scripts.138 and open the power shell from here. (The version of mer.extract.local.scripts can be different if a newer version is released)
- Update teh parameter values in below command to download the local script .
./SAST.ExtractLocalScripts.exe --dbType <dbType> --dbHost <dbHost> --dbName <dbName> --dbUser <dbUser> --dbPassword <dbPassword> --tablePrefix <tablePrefix> --targetPath <targetPath>
Below command is given for the reference to download the local script. Change according to your system. <targetPath> is the folder created above to download the local scripts.
ยท ./SAST.ExtractLocalScripts.exe --dbType mssql --dbHost dev-ws-db.clli4tad0cmz.eu-west-1.rds.amazonaws.com --dbName JPM_DIV_UAT_20171212 --dbUser admin --dbPassword Password123 --tablePrefix SN --targetPath D:\temp\JPM_LOCAL_SCRIPT_20220728\
You should get message as below:
4. After getting above message in power shell, check the folder path[D:\temp\JPM_LOCAL_SCRIPT_20220728] for the downloaded local script.
Clone the repository in your local (This step is required only once)
- Go to D:\REPOSITORY.
- Open command prompt from here.
- Run the following command.
git clone https://github.com/Cognizant-Meritsoft/meritsoft-local-claims/
If it is not first time then take the latest of this repository. Make sure that you are in the Main branch before taking latest.
Checkout a new Branch
Use the command to make and checkout the new branch. (Name of the branch should be in the format given in the example below.(f/MER-<Jira ID>-<System>_LocalScriptScanning)
1. git checkout -b f/MER-13301-JPM_DIV_LocalScriptScanning
Replace the script folder
Now go to the respective system script folder of the repository(in your local). Example in below image
and then replace these folders with the folder in D:\Test.
Add and commit the change
In command prompt run the given commands :
git add .
git commit -m โ<comment as per your task>โ
To push the current branch and set the remote as upstream
Run the command:
git push --set-upstream origin <Branch name>
example :- git push --set-upstream origin f/MER-13301-JPM_DIV_LocalScriptScanning
Raise a PR to merge the branch in main
Raise a PR and the reviewer in github.
Once the PR is approved, it will trigger an automated workflow in the below URL. The step for automated scanning for the specific system for which you have updated local script need to be approved by going to below URL [You need to contact DevOps team if you donโt have the access to approve it]. Only once the stage is approved, will the Checkmarx scan begin.
https://app.circleci.com/pipelines/github/Cognizant-Meritsoft/meritsoft-local-claims
Highlighted in the below screenshot is an example of completed Checkmarx scan. The tick mark says it is approved. You can approve the stage by clicking on the thumbs symbol against it.
Comments
0 comments
Please sign in to leave a comment.