浏览代码

add jenkins file

amenpunk 4 年之前
父节点
当前提交
5e19c8c995
共有 1 个文件被更改,包括 28 次插入0 次删除
  1. 28 0
      Jenkinsfile

+ 28 - 0
Jenkinsfile

@@ -0,0 +1,28 @@
+pipeline {
+    agent {
+        node {
+            label 'ClubDit'
+            customWorkspace '/var/www/html/psicoadmin'
+        }
+    }
+    stages {
+        stage('install dependencies') {
+            steps {
+                sh 'npm install'
+            }
+        }
+        stage('build') {
+            steps {
+                sh 'npm run build'
+            }
+        }
+    }
+    post {
+        always {
+            slackSend channel: '#sysproy2',
+                color: currentBuild.currentResult == 'SUCCESS' ? 'good' : 'danger',
+                message: "*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER} More info at: ${env.BUILD_URL}"
+        }
+    }
+
+}