sifu-gogs 2 жил өмнө
parent
commit
384b1262c8
1 өөрчлөгдсөн 8 нэмэгдсэн , 3 устгасан
  1. 8 3
      Jenkinsfile

+ 8 - 3
Jenkinsfile

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