From 4530648a0ecaa00abe3ea16e8a5fc5a4e33a4891 Mon Sep 17 00:00:00 2001
From: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
Date: Tue, 25 Oct 2022 09:43:35 +0200
Subject: [PATCH] build no-jdk distributions as part of release build

with commit e3572464859 the `build.sh` has been moved to this repository
and with commit dfa1118eee8 the missing no-jdk builds have been added.
with these preliminary works done we can now start building the no-jdk
distributions as part of the release build so that they can then be
published.

this is part of opensearch-project/opensearch-build#99.

Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
---
 CHANGELOG.md     | 1 +
 scripts/build.sh | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8b2609f1c5fd5..1972ea21ff2d9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -42,6 +42,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
 - Add dev help in gradle check CI failures ([4872](https://github.com/opensearch-project/OpenSearch/pull/4872))
 - Copy `build.sh` over from opensearch-build ([#4887](https://github.com/opensearch-project/OpenSearch/pull/4887))
 - Add project health badges to the README.md ([#4843](https://github.com/opensearch-project/OpenSearch/pull/4843))
+- Build no-jdk distributions as part of release build ([#4902](https://github.com/opensearch-project/OpenSearch/pull/4902))
 
 ### Dependencies
 - Bumps `log4j-core` from 2.18.0 to 2.19.0
diff --git a/scripts/build.sh b/scripts/build.sh
index a0917776507be..16906bf39fbc7 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -139,7 +139,7 @@ esac
 
 echo "Building OpenSearch for $PLATFORM-$DISTRIBUTION-$ARCHITECTURE"
 
-./gradlew :distribution:$TYPE:$TARGET:assemble -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER
+./gradlew :distribution:$TYPE:$TARGET:assemble :distribution:$TYPE:no-jdk-$TARGET:assemble -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER
 
 # Copy artifact to dist folder in bundle build output
 [[ "$SNAPSHOT" == "true" ]] && IDENTIFIER="-SNAPSHOT"