Jenkinsfile 744 B

12345678910111213141516171819202122232425262728293031
  1. pipeline {
  2. agent {
  3. dockerfile {
  4. filename 'Dockerfile'
  5. registryUrl 'https://registry.docker-cn.com'
  6. args '-p 80:80 --security-opt apparmor=unconfined'
  7. }
  8. }
  9. stages {
  10. stage('SonarQube Analysis') {
  11. steps {
  12. sh 'sonar-scanner'
  13. }
  14. }
  15. stage('Build'){
  16. steps {
  17. sh 'npm install'
  18. }
  19. }
  20. stage('Deliver'){
  21. steps {
  22. sh 'npm run build'
  23. sh 'echo $! > .pidfile'
  24. sh 'service nginx start'
  25. input message: 'Finished using the web site? (Click "Proceed" to continue)'
  26. }
  27. }
  28. }
  29. }