Browse Source

更新 'Jenkinsfile'

sifu-gogs 2 years ago
parent
commit
384b1262c8
1 changed files with 8 additions and 3 deletions
  1. 8 3
      Jenkinsfile

+ 8 - 3
Jenkinsfile

@@ -1,10 +1,15 @@
 pipeline {
-    agent any
-
+    agent {
+        docker {
+            image 'node:16-alpine' 
+            args '-p 3000:3000' 
+        }
+    }
     stages {
         stage('Build') {
             steps {
-                echo 'Building..'
+                sh 'npm install'
+                sh 'npm run build:prod'
             }
         }
         stage('Test') {