Skip to content

Commit fcb1eb4

Browse files
author
R. Tyler Croy
authored
Merge pull request #49 from supereagle/master
Example of how to archive the build output artifacts
2 parents 8c87b1c + 77522b9 commit fcb1eb4

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This shows a simple example of how to archive the build output artifacts.
2+
node {
3+
stage "Create build output"
4+
5+
// Make the output directory.
6+
sh "mkdir -p output"
7+
8+
// Write an useful file, which is needed to be archived.
9+
writeFile file: "output/usefulfile.txt", text: "This file is useful, need to archive it."
10+
11+
// Write an useless file, which is not needed to be archived.
12+
writeFile file: "output/uselessfile.md", text: "This file is useless, no need to archive it."
13+
14+
stage "Archive build output"
15+
16+
// Archive the build output artifacts.
17+
archiveArtifacts artifacts: 'output/*.txt', excludes: 'output/*.md'
18+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Synopsis
2+
3+
This is a simple demonstration of how to archive the build output artifacts in workspace for later use.
4+

0 commit comments

Comments
 (0)