forked from opensearch-project/opensearch-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
integ-test-notification.jenkinsfile
72 lines (69 loc) · 2.38 KB
/
integ-test-notification.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* 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.
*/
lib = library(identifier: '[email protected]', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
pipeline {
agent {
docker {
label 'Jenkins-Agent-AL2023-X64-M54xlarge-Docker-Host'
image 'opensearchstaging/ci-runner:ci-runner-al2-opensearch-build-v1'
registryUrl 'https://public.ecr.aws/'
alwaysPull true
}
}
options {
timeout(time: 1, unit: 'HOURS')
buildDiscarder(logRotator(daysToKeepStr: '30'))
}
triggers {
parameterizedCron('''
H */6 * * * %INPUT_MANIFEST=2.19.0/opensearch-2.19.0.yml
H */6 * * * %INPUT_MANIFEST=2.18.0/opensearch-2.18.0.yml
H */6 * * * %INPUT_MANIFEST=2.18.0/opensearch-dashboards-2.18.0.yml
''')
}
parameters {
string(
name: 'INPUT_MANIFEST',
description: 'Input manifest under the manifests folder, e.g. 2.0.0/opensearch-2.0.0.yml.',
trim: true
)
string(
name: 'DISTRIBUTION_NUMBER',
description: 'Ditribution number of OpenSearch/OpenSearch-Dashboards builds that was used to run the integration test. eg:10345',
trim: true
)
}
stages {
stage('Update integ tests failure issues') {
steps {
script {
if (params.INPUT_MANIFEST == '' || !fileExists("manifests/${params.INPUT_MANIFEST}")) {
currentBuild.result = 'ABORTED'
error("Failed to start the workflow. Input manifest was not provided or not found in manifests/${params.INPUT_MANIFEST}.")
}
currentBuild.description = INPUT_MANIFEST
updateIntegTestFailureIssues(
inputManifestPath: "manifests/${INPUT_MANIFEST}",
distributionBuildNumber: "${DISTRIBUTION_NUMBER}"
)
}
}
}
}
post() {
always {
script {
postCleanup()
}
}
}
}