Skip to content

Commit fb5cbca

Browse files
Merge branch 'ppc64le:master' into master
2 parents 5d230c6 + e7d05a1 commit fb5cbca

5 files changed

Lines changed: 224 additions & 2 deletions

File tree

o/opensearch-project-index-management/build_info.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
"package_name": "opensearch-project-index-management",
44
"github_url": "https://github.com/opensearch-project/index-management",
55
"version": "2.19.2.0",
6-
"required_versions":{"Releases": ["*"], "Tags": ["3.3.0.0"]},
6+
"required_versions":{"Releases": ["*"], "Tags": ["3.5.0.0"]},
77
"default_branch": "main",
88
"package_dir": "o/opensearch-project-index-management",
99
"build_script": "opensearch-project-index-management_3.3.0.0_ubi_9.6.sh",
1010
"validate_build_script": true,
1111
"use_non_root_user": true,
1212
"docker_build": false,
13+
"3.5.0.0": {
14+
"build_script": "opensearch-project-index-management_3.5.0.0_ubi_9.6.sh"
15+
},
1316
"3.3.0.0": {
1417
"build_script": "opensearch-project-index-management_3.3.0.0_ubi_9.6.sh"
1518
},
1619
"2.19.2.0": {
1720
"build_script": "opensearch-project-index-management_2.19.2.0_ubi_9.3.sh"
1821
}
19-
}
22+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff --git a/gradle.properties b/gradle.properties
2+
new file mode 100644
3+
index 0000000..4d41702
4+
--- /dev/null
5+
+++ b/gradle.properties
6+
@@ -0,0 +1,4 @@
7+
+org.gradle.native=false
8+
+
9+
+#Use plain console output (no rich formatting that requires native platform)
10+
+org.gradle.console=plain
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
diff --git a/build.gradle b/build.gradle
2+
index ff55bf02..7fecfcbd 100644
3+
--- a/build.gradle
4+
+++ b/build.gradle
5+
@@ -64,7 +64,7 @@ buildscript {
6+
notifications_core_build_download = 'https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/' + opensearch_no_snapshot +
7+
'/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-notifications-core-' + notifications_no_snapshot + '.zip'
8+
9+
- kotlin_version = System.getProperty("kotlin.version", "2.2.0")
10+
+ kotlin_version = System.getProperty("kotlin.version", "2.2.20")
11+
12+
security_plugin_version = System.getProperty("security.version", opensearch_build)
13+
ccr_version = System.getProperty("ccr.version", opensearch_build)
14+
@@ -201,8 +201,8 @@ ext {
15+
['esnode.pem', 'esnode-key.pem', 'kirk.pem', 'kirk-key.pem', 'root-ca.pem', 'sample.pem', 'test-kirk.jks'].forEach { file ->
16+
File local = getLayout().getBuildDirectory().file(file).get().getAsFile()
17+
download.run {
18+
- src "https://raw.githubusercontent.com/opensearch-project/security/refs/heads/main/bwc-test/src/test/resources/security/" + file
19+
- dest local
20+
+ src "https://raw.githubusercontent.com/opensearch-project/security/3.5/bwc-test/src/test/resources/security/" + file
21+
+ dest local
22+
overwrite false
23+
}
24+
processResources {
25+
diff --git a/gradle.properties b/gradle.properties
26+
index 86f05171..07e679b4 100644
27+
--- a/gradle.properties
28+
+++ b/gradle.properties
29+
@@ -1,5 +1,10 @@
30+
+org.gradle.native=false
31+
+
32+
+#Use plain console output (no rich formatting that requires native platform)
33+
+org.gradle.console=plain
34+
+
35+
# Kotlin compiler memory settings
36+
kotlin.daemon.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m
37+
38+
# Gradle daemon memory settings
39+
-org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m
40+
\ No newline at end of file
41+
+org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff --git a/gradle.properties b/gradle.properties
2+
new file mode 100644
3+
index 0000000..4d41702
4+
--- /dev/null
5+
+++ b/gradle.properties
6+
@@ -0,0 +1,4 @@
7+
+org.gradle.native=false
8+
+
9+
+#Use plain console output (no rich formatting that requires native platform)
10+
+org.gradle.console=plain
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
#!/bin/bash -ex
2+
# -----------------------------------------------------------------------------
3+
#
4+
# Package : index-management
5+
# Version : 3.5.0.0
6+
# Source repo : https://github.com/opensearch-project/index-management
7+
# Tested on : UBI:9.6
8+
# Language : Java
9+
# Ci-Check : True
10+
# Script License : Apache License, Version 2 or later
11+
# Maintainer : Jason Cho <jason.cho2@@ibm.com>
12+
#
13+
# Disclaimer : This script has been tested in non-root mode on given
14+
# ========== platform using the mentioned version of the package.
15+
# It may not work as expected with newer versions of the
16+
# package and/or distribution. In such case, please
17+
# contact "Maintainer" of this script.
18+
#
19+
# ---------------------------------------------------------------------------
20+
21+
22+
# ---------------------------
23+
# Configuration
24+
# ---------------------------
25+
26+
PACKAGE_NAME=index-management
27+
PACKAGE_URL=https://github.com/opensearch-project/index-management
28+
SCRIPT_PACKAGE_VERSION="3.5.0.0"
29+
PACKAGE_VERSION="${1:-$SCRIPT_PACKAGE_VERSION}"
30+
OPENSEARCH_VERSION="${PACKAGE_VERSION::-2}"
31+
RUNTESTS=1
32+
wdir="$(pwd)"
33+
SCRIPT=$(readlink -f $0)
34+
SCRIPT_DIR=$(dirname $SCRIPT)
35+
36+
37+
# -------------------
38+
# Parse CLI Arguments
39+
# -------------------
40+
for i in "$@"; do
41+
case $i in
42+
--skip-tests)
43+
RUNTESTS=0
44+
echo "Skipping tests"
45+
shift
46+
;;
47+
-*|--*)
48+
echo "Unknown option $i"
49+
exit 3
50+
;;
51+
*)
52+
PACKAGE_VERSION=$i
53+
echo "Building ${PACKAGE_NAME} ${PACKAGE_VERSION}"
54+
;;
55+
esac
56+
done
57+
58+
59+
# ---------------------------
60+
# Dependency Installation
61+
# ---------------------------
62+
sudo yum install -y git java-25-openjdk-devel
63+
export JAVA_HOME=/usr/lib/jvm/java-25-openjdk
64+
export PATH=$PATH:$JAVA_HOME/bin
65+
66+
sudo chown -R test_user:test_user /home/tester
67+
68+
#--------------------------------
69+
#Build opensearch-project and publish build tools
70+
#-------------------------------
71+
cd $wdir
72+
git clone https://github.com/opensearch-project/OpenSearch.git
73+
cd OpenSearch
74+
git checkout $OPENSEARCH_VERSION
75+
./gradlew -p distribution/archives/linux-ppc64le-tar assemble
76+
./gradlew -Prelease=true publishToMavenLocal
77+
./gradlew :build-tools:publishToMavenLocal
78+
79+
80+
# ------------------------------
81+
# Build Opensearch common-utils
82+
# ------------------------------
83+
cd $wdir
84+
git clone https://github.com/opensearch-project/common-utils.git
85+
cd common-utils
86+
git checkout $PACKAGE_VERSION
87+
git apply $SCRIPT_DIR/common-utils_${PACKAGE_VERSION}.patch
88+
./gradlew assemble
89+
./gradlew -Prelease=true publishToMavenLocal
90+
91+
92+
93+
# ---------------------------
94+
# Build Job Scheduler
95+
# ---------------------------
96+
cd $wdir
97+
git clone https://github.com/opensearch-project/job-scheduler
98+
cd job-scheduler
99+
git checkout $PACKAGE_VERSION
100+
git apply $SCRIPT_DIR/job-scheduler_${PACKAGE_VERSION}.patch
101+
./gradlew assemble
102+
./gradlew -Prelease=true publishToMavenLocal
103+
104+
105+
# ---------------------------
106+
# Clone and Prepare Repository
107+
# ---------------------------
108+
cd $wdir
109+
git clone $PACKAGE_URL
110+
cd $PACKAGE_NAME && git checkout $PACKAGE_VERSION
111+
git apply $SCRIPT_DIR/${PACKAGE_NAME}_${PACKAGE_VERSION}.patch
112+
113+
114+
# --------
115+
# Build
116+
# --------
117+
ret=0
118+
./gradlew build -x test -x integTest || ret=$?
119+
if [ $ret -ne 0 ]; then
120+
set +ex
121+
echo "------------------ ${PACKAGE_NAME}: Build Failed ------------------"
122+
exit 1
123+
fi
124+
125+
126+
# ---------------------------
127+
# Skip Tests?
128+
# ---------------------------
129+
if [ "$RUN_TESTS" -eq 0 ]; then
130+
set +ex
131+
echo "------------------ Complete: Build and install successful! Tests skipped. ------------------"
132+
exit 0
133+
fi
134+
135+
# ----------
136+
# Unit Test
137+
# ----------
138+
ret=0
139+
./gradlew test -x integTest || ret=$?
140+
if [ $ret -ne 0 ]; then
141+
set +ex
142+
echo "------------------ ${PACKAGE_NAME}: Unit Test Failed ------------------"
143+
exit 2
144+
fi
145+
146+
# -----------------
147+
# Integration Test
148+
# -----------------
149+
ret=0
150+
./gradlew integTest -PcustomDistributionUrl=$wdir/OpenSearch/distribution/archives/linux-ppc64le-tar/build/distributions/opensearch-min-$OPENSEARCH_VERSION-SNAPSHOT-linux-ppc64le.tar.gz -Dbuild.snapshot=false || ret=$?
151+
if [ $ret -ne 0 ]; then
152+
set +ex
153+
echo "------------------ ${PACKAGE_NAME}: Integration Test Failed ------------------"
154+
exit 2
155+
fi
156+
157+
set +ex
158+
echo "Complete: Build and Tests successful!"

0 commit comments

Comments
 (0)