Skip to content

Commit

Permalink
ci build configurations changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhallamudi Pratibha authored and Bhallamudi Pratibha committed May 9, 2024
1 parent d496c68 commit ec30782
Show file tree
Hide file tree
Showing 5 changed files with 352 additions and 1 deletion.
30 changes: 30 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,36 @@
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
},
"ci": {
"budgets": [
{
"type": "initial",
"maximumWarning": "5mb",
"maximumError": "6mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "1mb",
"maximumError": "2mb"
}
],
"outputHashing": "all",
"optimization": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.ci.ts"
}
]
},
"test":{
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.test.ts"
}
]
}
},
"defaultConfiguration": "production"
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint",
"prepare": "husky install"
"prepare": "husky install",
"build-dev": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=development --aot",
"build-prod": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=production --aot",
"build-ci": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=ci --aot",
"build-test": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --configuration=test --aot"
},
"lint-staged": {
"src/**/*.{ts,html}": [
Expand Down
195 changes: 195 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.iemr.admin-ui-next</groupId>
<artifactId>admin-ui-next</artifactId>
<version>1.0</version>
<name>admin-ui-next</name>
<description>Piramal - admin: Module ui</description>

<packaging>war</packaging>
<profiles>
<profile>
<id>dev</id>
<properties>
<old-api-url>10.208.122.38</old-api-url>
<new-api-url>10.208.122.38</new-api-url>
<environment>dev</environment>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>uat</id>
<properties>
<old-api-url>10.208.122.38</old-api-url>
<new-api-url>deviemr.piramalswasthya.org</new-api-url>
<environment>uat</environment>
</properties>
</profile>
<profile>
<id>local</id>
<properties>
<old-api-url>10.208.122.38</old-api-url>
<new-api-url>localhost</new-api-url>
<environment>local</environment>
</properties>
</profile>
<profile>
<id>test</id>
<properties>
<old-api-url>10.208.122.38</old-api-url>
<new-api-url>10.208.122.38</new-api-url>
<environment>test</environment>
</properties>
</profile>
<profile>
<id>ci</id>
<properties>
<environment>ci</environment>
</properties>
</profile>
</profiles>

<!-- we could create individual properties similar to variables -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<final-name>admin-ui-next-v1.0</final-name>
<hostname-dev>10.208.122.38</hostname-dev>
<port-dev>9990</port-dev>
<hostname-local>localhost</hostname-local>
<port-local>9990</port-local>
<hostname-test>10.208.122.38</hostname-test>
<port-test>9990</port-test>
<hostname-uat>deviemr.piramalswasthya.org</hostname-uat>
<port-uat>9990</port-uat>
<server-id>wildfly-${environment}</server-id>
<server-hostname>{hostname-${environment}}</server-hostname>
<server-port>{port-${environment}}</server-port>
</properties>

<!-- install the necessary node_modules & compile in prod mode -->
<build>
<finalName>admin-ui-next-v1.0</finalName>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<filesets>
<fileset>
<directory>dist</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>npm-install</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>install</argument>
<argument>--legacy-peer-deps</argument>
<!-- use save-dev or save if you understand the consequences, else -->
<!-- please leave them alone & add appropriate npm dependencies in
package.json -->
</arguments>
</configuration>
</execution>
<execution>
<id>npm-run-build</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<!-- incase working dir is different use below -->
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build-${environment}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- use following incase resources from other dirs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>default-copy-resources</id>
<phase>prepare-package</phase>
<configuration>
<overwrite>true</overwrite>
<outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF/
</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/dist</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>dist</directory>
</resource>
<resource>
<filtering>true</filtering>
<directory>src/packaging/</directory>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>properties-updated</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo>replacing/updating urls ${project.basedir} 2</echo>
<replaceregexp match="${old-api-url}"
replace="${new-api-url}" flags="ig">
<fileset dir="${project.basedir}/dist"
includes="main.*.bundle.js"/>
</replaceregexp>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
120 changes: 120 additions & 0 deletions src/environments/environment.ci.ts.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,129 @@

const ADMIN_API = '<%= ADMIN_API_BASE %>';
const COMMON_API = '<%= COMMON_API_BASE %>';
const adminBaseUrl = `${ADMIN_API}adminapi-v0.1/`;
const superadminBaseURL = `${ADMIN_API}adminapi-v0.1/`;
const commonBaseURL = `${COMMON_API}commonapi-v0.1/`;

export const environment = {
production: true,
adminIP : ADMIN_API,
commonIP: COMMON_API,
adminBaseUrl: adminBaseUrl,
superadminBaseURL: superadminBaseURL,
commonBaseURL: commonBaseURL,
extendSessionUrl: `${COMMON_API}common/extend/redisSession`,

//Role Master APIs
get_State_Url: `${adminBaseUrl}m/role/state`,
get_Service_Url: `${adminBaseUrl}m/role/service`,
find_Roles_By_State_Service_Url: `${adminBaseUrl}m/role/search`,
create_Roles_Url: `${adminBaseUrl}m/role/addRole`,
delete_Role_Url: `${adminBaseUrl}m/role/deleteRole`,
edit_Role_Url: `${adminBaseUrl}m/role/editRole`,
getFeaturesUrl: `${adminBaseUrl}m/searchFeature`,
updateFeatureToRole_Url: `${adminBaseUrl}mapExterafeature`,
getServiceLines_new_url: `${adminBaseUrl}m/role/serviceNew`,
getStates_new_url: `${adminBaseUrl}m/role/stateNew`,

//SMS Template APIs
getSMStemplates_url: `${commonBaseURL}sms/getSMSTemplates`,
saveSMStemplate_url: `${commonBaseURL}sms/saveSMSTemplate`,
updateSMStemplate_url: `${commonBaseURL}sms/updateSMSTemplate`,
getSMStypes_url: `${commonBaseURL}sms/getSMSTypes`,
getSMSparameters_url: `${commonBaseURL}sms/getSMSParameters`,
getFullSMSTemplate_url: `${commonBaseURL}sms/getFullSMSTemplate`,
sendSMS_url: `${commonBaseURL}sms/sendSMS`,

//snomed ct code
getSnomedRecord: `${commonBaseURL}snomed/getSnomedCTRecordList`,
getmasterList: `${adminBaseUrl}snomed/fetchSnomedWorklist`,
saveMappingList: `${adminBaseUrl}snomed/saveSnomedMappingData`,
editMappingList: `${adminBaseUrl}snomed/editSnomedMappingData`,
updateBlockStatus: `${adminBaseUrl}snomed/updateStatus`,

//Questionnaire APIs
saveQuestionnaire_url: `${adminBaseUrl}saveQuestionnaire`,
deleteQuestionnaire_url: `${adminBaseUrl}deleteQuestionnaire`,
getQuestionnaire_url: `${adminBaseUrl}getQuestionnaireList`,
get_Services_Url: `${adminBaseUrl}m/role/serviceNew`,
getQuestionType_url: `${commonBaseURL}questionTypeController/get/questionTypeList`,
editQuestionnaire_url: `${adminBaseUrl}editQuestionnaire`,
getBlockSubcentreDataUploadUrl: `${adminBaseUrl}uptsu/saveFacility`,
getServiceLines_newrole_url: `${adminBaseUrl}m/role/serviceNew`,
getStates_newparking_url: `${adminBaseUrl}m/role/stateNew`,
_getZonesParkURL: `${adminBaseUrl}zonemaster/get/zones`,
getParkingPlacesURL: `${adminBaseUrl}parkingPlaceMaster/get/parkingPlacesbyzoneid`,
saveParkingPlacesURL: `${adminBaseUrl}parkingPlaceMaster/create/parkingPlaces`,
updateParkingPlaceStatusURL: `${adminBaseUrl}parkingPlaceMaster/remove/parkingPlace`,
updateParkingPlaceDetailsURL: `${adminBaseUrl}parkingPlaceMaster/update/parkingPlaceDetails`,
getAllParkingPlaceSubDistrictMapping_url: `${adminBaseUrl}/parkingPlaceTalukMapping/getall/parkingPlacesTalukMapping`,
_getDistrictListURL: `${adminBaseUrl}/zonemaster/getdistrictMappedtoZone`,
_getTalukListURL: `${commonBaseURL}location/taluks/`,
filterMappedTaluks_url: `${adminBaseUrl}parkingPlaceTalukMapping/get/unmappedtaluk`,
saveParkingPlaceSubDistrictMapping_url: `${adminBaseUrl}/parkingPlaceTalukMapping/create/parkingPlacesTalukMapping`,
updateTalukMapping_url: `${adminBaseUrl}/parkingPlaceTalukMapping/update/parkingPlacesTalukMapping`,
mappingActivationDeactivation_url: `${adminBaseUrl}/parkingPlaceTalukMapping/activate/parkingPlacesTalukMapping`,
_getServiceLineURL: `${adminBaseUrl}m/role/serviceNew`,
_getStateListURL: `${adminBaseUrl}m/role/stateNew`,
_getZonesURL: `${adminBaseUrl}zonemaster/get/zones`,
_getDistrictZoneListURL: `${adminBaseUrl}/zonemaster/getdistrictMappedtoZone`,
getServicePointsURL: `${adminBaseUrl}servicePointMaster/get/servicePoints`,
_getTalukZoneListURL: `${adminBaseUrl}/parkingPlaceTalukMapping/getbyppidanddid/parkingPlacesTalukMapping`,
saveServicePointsURL: `${adminBaseUrl}servicePointMaster/create/servicePoints`,
updateServicePointStatusURL: `${adminBaseUrl}servicePointMaster/remove/servicePoint`,
updateServicePointsURL: `${adminBaseUrl}/servicePointMaster/edit/servicePoint`,
_getTalukServiceListURL: `${adminBaseUrl}/parkingPlaceTalukMapping/getbyppidanddid/parkingPlacesTalukMapping`,
saveZonesURL: `${adminBaseUrl}zonemaster/save/zone`,
getZonesURL: `${adminBaseUrl}zonemaster/get/zones`,

saveZoneDistrictMappingURL: `${adminBaseUrl}zonemaster/save/zoneDistrictMapping`,
getZoneDistrictMappingURL: `${adminBaseUrl}zonemaster/get/zoneDistrictMappings`,

updateZOneStatusURL: `${adminBaseUrl}zonemaster/remove/zone`,
updateZOneDistrictMappingURL: `${adminBaseUrl}zonemaster/remove/zoneDistrictMapping`,

updateZoneDataURL: `${adminBaseUrl}zonemaster/update/zoneData`,

_getStateListByServiceIDURL: `${adminBaseUrl}m/location/getStatesByServiceID`,
_getStateZoneListURL: `${commonBaseURL}location/states/`,
getDistrictZoneListURL: `${commonBaseURL}location/districts/`,
getTalukZoneListURL: `${commonBaseURL}location/taluks/`,
_getBlockListURL: `${commonBaseURL}location/districtblocks/`,
_getBranchListURL: `${commonBaseURL}location/village/`,
_getServiceLinesURL: `${adminBaseUrl}getServiceline`,

/* serviceline and state */

getServiceLinesZone_new_url: `${adminBaseUrl}m/role/serviceNew`,
getStateszone_new_url: `${adminBaseUrl}m/role/stateNew`,
updateZoneMappingDataUrl: `${adminBaseUrl}/zonemaster/edit/zoneDistrictMapping`,

_postProcedureURL: `${adminBaseUrl}labModule/createProcedureMaster`,
_getProcedureListURL: `${adminBaseUrl}labModule/fetchProcedureMaster/`,
_toggleProcedureURL: `${adminBaseUrl}labModule/updateProcedureStatus`,
_updateProcedureURL: `${adminBaseUrl}labModule/updateProcedureMaster`,
_iotProcedureURL: `${adminBaseUrl}diagnostics/getDiagnosticProcedure`,

_getStateListBYServiceIDURL: `${adminBaseUrl}m/role/stateNew`,
getDesignationsURL: `${adminBaseUrl}m/getDesignation`,
getEmployeesURL: `${adminBaseUrl}parkingPlaceMaster/get/userParkingPlaces1`,
deleteEmployeesURL: `${adminBaseUrl}parkingPlaceMaster/delete/userParkingPlaces1`,
getUsernamesURL: `${adminBaseUrl}parkingPlaceMaster/get/unmappeduser`,
saveEmployeeParkingPlaceMappingURL: `${adminBaseUrl}parkingPlaceMaster/save/userParkingPlaces`,
updateEmployeeParkingPlaceMappingURL: `${adminBaseUrl}parkingPlaceMaster/edit/userParkingPlaces1`,
userNameURL: '',
getVansURL: `${adminBaseUrl}vanMaster/get/vanDetails`,
getMappedVansListURL: `${adminBaseUrl}parkingPlaceMaster/get/mappedvan/`,
removeMappedVanURL: `${adminBaseUrl}parkingPlaceMaster/delete/mappedvan`,

/* user signature upload service */
getUsernamesBasedDesigUrl: `${adminBaseUrl}m/getEmployeeByDesignation`,
checkUsersignExistUrl: `${adminBaseUrl}signature1/signexist/`,
uploadSignUrl: `${adminBaseUrl}signature1/upload`,
downloadSignUrl: `${adminBaseUrl}signature1/`,

/* serviceline and state */
getRolesUrl: `${adminBaseUrl}/m/role/search/active`,
saveUrl: `${adminBaseUrl}/m/role/configWrap`,
};
2 changes: 2 additions & 0 deletions src/packaging/version.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build.version=${project.version}
build.dateTime=${build.timestamp}

0 comments on commit ec30782

Please sign in to comment.