pipeline { agent { dockerfile { filename 'Dockerfile' registryUrl 'https://registry.docker-cn.com' args '-p 80:80 -p 81:81 -p 82:82 --security-opt apparmor=unconfined' } } stages { stage('SonarQube Analysis') { steps { sh 'sonar-scanner' } } stage('Build Dev Gitbook') { steps { sh 'gitbook install ./gitbook/dev' sh 'gitbook build ./gitbook/dev' } } stage('Build Product Gitbook') { steps { sh 'gitbook install ./gitbook/product' sh 'gitbook build ./gitbook/product' } } stage('Install') { steps { sh 'cnpm install' } } stage('Build'){ steps { sh 'npm run build' } } stage('Deliver'){ steps { sh 'echo $! > .pidfile' sh 'service nginx start' input message: 'Finished using the web site? (Click "Proceed" to continue)' } } } post { always { cleanWs() } } }