diff --git a/Jenkinsfile b/Jenkinsfile index 4d4fed0..93b71e1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,11 +7,11 @@ pipeline { git(url: 'http://git.abilityell.com/william/react-project.git', branch: 'main') withEnv(['CI=false']) { //ignore warning - sh 'npm install' - sh 'npm run build' + bat 'npm install' + bat 'npm run build' } - sh ''' + bat ''' echo "build react ..." pwd ls -l build @@ -20,14 +20,14 @@ pipeline { } stage('Test') { steps { - sh 'mvn test' + bat 'mvn test' } } stage("Deploy React App") { when { expression { false } } steps { withCredentials([sshUserPrivateKey(credentialsId: 'docker-ssh', keyFileVariable: 'SSH_KEY')]) { - sh ''' + bat ''' scp -i $SSH_KEY -o StrictHostKeyChecking=no -r build/* $DOCKER_HOST:/var/www/html/ ssh -i $SSH_KEY -o StrictHostKeyChecking=no $DOCKER_HOST 'chmod -R 755 /var/www/html/*'