Jenkinsfile 626 B

12345678910111213141516171819202122232425
  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('Build'){
  11. steps {
  12. sh 'npm install'
  13. }
  14. }
  15. stage('Deliver'){
  16. steps {
  17. sh 'npm run build'
  18. sh 'echo $! > .pidfile'
  19. sh 'service nginx start'
  20. input message: 'Finished using the web site? (Click "Proceed" to continue)'
  21. }
  22. }
  23. }
  24. }