forked from opensearch-project/opensearch-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassembleManifest.groovy
32 lines (29 loc) · 1016 Bytes
/
assembleManifest.groovy
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
/*
* 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.
*/
void call(Map args = [:]) {
lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm))
def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: args.buildManifest))
def filename = buildManifest.build.getFilename()
def baseUrl = buildManifest.getArtifactRootUrlWithoutDistribution("${PUBLIC_ARTIFACT_URL}", "${JOB_NAME}", "${BUILD_NUMBER}")
sh([
'./assemble.sh',
"\"${args.buildManifest}\"",
"--base-url ${baseUrl}"
].join(' '))
if (buildManifest.build.distribution == 'rpm') {
signArtifacts(
artifactPath: "rpm/dist/${filename}",
sigtype: '.rpm',
platform: 'linux'
)
buildYumRepo(
baseUrl: baseUrl,
buildManifest: args.buildManifest
)
}
}