Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added notifications-core and notifications to 2.0 and add integTest manifest #1957

Merged
merged 7 commits into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions manifests/2.0.0/opensearch-2.0.0-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
schema-version: '1.0'
name: OpenSearch
ci:
image:
name: opensearchstaging/ci-runner-centos7-opensearch-build-v1
args: -e JAVA_HOME=/opt/java/openjdk-17
components:
- name: index-management
integ-test:
build-dependencies:
- job-scheduler
test-configs:
- with-security
- without-security
additional-cluster-configs:
path.repo: [/tmp]
bwc-test:
test-configs:
- with-security
- without-security

- name: anomaly-detection
integ-test:
build-dependencies:
- job-scheduler
test-configs:
- with-security
- without-security
bwc-test:
test-configs:
- with-security
- without-security

- name: asynchronous-search
integ-test:
test-configs:
- with-security
- without-security
bwc-test:
test-configs:
- with-security
- without-security

- name: alerting
integ-test:
test-configs:
- with-security
- without-security
additional-cluster-configs:
plugins.destination.host.deny_list: [10.0.0.0/8, 127.0.0.1]
bwc-test:
test-configs:
- with-security
- without-security

- name: notifications
working-directory: notifications
integ-test:
test-configs:
- with-security
- without-security
bwc-test:
test-configs:
- with-security
- without-security

- name: sql
integ-test:
test-configs:
- with-security
- without-security
additional-cluster-configs:
script.context.field.max_compilations_rate: 1000/1m
bwc-test:
test-configs:
- with-security
- without-security

- name: k-NN
integ-test:
test-configs:
- with-security
- without-security
bwc-test:
test-configs:
- with-security
- without-security

- name: dashboards-reports
working-directory: reports-scheduler
integ-test:
test-configs:
- without-security
bwc-test:
test-configs:
- without-security

- name: observability
working-directory: opensearch-observability
integ-test:
test-configs:
- without-security
bwc-test:
test-configs:
- without-security

- name: ml-commons
integ-test:
test-configs:
- with-security
- without-security
bwc-test:
test-configs:
- with-security
- without-security
8 changes: 8 additions & 0 deletions manifests/2.0.0/opensearch-2.0.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ components:
checks:
- gradle:properties:version
- gradle:dependencies:opensearch.version
- name: notifications-core
repository: https://github.com/opensearch-project/notifications.git
ref: main
working_directory: notifications/core
- name: notifications
repository: https://github.com/opensearch-project/notifications.git
ref: main
working_directory: notifications/notifications
- name: alerting
repository: https://github.com/opensearch-project/alerting.git
ref: main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function usage() {
echo ""
echo "Arguments:"
echo -e "-v VERSION\t[Required] OpenSearch version."
echo -e "-q QUALIFIER\t[Optional] Version qualifier."
echo -e "-q QUALIFIER\t[Optional] Build qualifier."
echo -e "-s SNAPSHOT\t[Optional] Build a snapshot, default is 'false'."
echo -e "-p PLATFORM\t[Optional] Platform, ignored."
echo -e "-a ARCHITECTURE\t[Optional] Build architecture, ignored."
Expand Down Expand Up @@ -58,25 +58,21 @@ while getopts ":h:v:q:s:o:p:a:" arg; do
done

if [ -z "$VERSION" ]; then
echo "Error: You must specify the OpenSearch Dashboards version"
echo "Error: You must specify the OpenSearch version"
usage
exit 1
fi

[[ ! -z "$QUALIFIER" ]] && VERSION=$VERSION-$QUALIFIER
[[ "$SNAPSHOT" == "true" ]] && VERSION=$VERSION-SNAPSHOT
[ -z "$OUTPUT" ] && OUTPUT=artifacts
[ ! -z "$QUALIFIER" ] && QUALIFIER_IDENTIFIER="-$QUALIFIER"

mkdir -p $OUTPUT/plugins
# For hybrid plugin it actually resides in 'notificationsDashboards/dashboards-notifications'
PLUGIN_FOLDER=$(basename "$PWD")
PLUGIN_NAME=$(basename $(dirname "$PWD"))
# TODO: [CLEANUP] Needed OpenSearch Dashboards git repo to build the required modules for plugins
# This makes it so there is a dependency on having Dashboards pulled already.
cp -r ../$PLUGIN_FOLDER/ ../../OpenSearch-Dashboards/plugins
echo "BUILD MODULES FOR $PLUGIN_NAME"
(cd ../../OpenSearch-Dashboards && source $NVM_DIR/nvm.sh && nvm use && yarn osd bootstrap)
echo "BUILD RELEASE ZIP FOR $PLUGIN_NAME"
(cd ../../OpenSearch-Dashboards && source $NVM_DIR/nvm.sh && nvm use && cd plugins/$PLUGIN_FOLDER && yarn plugin_helpers build --opensearch-dashboards-version=$VERSION$QUALIFIER_IDENTIFIER)
echo "COPY $PLUGIN_NAME.zip"
cp -r ../../OpenSearch-Dashboards/plugins/$PLUGIN_FOLDER/build/$PLUGIN_NAME-$VERSION$QUALIFIER_IDENTIFIER.zip $OUTPUT/plugins/
rm -rf ../../OpenSearch-Dashboards/plugins/$PLUGIN_FOLDER

# Go to the first notifications folder, which holds the core folder and the second notifications folder
cd ../
./gradlew publishToMavenLocal -PexcludeTests="**/SesChannelIT*" -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER
./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER

mkdir -p core/$OUTPUT/plugins
notifCoreZipPath=$(ls core/build/distributions/ | grep .zip)
cp -v core/build/distributions/$notifCoreZipPath core/$OUTPUT/plugins
26 changes: 14 additions & 12 deletions scripts/components/notifications/build.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ function usage() {
echo ""
echo "Arguments:"
echo -e "-v VERSION\t[Required] OpenSearch version."
echo -e "-q QUALIFIER\t[Optional] Build qualifier."
echo -e "-s SNAPSHOT\t[Optional] Build a snapshot, default is 'false'."
echo -e "-p PLATFORM\t[Optional] Platform, ignored."
echo -e "-a ARCHITECTURE\t[Optional] Build architecture, ignored."
echo -e "-o OUTPUT\t[Optional] Output path, default is 'artifacts'."
echo -e "-h help"
}

while getopts ":h:v:s:o:p:a:" arg; do
while getopts ":h:v:q:s:o:p:a:" arg; do
case $arg in
h)
usage
Expand All @@ -29,6 +30,9 @@ while getopts ":h:v:s:o:p:a:" arg; do
v)
VERSION=$OPTARG
;;
q)
QUALIFIER=$OPTARG
;;
s)
SNAPSHOT=$OPTARG
;;
Expand Down Expand Up @@ -59,19 +63,17 @@ if [ -z "$VERSION" ]; then
exit 1
fi

[[ ! -z "$QUALIFIER" ]] && VERSION=$VERSION-$QUALIFIER
[[ "$SNAPSHOT" == "true" ]] && VERSION=$VERSION-SNAPSHOT
[ -z "$OUTPUT" ] && OUTPUT=artifacts

mkdir -p $OUTPUT/maven
mkdir -p $OUTPUT/plugins
# Go to the first notifications folder, which holds the core folder and the second notifications folder
cd ../
./gradlew publishToMavenLocal -PexcludeTests="**/SesChannelIT*" -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER
./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER

mkdir -p notifications/$OUTPUT/plugins

cd notifications
./gradlew publishToMavenLocal -PexcludeTests="**/SesChannelIT*" -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
cd ..
notifCoreZipPath=$(ls notifications/build/distributions/ | grep .zip)
cp -v notifications/build/distributions/$notifCoreZipPath notifications/$OUTPUT/plugins

zipPath=$(find . -path \*notifications/build/distributions/*.zip)
distributions="$(dirname "${zipPath}")"
echo "COPY ${distributions}/*.zip"
mkdir -p $OUTPUT/plugins
cp ${distributions}/*.zip ./$OUTPUT/plugins