Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pipeline {
- agent any
- stages {
- try {
- stage('Setup main project') {
- steps {
- git branch: 'testing', changelog: false, credentialsId: '81e7f3dd-22e2-4c86-b2c2-0694b59ffdf8', poll: false, url: 'YOUR_REPO_URL'
- sh 'npm install'
- }
- }
- stage('Run unit tests') {
- steps {
- echo "All test passed LOL"
- // sh 'npm test'
- }
- }
- stage('Build project') {
- steps {
- sh 'npm run build'
- }
- }
- stage('Deploy on localhost:5000') {
- steps {
- sh 'npx serve build/ &'
- }
- }
- stage('Run sanity tests') {
- steps {
- build 'Sanity Tests'
- }
- }
- } catch () {
- }
- }
- }
Add Comment
Please, Sign In to add comment