Compare commits
No commits in common. "7cf7246abd2aeccab49084d9977af5ce55646c06" and "9065626d40bfea9db11fe1f5d21413d2234186e6" have entirely different histories.
7cf7246abd
...
9065626d40
69
Jenkinsfile
vendored
69
Jenkinsfile
vendored
@ -1,69 +0,0 @@
|
|||||||
pipeline {
|
|
||||||
agent { label 'built-in' }
|
|
||||||
|
|
||||||
options {
|
|
||||||
buildDiscarder(logRotator(numToKeepStr: '10'))
|
|
||||||
}
|
|
||||||
|
|
||||||
environment {
|
|
||||||
DEPLOY_PATH = "/var/www/bangararaju.kottedi.in/admin"
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
|
||||||
|
|
||||||
stage('Checkout') {
|
|
||||||
steps {
|
|
||||||
checkout scm
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Inject Environment File') {
|
|
||||||
steps {
|
|
||||||
configFileProvider(
|
|
||||||
[configFile(fileId: 'admin-uat-properties',
|
|
||||||
targetLocation: 'src/environments/environment.ts',
|
|
||||||
replaceTokens: true)]
|
|
||||||
) {
|
|
||||||
echo "Environment file injected"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Build Angular') {
|
|
||||||
steps {
|
|
||||||
sh '''
|
|
||||||
npm install
|
|
||||||
ng build --configuration production --base-href /admin/
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Deploy') {
|
|
||||||
steps {
|
|
||||||
sh '''
|
|
||||||
rm -rf $DEPLOY_PATH/*
|
|
||||||
cp -r dist/portfolio-admin/browser/* $DEPLOY_PATH/
|
|
||||||
sudo /usr/bin/systemctl reload nginx
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Health Check') {
|
|
||||||
steps {
|
|
||||||
sh '''
|
|
||||||
sleep 2
|
|
||||||
curl -f https://bangararaju-uat.kottedi.in/admin
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
failure {
|
|
||||||
echo "Deployment failed!"
|
|
||||||
}
|
|
||||||
success {
|
|
||||||
echo "Deployment successful!"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user