Commit 869a325e authored by YM-RD-AP01\ymadmin's avatar YM-RD-AP01\ymadmin

20170121: Job [CoberturaPublisher] hierarchy deleted

Change performed by §N¨ήS
parent 59834c38
<?xml version='1.1' encoding='UTF-8'?>
<flow-definition plugin="workflow-job@2.32">
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.12">
<gitLabConnection>ylhealth</gitLabConnection>
</com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>
</properties>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps@2.67">
<script>#!/bin/groovy
pipeline {
tools {
nodejs &apos;default-nodejs&apos;
}
stages {
stage(&apos;Startup&apos;) {
steps {
script {
sh &apos;npm install&apos;
}
}
}
stage(&apos;Test&apos;) {
steps {
script {
sh &apos;npm run test&apos;
}
}
post {
always {
step([$class: &apos;CoberturaPublisher&apos;, coberturaReportFile: &apos;output/coverage/jest/cobertura-coverage.xml&apos;])
}
}
}
stage(&apos;Build&apos;) {
steps {
script {
sh &apos;npm start&apos;
sh &apos;npm pack&apos;
}
}
}
stage(&apos;Deploy&apos;) {
when {
expression {
currentBuild.result == null || currentBuild.result == &apos;SUCCESS&apos;
}
}
steps {
script {
def server = Artifactory.server &apos;My_Artifactory&apos;
uploadArtifact(server)
}
}
}
}
}
def uploadArtifact(server) {
def uploadSpec = &quot;&quot;&quot;{
&quot;files&quot;: [
{
&quot;pattern&quot;: &quot;continuous-test-code-coverage-guide*.tgz&quot;,
&quot;target&quot;: &quot;npm-stable/&quot;
}
]
}&quot;&quot;&quot;
server.upload(uploadSpec)
def buildInfo = Artifactory.newBuildInfo()
server.upload spec: uploadSpec, buildInfo: buildInfo
server.publishBuildInfo buildInfo
}</script>
<sandbox>true</sandbox>
</definition>
<triggers/>
<disabled>false</disabled>
</flow-definition>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment