Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
vky25 authored Sep 27, 2024
1 parent 5b42b1c commit 00c3e30
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
pipeline {
agent any

parameters {
string(name: 'BRANCH_NAME', defaultValue: 'main', description: 'Branch to build')
}

stages {
stage('Clone Repository') {
steps {
// Clean workspace before cloning
deleteDir()
// Clone repository
git url: 'https://github.com/NIUANULP/nulp-elite-ui.git'

// Clone repository with the parameterized branch
git branch: "${BRANCH_NAME}", url: 'https://github.com/NIUANULP/nulp-elite-ui.git'
}
}
stage('Build') {
Expand All @@ -33,9 +37,7 @@ pipeline {
nvm use $NODE_VERSION
yarn install
yarn build
cp -r /var/lib/jenkins/workspace/Build/Core/dist /var/lib/jenkins/workspace/Build/Core/elite-ui/
#mkdir /var/lib/jenkins/workspace/Build/Core/elite-ui/webapp/
#cp -r /var/lib/jenkins/workspace/Build/Core/elite-ui/prod-build/* /var/lib/jenkins/workspace/Build/Core/elite-ui/webapp/
cp -r /var/lib/jenkins/workspace/Build/Core/dist /var/lib/jenkins/workspace/Build/Core/elite-ui/prod/
'''
}
}
Expand Down

0 comments on commit 00c3e30

Please sign in to comment.