Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jenkins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ym
jenkins
Commits
55425f55
Commit
55425f55
authored
May 10, 2019
by
YM-RD-AP01\ymadmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20170121: Job [HRB_APP_Commit_Build] configuration updated
Change performed by §N¨ήS
parent
88fdf994
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
65 deletions
+4
-65
jobs/HRB_APP_Commit_Build/config.xml
jobs/HRB_APP_Commit_Build/config.xml
+4
-65
No files found.
jobs/HRB_APP_Commit_Build/config.xml
View file @
55425f55
...
...
@@ -47,74 +47,13 @@ Jenkins will send email to RD Team if build fails.</description>
<concurrentBuild>
false
</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>
#!/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
}
</command>
<command>
npm install
npm run test
</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.plugins.cobertura.CoberturaPublisher
plugin=
"cobertura@1.13"
>
<coberturaReportFile>
coverage
/coverage.xml
</coberturaReportFile>
<coberturaReportFile>
output/coverage/jest
/coverage.xml
</coberturaReportFile>
<onlyStable>
false
</onlyStable>
<failUnhealthy>
false
</failUnhealthy>
<failUnstable>
false
</failUnstable>
...
...
@@ -165,7 +104,7 @@ def uploadArtifact(server) {
<enableNewApi>
false
</enableNewApi>
</hudson.plugins.cobertura.CoberturaPublisher>
<hudson.tasks.junit.JUnitResultArchiver
plugin=
"junit@1.27"
>
<testResults>
coverage
/junit.xml
</testResults>
<testResults>
output/coverage/junit
/junit.xml
</testResults>
<keepLongStdio>
false
</keepLongStdio>
<healthScaleFactor>
1.0
</healthScaleFactor>
<allowEmptyResults>
false
</allowEmptyResults>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment