pipeline {
agent any
tools {nodejs "Node-12.10.0"}
environment {
NODE_OPTIONS = '--max-old-space-size=8192' //can be used in whole pipeline
}
stages {
stage('echo') {
steps {
echo env.NODE_OPTIONS
}
}
stage('Git') {
steps {
git branch: 'brnachname', credentialsId: 'xxxxxxxx-ccc7-49e2-a690-xxxxxxxxxxx', url: "git@****************"
}
}
stage('install_npm') {
steps {
sh 'npm install firebase@4.8.0'
sh 'npm install'
}
}
stage('prod_build') {
steps {
sh 'npm run ng build --prod --aot --output-hashing=all'
}
}
stage('delete_projectname') {
steps {
sh 'sudo rm -rf /home/deploy/apps/projectname'
}
}
stage('deploy_code_projectname') {
steps {
sh 'sudo cp -r ./dist/apps /home/deploy/apps/projectname'
}
}
}
}
No comments:
Post a Comment