forked from opensearch-project/opensearch-build-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Messages_Jenkinsfile
34 lines (32 loc) · 890 Bytes
/
Messages_Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
def lib = library("jenkins")
pipeline {
agent none
stages {
stage('Example Build') {
steps {
script {
def messages = lib.jenkins.Messages.new(this)
messages.add("stage1", "message 1")
messages.add("stage2", "message 2")
}
}
}
post() {
success {
script {
def messages = lib.jenkins.Messages.new(this)
def stashed = messages.get(["stage1", "stage2"])
echo stashed
}
}
}
}
}