From 55425f558c78164a1d288fec7d9a0b2917373f0b Mon Sep 17 00:00:00 2001 From: "YM-RD-AP01\\ymadmin" Date: Fri, 10 May 2019 18:31:02 +0800 Subject: [PATCH] 20170121: Job [HRB_APP_Commit_Build] configuration updated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change performed by §N¨ήS --- jobs/HRB_APP_Commit_Build/config.xml | 69 ++-------------------------- 1 file changed, 4 insertions(+), 65 deletions(-) diff --git a/jobs/HRB_APP_Commit_Build/config.xml b/jobs/HRB_APP_Commit_Build/config.xml index 01fc7849..4ecda9c1 100644 --- a/jobs/HRB_APP_Commit_Build/config.xml +++ b/jobs/HRB_APP_Commit_Build/config.xml @@ -47,74 +47,13 @@ Jenkins will send email to RD Team if build fails. false - #!/bin/groovy -pipeline { - tools { - nodejs 'default-nodejs' - } - stages { - stage('Startup') { - steps { - script { - sh 'npm install' - } - } - } - stage('Test') { - steps { - script { - sh 'npm run test' - } - } - post { - always { - step([$class: 'CoberturaPublisher', coberturaReportFile: 'output/coverage/jest/cobertura-coverage.xml']) - } - } - } - stage('Build') { - steps { - script { - sh 'npm start' - sh 'npm pack' - } - } - } - stage('Deploy') { - when { - expression { - currentBuild.result == null || currentBuild.result == 'SUCCESS' - } - } - steps { - script { - def server = Artifactory.server 'My_Artifactory' - uploadArtifact(server) - } - } - } - } -} -def uploadArtifact(server) { - def uploadSpec = """{ - "files": [ - { - "pattern": "continuous-test-code-coverage-guide*.tgz", - "target": "npm-stable/" - } - ] - }""" - server.upload(uploadSpec) - - def buildInfo = Artifactory.newBuildInfo() - server.upload spec: uploadSpec, buildInfo: buildInfo - server.publishBuildInfo buildInfo -} + npm install +npm run test - coverage/coverage.xml + output/coverage/jest/coverage.xml false false false @@ -165,7 +104,7 @@ def uploadArtifact(server) { false - coverage/junit.xml + output/coverage/junit/junit.xml false 1.0 false -- 2.26.2