Browse Source

调整dockerfile与jenkinsfile

xiaoct 7 years ago
parent
commit
88326f1d51
2 changed files with 7 additions and 3 deletions
  1. 0 1
      Dockerfile
  2. 7 2
      Jenkinsfile

+ 0 - 1
Dockerfile

@@ -16,7 +16,6 @@ RUN rm sonarscanner.zip
 ENV SONAR_RUNNER_HOME=/sonar-scanner-3.2.0.1227-linux
 ENV PATH $PATH:/sonar-scanner-3.2.0.1227-linux/bin
 COPY sonar-runner.properties ./sonar-scanner-3.2.0.1227-linux/conf/sonar-scanner.properties
-CMD sonar-scanner
 RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
 ADD default /etc/nginx/sites-available
 EXPOSE 80

+ 7 - 2
Jenkinsfile

@@ -13,14 +13,19 @@ pipeline {
             }
         }
 
-        stage('Build'){
+        stage('Install') {
             steps {
                 sh 'npm install'
             }
         }
-        stage('Deliver'){
+
+        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)'