Skip to content

Commit

Permalink
deploy to nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
ravi2krishna committed Jun 9, 2023
1 parent ba32421 commit b4d96e4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,21 @@ pipeline {
}
}

stage('Deploy') {
stage('Deploy LMS') {
steps {
echo 'Deploying....'
script {
echo "Deploying.."
def packageJSON = readJSON file: 'webapp/package.json'
def packageJSONVersion = packageJSON.version
echo "${packageJSONVersion}"
sh 'curl -u admin:Admin123* -X GET \'http://18.223.103.131:8081/repository/lms/dist-${packageJSONVersion}.zip\' --output dist-'${packageJSONVersion}'.zip'
sh 'sudo rm -rf dist'
sh "sudo unzip -o dist-'${packageJSONVersion}'.zip"
sh "sudo cp -r webapp/dist/* /var/www/html"
}
}
}


}
}

0 comments on commit b4d96e4

Please sign in to comment.