Skip to content

Commit

Permalink
Merge branch 'dev' into hcmpre-878-stockService
Browse files Browse the repository at this point in the history
  • Loading branch information
yashita-egov authored Jan 28, 2025
2 parents 9ac4df2 + cfbfc8a commit 9342a92
Show file tree
Hide file tree
Showing 742 changed files with 31,756 additions and 45,190 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/branch-name-validator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Enforce Branch Naming Convention

on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
branch-name-check:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Enforce branch naming convention
run: |
# Get the branch name
branch_name=$(echo "${GITHUB_REF#refs/heads/}")
# Define the branch name pattern
branch_regex="^(master|develop|(HCMPRE|HCMPOST|HCMSUB)-[0-9]{3,}-[a-zA-Z0-9-]+)$"
# Check if the branch name matches the pattern
if [[ ! "$branch_name" =~ $branch_regex ]]; then
echo "Branch name '$branch_name' does not follow the required naming convention."
echo "Branch names must follow the pattern: (HCMPRE|HCMPOST|HCMSUB)-123-description"
exit 1
fi
- name: Success message
run: |
branch_name=$(echo "${GITHUB_REF#refs/heads/}")
echo "Branch name '$branch_name' follows the required naming convention: 'master', 'develop', or (HCMPRE|HCMPOST|HCMSUB)-123-description"
64 changes: 0 additions & 64 deletions .github/workflows/buildWorkbenchUI.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/publishAllPackages.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/publishAllPackagesRelease.yml

This file was deleted.

115 changes: 55 additions & 60 deletions .github/workflows/publishProjectFactory.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,72 @@
name: project factory service docker Image CI
name: Project Factory Service Test Builder

on:
push:
branches: [ "campaign" ]
branches:
- "console"
- "master"
paths:
- 'utilities/project-factory/**'
- 'health-services/project-factory/**'
pull_request:
branches: [ "campaign" ]
branches:
- "console"
- "master"

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for tags and branches
# Step 1: Checkout the repository
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for tags and branches

- name: Set up environment variables
id: env
run: |
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "ACTION_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
echo "COMMIT_ID=${GITHUB_SHA: -8}" >> $GITHUB_ENV # Extract last 8 characters of SHA
# Step 2: Set up environment variables
- name: Set up environment variables
id: env
run: |
echo "ACTION_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
- name: Build the service Docker image
id: docker_build
working-directory: ./utilities/project-factory
run: |
IMAGE_TAG=egovio/project-factory:${{ env.BRANCH_NAME }}-${{ env.COMMIT_ID }}-${{ env.ACTION_NUMBER }}
docker build . \
--file Dockerfile \
--tag $IMAGE_TAG
echo "::set-output name=image_name::$IMAGE_TAG"
# Step 3: Build the service Docker image
- name: Build the service Docker image
id: docker_build
working-directory: ./health-services/project-factory
run: |
IMAGE_TAG=egovio/project-factory:${{ env.ACTION_NUMBER }}
docker build . \
--file Dockerfile \
--tag $IMAGE_TAG
echo "::set-output name=image_name::$IMAGE_TAG"
echo "Service Docker image built successfully"
# Step 4: Build the database migration Docker image
- name: Build the DB migration Docker image
id: docker_db_build
working-directory: ./health-services/project-factory/migration
run: |
IMAGE_TAG=egovio/project-factory-db:${{ env.ACTION_NUMBER }}
docker build . \
--file Dockerfile \
--tag $IMAGE_TAG
echo "::set-output name=db_image_name::$IMAGE_TAG"
echo "DB migration Docker image built successfully"
- name: Build the db migration Docker image
id: docker_db_build
working-directory: ./utilities/project-factory/migration
run: |
IMAGE_TAG=egovio/project-factory-db:${{ env.BRANCH_NAME }}-${{ env.COMMIT_ID }}-${{ env.ACTION_NUMBER }}
docker build . \
--file Dockerfile \
--tag $IMAGE_TAG
echo "::set-output name=db_image_name::$IMAGE_TAG"
node_build:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- uses: actions/checkout@v3

# Step 2: Set up Node.js environment
- uses: actions/setup-node@v2
with:
node-version: 20

- name: Login to Docker Hub and Push Docker Image
working-directory: ./utilities/project-factory
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: ${{ steps.docker_build.outputs.image_name }}
run: |
# Authenticate with Docker Hub
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Push the image to Docker Hub
docker push $IMAGE_NAME
echo "Docker image pushed: $IMAGE_NAME"
- name: Login to Docker Hub and Push DB Migration Docker Image
working-directory: ./utilities/project-factory/migration
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DB_IMAGE_NAME: ${{ steps.docker_db_build.outputs.db_image_name }}
run: |
# Authenticate with Docker Hub
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Push the image to Docker Hub
docker push $DB_IMAGE_NAME
echo "Docker image pushed: $DB_IMAGE_NAME"
# Step 3: Install dependencies and build for production
- name: Install dependencies and build
working-directory: ./health-services/project-factory
run: |
yarn install
yarn build
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"type": "node",
"request": "attach",
"name": "Attach to Remote",
"address": "localhost",
"port": 9229,
"localRoot": "${workspaceFolder}",
"remoteRoot": "/app"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.inlineSuggest.showToolbar": "onHover"
}
4 changes: 3 additions & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
* @kavi-egov @sathishp-eGov @shashwat-egov
* @kavi-egov @sathishp-eGov

health-services/project-factory/ @jagankumar-egov
13 changes: 10 additions & 3 deletions build/build-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,22 @@ config:
dockerfile: "build/17/maven/Dockerfile"
- work-dir: "health-services/plan-service/src/main/resources/db"
image-name: "plan-service-db"
- name: "builds/health-campaign-services/health-services/resource-estimation-service"
- name: "builds/health-campaign-services/health-services/resource-generator"
build:
- work-dir: "health-services/resource-estimation-service"
image-name: "resource-estimation-service"
- work-dir: "health-services/resource-generator"
image-name: "resource-generator"
dockerfile: "build/17/maven/Dockerfile"
- name: "builds/health-campaign-services/analytics/auth-proxy"
build:
- work-dir: "analytics/auth-proxy"
image-name: "auth-proxy"
- name: "builds/health-campaign-services/health-services/census-service"
build:
- work-dir: "health-services/census-service"
image-name: "census-service"
dockerfile: "build/17/maven/Dockerfile"
- work-dir: "health-services/census-service/src/main/resources/db"
image-name: "census-service-db"

# frontend
- name: builds/health-campaign-services/frontend/workbench-ui
Expand Down
2 changes: 1 addition & 1 deletion core-services/egov-hrms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>9.22.3</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.1</version>
</dependency>
<dependency>
<groupId>org.egov.services</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ public class PropertiesManager {

@Value("${egov.idgen.path}")
public String idGenEndpoint;


// Email
@Value("${kafka.topics.notification.email}")
private String emailNotifTopic;

@Value("${notification.email.enabled}")
private Boolean isEmailNotificationEnabled;

//Kafka Topics
@Value("${kafka.topics.save.service}")
Expand All @@ -96,7 +102,9 @@ public class PropertiesManager {

@Value("${kafka.topics.hrms.updateData}")
public String updateTopic;


@Value("${kafka.topics.hrms.email.notification}")
public String hrmsEmailNotifTopic;

//Variables
@Value("${egov.idgen.ack.name}")
Expand Down Expand Up @@ -140,4 +148,10 @@ public class PropertiesManager {

@Value("${egov.boundary.search.url}")
private String boundarySearchUrl;

@Value("${hrms.email.notification.implementation.partner}")
public String emailNotificationImplementationPartner;

@Value("${hrms.email.notification.website.link}")
public String emailNotificationWebsiteLink;
}
Loading

0 comments on commit 9342a92

Please sign in to comment.