From 7e85119ec6fe826b082ff3d61cf86d32f59bbec6 Mon Sep 17 00:00:00 2001 From: dblock Date: Tue, 12 Apr 2022 20:07:43 +0000 Subject: [PATCH 1/7] Added notifications-core and notifications to 2.0. Signed-off-by: dblock --- manifests/2.0.0/opensearch-2.0.0.yml | 14 ++++ .../components/notifications-core/build.sh | 80 +++++++++++++++++++ scripts/components/notifications/build.sh | 11 ++- 3 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 scripts/components/notifications-core/build.sh diff --git a/manifests/2.0.0/opensearch-2.0.0.yml b/manifests/2.0.0/opensearch-2.0.0.yml index 32e0069a3e..9e83880144 100644 --- a/manifests/2.0.0/opensearch-2.0.0.yml +++ b/manifests/2.0.0/opensearch-2.0.0.yml @@ -42,6 +42,20 @@ 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 + checks: + - gradle:properties:version + - gradle:dependencies:opensearch.version: notifications + - name: notifications + repository: https://github.com/opensearch-project/notifications.git + ref: main + working_directory: notifications + checks: + - gradle:properties:version + - gradle:dependencies:opensearch.version: notifications - name: alerting repository: https://github.com/opensearch-project/alerting.git ref: main diff --git a/scripts/components/notifications-core/build.sh b/scripts/components/notifications-core/build.sh new file mode 100644 index 0000000000..a8b5ff9534 --- /dev/null +++ b/scripts/components/notifications-core/build.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +# 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. + +set -ex + +function usage() { + echo "Usage: $0 [args]" + echo "" + echo "Arguments:" + echo -e "-v VERSION\t[Required] OpenSearch version." + echo -e "-q QUALIFIER\t[Optional] Version 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:q:s:o:p:a:" arg; do + case $arg in + h) + usage + exit 1 + ;; + v) + VERSION=$OPTARG + ;; + q) + QUALIFIER=$OPTARG + ;; + s) + SNAPSHOT=$OPTARG + ;; + o) + OUTPUT=$OPTARG + ;; + p) + PLATFORM=$OPTARG + ;; + a) + ARCHITECTURE=$OPTARG + ;; + :) + echo "Error: -${OPTARG} requires an argument" + usage + exit 1 + ;; + ?) + echo "Invalid option: -${arg}" + exit 1 + ;; + esac +done + +if [ -z "$VERSION" ]; then + 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 + +mkdir -p $OUTPUT/maven +mkdir -p $OUTPUT/plugins + +../gradlew publishToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT +../gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT + +zipPath=$(find . -path \*/build/distributions/*.zip) +distributions="$(dirname "${zipPath}")" +echo "COPY ${distributions}/*.zip" +mkdir -p $OUTPUT/plugins +cp ${distributions}/*.zip ./$OUTPUT/plugins \ No newline at end of file diff --git a/scripts/components/notifications/build.sh b/scripts/components/notifications/build.sh index 1749a768aa..bcca7ec6cd 100755 --- a/scripts/components/notifications/build.sh +++ b/scripts/components/notifications/build.sh @@ -13,6 +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 "-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." @@ -20,7 +21,7 @@ function usage() { 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 @@ -29,6 +30,9 @@ while getopts ":h:v:s:o:p:a:" arg; do v) VERSION=$OPTARG ;; + q) + QUALIFIER=$OPTARG + ;; s) SNAPSHOT=$OPTARG ;; @@ -59,16 +63,15 @@ 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 -cd notifications -./gradlew publishToMavenLocal -PexcludeTests="**/SesChannelIT*" -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT +./gradlew publishToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT ./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -cd .. zipPath=$(find . -path \*notifications/build/distributions/*.zip) distributions="$(dirname "${zipPath}")" From a7a0fb0a4398bf2998a04976fcf176cdddacf826 Mon Sep 17 00:00:00 2001 From: dblock Date: Tue, 12 Apr 2022 20:24:41 +0000 Subject: [PATCH 2/7] Remove scripts from opensearch-build. Signed-off-by: dblock --- manifests/2.0.0/opensearch-2.0.0.yml | 2 +- .../components/notifications-core/build.sh | 80 ------------------- scripts/components/notifications/build.sh | 80 ------------------- 3 files changed, 1 insertion(+), 161 deletions(-) delete mode 100644 scripts/components/notifications-core/build.sh delete mode 100755 scripts/components/notifications/build.sh diff --git a/manifests/2.0.0/opensearch-2.0.0.yml b/manifests/2.0.0/opensearch-2.0.0.yml index 9e83880144..7ac6f541b1 100644 --- a/manifests/2.0.0/opensearch-2.0.0.yml +++ b/manifests/2.0.0/opensearch-2.0.0.yml @@ -48,7 +48,7 @@ components: working_directory: notifications/core checks: - gradle:properties:version - - gradle:dependencies:opensearch.version: notifications + - gradle:dependencies:opensearch.version: notifications-core - name: notifications repository: https://github.com/opensearch-project/notifications.git ref: main diff --git a/scripts/components/notifications-core/build.sh b/scripts/components/notifications-core/build.sh deleted file mode 100644 index a8b5ff9534..0000000000 --- a/scripts/components/notifications-core/build.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -# 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. - -set -ex - -function usage() { - echo "Usage: $0 [args]" - echo "" - echo "Arguments:" - echo -e "-v VERSION\t[Required] OpenSearch version." - echo -e "-q QUALIFIER\t[Optional] Version 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:q:s:o:p:a:" arg; do - case $arg in - h) - usage - exit 1 - ;; - v) - VERSION=$OPTARG - ;; - q) - QUALIFIER=$OPTARG - ;; - s) - SNAPSHOT=$OPTARG - ;; - o) - OUTPUT=$OPTARG - ;; - p) - PLATFORM=$OPTARG - ;; - a) - ARCHITECTURE=$OPTARG - ;; - :) - echo "Error: -${OPTARG} requires an argument" - usage - exit 1 - ;; - ?) - echo "Invalid option: -${arg}" - exit 1 - ;; - esac -done - -if [ -z "$VERSION" ]; then - 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 - -mkdir -p $OUTPUT/maven -mkdir -p $OUTPUT/plugins - -../gradlew publishToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -../gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT - -zipPath=$(find . -path \*/build/distributions/*.zip) -distributions="$(dirname "${zipPath}")" -echo "COPY ${distributions}/*.zip" -mkdir -p $OUTPUT/plugins -cp ${distributions}/*.zip ./$OUTPUT/plugins \ No newline at end of file diff --git a/scripts/components/notifications/build.sh b/scripts/components/notifications/build.sh deleted file mode 100755 index bcca7ec6cd..0000000000 --- a/scripts/components/notifications/build.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -# 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. - -set -ex - -function usage() { - echo "Usage: $0 [args]" - echo "" - echo "Arguments:" - echo -e "-v VERSION\t[Required] OpenSearch version." - echo -e "-q QUALIFIER\t[Optional] Version 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:q:s:o:p:a:" arg; do - case $arg in - h) - usage - exit 1 - ;; - v) - VERSION=$OPTARG - ;; - q) - QUALIFIER=$OPTARG - ;; - s) - SNAPSHOT=$OPTARG - ;; - o) - OUTPUT=$OPTARG - ;; - p) - PLATFORM=$OPTARG - ;; - a) - ARCHITECTURE=$OPTARG - ;; - :) - echo "Error: -${OPTARG} requires an argument" - usage - exit 1 - ;; - ?) - echo "Invalid option: -${arg}" - exit 1 - ;; - esac -done - -if [ -z "$VERSION" ]; then - 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 - -mkdir -p $OUTPUT/maven -mkdir -p $OUTPUT/plugins - -./gradlew publishToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT - -zipPath=$(find . -path \*notifications/build/distributions/*.zip) -distributions="$(dirname "${zipPath}")" -echo "COPY ${distributions}/*.zip" -mkdir -p $OUTPUT/plugins -cp ${distributions}/*.zip ./$OUTPUT/plugins \ No newline at end of file From 1f73159915d416572e94a5088b70f0b82698af6e Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 12 Apr 2022 22:15:43 +0000 Subject: [PATCH 3/7] Remove dashboards notifications scripts to use the default one Signed-off-by: Peter Zhu --- .../notificationsDashboards/build.sh | 82 ------------------- 1 file changed, 82 deletions(-) delete mode 100755 scripts/components/notificationsDashboards/build.sh diff --git a/scripts/components/notificationsDashboards/build.sh b/scripts/components/notificationsDashboards/build.sh deleted file mode 100755 index fe2046e603..0000000000 --- a/scripts/components/notificationsDashboards/build.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash - -# 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. - -set -ex - -function usage() { - echo "Usage: $0 [args]" - echo "" - echo "Arguments:" - echo -e "-v VERSION\t[Required] OpenSearch version." - echo -e "-q QUALIFIER\t[Optional] Version 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:q:s:o:p:a:" arg; do - case $arg in - h) - usage - exit 1 - ;; - v) - VERSION=$OPTARG - ;; - q) - QUALIFIER=$OPTARG - ;; - s) - SNAPSHOT=$OPTARG - ;; - o) - OUTPUT=$OPTARG - ;; - p) - PLATFORM=$OPTARG - ;; - a) - ARCHITECTURE=$OPTARG - ;; - :) - echo "Error: -${OPTARG} requires an argument" - usage - exit 1 - ;; - ?) - echo "Invalid option: -${arg}" - exit 1 - ;; - esac -done - -if [ -z "$VERSION" ]; then - echo "Error: You must specify the OpenSearch Dashboards version" - usage - exit 1 -fi - -[ -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 \ No newline at end of file From e13dca160bb3f07aa620f1995c4fedce6aa7b6fe Mon Sep 17 00:00:00 2001 From: dblock Date: Tue, 12 Apr 2022 22:54:18 +0000 Subject: [PATCH 4/7] Remove CI checks for lack of gradlew. Signed-off-by: dblock --- manifests/2.0.0/opensearch-2.0.0.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/manifests/2.0.0/opensearch-2.0.0.yml b/manifests/2.0.0/opensearch-2.0.0.yml index 7ac6f541b1..252c7dc769 100644 --- a/manifests/2.0.0/opensearch-2.0.0.yml +++ b/manifests/2.0.0/opensearch-2.0.0.yml @@ -46,9 +46,6 @@ components: repository: https://github.com/opensearch-project/notifications.git ref: main working_directory: notifications/core - checks: - - gradle:properties:version - - gradle:dependencies:opensearch.version: notifications-core - name: notifications repository: https://github.com/opensearch-project/notifications.git ref: main From 0f25c2d3870070e7a43b885c3df3c744bbbd4a54 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 12 Apr 2022 23:46:15 +0000 Subject: [PATCH 5/7] Fix the second subfolder location after core Signed-off-by: Peter Zhu --- manifests/2.0.0/opensearch-2.0.0.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/manifests/2.0.0/opensearch-2.0.0.yml b/manifests/2.0.0/opensearch-2.0.0.yml index 252c7dc769..26b09c1f92 100644 --- a/manifests/2.0.0/opensearch-2.0.0.yml +++ b/manifests/2.0.0/opensearch-2.0.0.yml @@ -46,13 +46,10 @@ components: repository: https://github.com/opensearch-project/notifications.git ref: main working_directory: notifications/core - - name: notifications + - name: notifications-notifications repository: https://github.com/opensearch-project/notifications.git ref: main - working_directory: notifications - checks: - - gradle:properties:version - - gradle:dependencies:opensearch.version: notifications + working_directory: notifications/notifications - name: alerting repository: https://github.com/opensearch-project/alerting.git ref: main From 39bad6e5bef0494debc1a60c34b0022ba22629e6 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 13 Apr 2022 00:29:32 +0000 Subject: [PATCH 6/7] Add notifications related build scripts to build repo Signed-off-by: Peter Zhu --- .../components/notifications-core/build.sh | 82 +++++++++++++++++++ .../notifications-notifications/build.sh | 82 +++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 scripts/components/notifications-core/build.sh create mode 100644 scripts/components/notifications-notifications/build.sh diff --git a/scripts/components/notifications-core/build.sh b/scripts/components/notifications-core/build.sh new file mode 100644 index 0000000000..b0de8194bd --- /dev/null +++ b/scripts/components/notifications-core/build.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +# 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. + +set -ex + +function usage() { + echo "Usage: $0 [args]" + 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:q:s:o:p:a:" arg; do + case $arg in + h) + usage + exit 1 + ;; + v) + VERSION=$OPTARG + ;; + q) + QUALIFIER=$OPTARG + ;; + s) + SNAPSHOT=$OPTARG + ;; + o) + OUTPUT=$OPTARG + ;; + p) + PLATFORM=$OPTARG + ;; + a) + ARCHITECTURE=$OPTARG + ;; + :) + echo "Error: -${OPTARG} requires an argument" + usage + exit 1 + ;; + ?) + echo "Invalid option: -${arg}" + exit 1 + ;; + esac +done + +if [ -z "$VERSION" ]; then + 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 + +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 $OUTPUT/plugins + +notifCoreZipPath=$(ls core/build/distributions/ | grep .zip) +cp -v core/build/distributions/$notifCoreZipPath ./$OUTPUT/plugins + diff --git a/scripts/components/notifications-notifications/build.sh b/scripts/components/notifications-notifications/build.sh new file mode 100644 index 0000000000..ea93cc1f62 --- /dev/null +++ b/scripts/components/notifications-notifications/build.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +# 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. + +set -ex + +function usage() { + echo "Usage: $0 [args]" + 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:q:s:o:p:a:" arg; do + case $arg in + h) + usage + exit 1 + ;; + v) + VERSION=$OPTARG + ;; + q) + QUALIFIER=$OPTARG + ;; + s) + SNAPSHOT=$OPTARG + ;; + o) + OUTPUT=$OPTARG + ;; + p) + PLATFORM=$OPTARG + ;; + a) + ARCHITECTURE=$OPTARG + ;; + :) + echo "Error: -${OPTARG} requires an argument" + usage + exit 1 + ;; + ?) + echo "Invalid option: -${arg}" + exit 1 + ;; + esac +done + +if [ -z "$VERSION" ]; then + 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 + +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 $OUTPUT/plugins + +notifCoreZipPath=$(ls notifications/build/distributions/ | grep .zip) +cp -v notifications/build/distributions/$notifCoreZipPath ./$OUTPUT/plugins + From a3629842b9ce2cd3ec6b4543d90b812f918cf3b6 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 13 Apr 2022 01:26:52 +0000 Subject: [PATCH 7/7] Tweak build scripts to correctly move the zips Signed-off-by: Peter Zhu --- manifests/2.0.0/opensearch-2.0.0-test.yml | 116 ++++++++++++++++++ manifests/2.0.0/opensearch-2.0.0.yml | 2 +- .../components/notifications-core/build.sh | 8 +- .../build.sh | 7 +- 4 files changed, 121 insertions(+), 12 deletions(-) create mode 100644 manifests/2.0.0/opensearch-2.0.0-test.yml rename scripts/components/{notifications-notifications => notifications}/build.sh (93%) diff --git a/manifests/2.0.0/opensearch-2.0.0-test.yml b/manifests/2.0.0/opensearch-2.0.0-test.yml new file mode 100644 index 0000000000..e0955e50f4 --- /dev/null +++ b/manifests/2.0.0/opensearch-2.0.0-test.yml @@ -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 diff --git a/manifests/2.0.0/opensearch-2.0.0.yml b/manifests/2.0.0/opensearch-2.0.0.yml index 26b09c1f92..bcc267fd53 100644 --- a/manifests/2.0.0/opensearch-2.0.0.yml +++ b/manifests/2.0.0/opensearch-2.0.0.yml @@ -46,7 +46,7 @@ components: repository: https://github.com/opensearch-project/notifications.git ref: main working_directory: notifications/core - - name: notifications-notifications + - name: notifications repository: https://github.com/opensearch-project/notifications.git ref: main working_directory: notifications/notifications diff --git a/scripts/components/notifications-core/build.sh b/scripts/components/notifications-core/build.sh index b0de8194bd..841f9257a3 100644 --- a/scripts/components/notifications-core/build.sh +++ b/scripts/components/notifications-core/build.sh @@ -67,16 +67,12 @@ fi [[ "$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 $OUTPUT/plugins - +mkdir -p core/$OUTPUT/plugins notifCoreZipPath=$(ls core/build/distributions/ | grep .zip) -cp -v core/build/distributions/$notifCoreZipPath ./$OUTPUT/plugins - +cp -v core/build/distributions/$notifCoreZipPath core/$OUTPUT/plugins diff --git a/scripts/components/notifications-notifications/build.sh b/scripts/components/notifications/build.sh similarity index 93% rename from scripts/components/notifications-notifications/build.sh rename to scripts/components/notifications/build.sh index ea93cc1f62..298bdf15e1 100644 --- a/scripts/components/notifications-notifications/build.sh +++ b/scripts/components/notifications/build.sh @@ -67,16 +67,13 @@ fi [[ "$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 $OUTPUT/plugins +mkdir -p notifications/$OUTPUT/plugins notifCoreZipPath=$(ls notifications/build/distributions/ | grep .zip) -cp -v notifications/build/distributions/$notifCoreZipPath ./$OUTPUT/plugins +cp -v notifications/build/distributions/$notifCoreZipPath notifications/$OUTPUT/plugins