Jenkinsfile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 Dev Gitbook') {
  16. steps {
  17. sh 'gitbook build ./gitbook/dev'
  18. }
  19. }
  20. stage('Build Product Gitbook') {
  21. steps {
  22. sh 'gitbook build ./gitbook/product'
  23. }
  24. }
  25. stage('Install') {
  26. steps {
  27. sh 'npm install'
  28. }
  29. }
  30. stage('Build'){
  31. steps {
  32. sh 'npm run build'
  33. }
  34. }
  35. stage('Deliver'){
  36. steps {
  37. sh 'echo $! > .pidfile'
  38. sh 'service nginx start'
  39. input message: 'Finished using the web site? (Click "Proceed" to continue)'
  40. }
  41. }
  42. }
  43. }