瀏覽代碼

delete a new file

root 3 年之前
父節點
當前提交
1d66f389e1
共有 1 個文件被更改,包括 0 次插入58 次删除
  1. 0 58
      Jenkinsfile

+ 0 - 58
Jenkinsfile

@@ -1,58 +0,0 @@
-#!groovy
-
-@Library('jenkinslib') _
-
-def color = new org.devops.color()
-def build = new org.devops.build()
-def systemtime = new org.devops.systemtime()
-
-
-pipeline {
-    agent {
-        node {
-            label 'node5'
-        }
-    }
-    options {
-        buildDiscarder(logRotator(numToKeepStr: '10'))
-	    disableConcurrentBuilds()
-    }
-    stages {
-        stage('NPM BUILD') {
-            steps {
-                script {
-                    sh """rm -fr dist"""
-                    color.PrintMes('执行npm打包','green')
-                    //标准的打包命令.如有需要添加安装ui组件,请直接在对应位置(一般在node-sass 那加 && npm install 包名)
-                    build.Build('npm','npm install && npm run build','master')
-                }
-            }
-        }
-    }
-    post {
-        success {
-            wrap([$class: 'BuildUser']) {
-                script {
-                    systime = systemtime.GetSysTime('yyMMdd')
-                    //读取根目录下的package.json,并解析
-                    result = build.GetNpmVersion('package.json')
-                    name = result[0]
-                    version = result[1]
-                    //删除上一次打包时候的tar包
-                    sh """ rm -fr target
-                        mkdir target
-                        tar --exclude-vcs -czvf target/${name}-${version}-${env.GIT_COMMIT.take(8)}-BETA-${systime}.tar.gz dist/ """
-                    archiveArtifacts 'target/*.tar.gz'
-                    currentBuild.description = "Start By ${env.BUILD_USER} And Build Success"
-                }
-            }
-        }
-        failure {
-            wrap([$class: 'BuildUser']) {
-                script {
-                    currentBuild.description = "Start By ${env.BUILD_USER} And Build Failure"
-                }
-            }
-        }
-    }
-}