Compare commits

..

18 Commits

Author SHA1 Message Date
17d2289974 fix: correct agent label for production environment in Jenkinsfile
All checks were successful
bangararaju.kottedi.in/admin/admin-uat/pipeline/head This commit looks good
2026-02-16 20:35:22 +05:30
a0e56f6a89 refactor: streamline Jenkinsfile by using helper methods for environment variables and agent labels
All checks were successful
bangararaju.kottedi.in/admin/admin-prod/pipeline/head This commit looks good
bangararaju.kottedi.in/admin/admin-uat/pipeline/head This commit looks good
2026-02-16 20:28:02 +05:30
8885e288ed removed test file
All checks were successful
bangararaju.kottedi.in/admin/admin-uat/pipeline/head This commit looks good
bangararaju.kottedi.in/admin/admin-prod/pipeline/head This commit looks good
2026-02-16 20:05:39 +05:30
a888636487 webhook test
All checks were successful
bangararaju.kottedi.in/admin/admin-uat-new/pipeline/head This commit looks good
bangararaju.kottedi.in/admin/admin-prod/pipeline/head This commit looks good
2026-02-16 19:57:11 +05:30
dad46d788d webhook test
All checks were successful
bangararaju.kottedi.in/admin/admin-uat-new/pipeline/head This commit looks good
2026-02-16 19:45:15 +05:30
3619e33f44 webhook test
All checks were successful
bangararaju.kottedi.in/admin/admin-uat-new/pipeline/head This commit looks good
2026-02-16 19:31:46 +05:30
cf8e3b880c fix: add sudo to systemctl reload command in deployment stage
All checks were successful
bangararaju.kottedi.in/admin/admin-uat-new/pipeline/head This commit looks good
2026-02-16 19:13:30 +05:30
a6e48d6b2b fix: remove redundant ownership change command in deployment stage
Some checks failed
bangararaju.kottedi.in/admin/admin-uat-new/pipeline/head There was a failure building this commit
2026-02-16 18:39:34 +05:30
06a64fa018 fix: add npm install step before building Angular
Some checks failed
bangararaju.kottedi.in/admin/admin-uat-new/pipeline/head There was a failure building this commit
2026-02-16 18:28:53 +05:30
1bec713692 fix: ensure cleanup of deployment directory before building Angular
Some checks failed
bangararaju.kottedi.in/admin/admin-uat-new/pipeline/head There was a failure building this commit
2026-02-16 18:11:14 +05:30
cea6d218f8 feat: add Jenkins pipeline for automated deployment
Some checks failed
bangararaju.kottedi.in/admin/admin-uat-new/pipeline/head There was a failure building this commit
2026-02-16 17:40:09 +05:30
3dbecd171f Merge pull request 'fix: enhance OTP sending logic and add success message display' (#7) from task/popup-for-dynamic-form into develop
Reviewed-on: #7
2026-02-16 10:03:02 +05:30
15ad26c505 Merge pull request 'fix: update project categories check and adjust border style in project detail popup' (#6) from task/popup-for-dynamic-form into develop
Reviewed-on: #6
2026-02-16 09:26:17 +05:30
2bed3b6438 Merge pull request 'fix: update logout navigation to use navigateByUrl for cleaner routing' (#5) from task/popup-for-dynamic-form into develop
Reviewed-on: #5
2026-02-15 20:43:55 +05:30
7d707051d5 Merge pull request 'fix: update returnUrl handling and navigation in OtpComponent' (#4) from task/popup-for-dynamic-form into develop
Reviewed-on: #4
2026-02-15 15:24:29 +05:30
1147a5a10a Merge pull request 'fix: update auth guard to redirect to login without admin prefix' (#3) from task/popup-for-dynamic-form into develop
Reviewed-on: #3
2026-02-15 15:09:35 +05:30
b30fc0235d Merge pull request 'refactor: remove server configuration and routes for admin module; simplify routing structure' (#2) from task/popup-for-dynamic-form into develop
Reviewed-on: #2
2026-02-15 15:04:42 +05:30
69b3d1fd72 Merge pull request 'task/popup-for-dynamic-form' (#1) from task/popup-for-dynamic-form into develop
Reviewed-on: #1
2026-02-15 14:40:40 +05:30

113
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,113 @@
pipeline {
agent none
options {
buildDiscarder(logRotator(numToKeepStr: '10'))
}
environment {
DEPLOY_PATH = getDeployPath()
ENV_FILE_ID = getEnvFileId()
TARGET_URL = getHealthUrl()
}
stages {
stage('Checkout') {
agent { label getAgentLabel() }
steps {
checkout scm
}
}
stage('Inject Environment File') {
agent { label getAgentLabel() }
steps {
configFileProvider(
[configFile(
fileId: ENV_FILE_ID,
targetLocation: 'src/environments/environment.ts',
replaceTokens: true
)]
) {
echo "Environment file injected for ${env.BRANCH_NAME}"
}
}
}
stage('Build Angular') {
agent { label getAgentLabel() }
steps {
sh '''
npm install
ng build --configuration production --base-href /admin/
'''
}
}
stage('Deploy') {
agent { label getAgentLabel() }
steps {
sh '''
rm -rf $DEPLOY_PATH/*
cp -r dist/portfolio-admin/browser/* $DEPLOY_PATH/
sudo /usr/bin/systemctl reload nginx
'''
}
}
stage('Health Check') {
agent { label getAgentLabel() }
steps {
sh """
sleep 2
curl -f ${TARGET_URL}
"""
}
}
}
post {
failure {
echo "Deployment failed!"
}
success {
echo "Deployment successful!"
}
}
}
// -------- Helper Methods --------
def getAgentLabel() {
if (env.BRANCH_NAME == 'prod') {
return 'oracle-prod'
} else {
return 'built-in' // for develop
}
}
def getEnvFileId() {
if (env.BRANCH_NAME == 'prod') {
return 'admin-prod-properties'
} else {
return 'admin-uat-properties'
}
}
def getDeployPath() {
if (env.BRANCH_NAME == 'prod') {
return "/var/www/bangararaju.kottedi.in/admin"
} else {
return "/var/www/bangararaju.kottedi.in/admin"
}
}
def getHealthUrl() {
if (env.BRANCH_NAME == 'prod') {
return "https://bangararaju.kottedi.in/admin"
} else {
return "https://bangararaju-uat.kottedi.in/admin"
}
}