70
70
71
71
[ -z " $OUTPUT " ] && OUTPUT=artifacts
72
72
73
+ echo " Creating output directory $OUTPUT /maven/org/opensearch if it doesn't already exist"
73
74
mkdir -p $OUTPUT /maven/org/opensearch
74
75
75
76
# Build project and publish to maven local.
77
+ echo " Building and publishing OpenSearch project to Maven Local"
76
78
./gradlew publishToMavenLocal -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER
77
79
78
80
# Publish to existing test repo, using this to stage release versions of the artifacts that can be released from the same build.
81
+ echo " Publishing OpenSearch to Test Repository"
79
82
./gradlew publishNebulaPublicationToTestRepository -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER
80
83
81
84
# Copy maven publications to be promoted
85
+ echo " Copying Maven publications to $OUTPUT /maven/org"
82
86
cp -r ./build/local-test-repo/org/opensearch " ${OUTPUT} " /maven/org
83
87
84
88
# Assemble distribution artifact
@@ -103,6 +107,20 @@ case $PLATFORM-$DISTRIBUTION-$ARCHITECTURE in
103
107
TARGET=" $PLATFORM -arm64-$PACKAGE "
104
108
SUFFIX=" $PLATFORM -arm64"
105
109
;;
110
+ linux-deb-x64)
111
+ PACKAGE=" deb"
112
+ EXT=" deb"
113
+ TYPE=" packages"
114
+ TARGET=" deb"
115
+ SUFFIX=" amd64"
116
+ ;;
117
+ linux-deb-arm64)
118
+ PACKAGE=" deb"
119
+ EXT=" deb"
120
+ TYPE=" packages"
121
+ TARGET=" arm64-deb"
122
+ SUFFIX=" arm64"
123
+ ;;
106
124
linux-rpm-x64)
107
125
PACKAGE=" rpm"
108
126
EXT=" rpm"
@@ -142,20 +160,10 @@ echo "Building OpenSearch for $PLATFORM-$DISTRIBUTION-$ARCHITECTURE"
142
160
./gradlew :distribution:$TYPE :$TARGET :assemble -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER
143
161
144
162
# Copy artifact to dist folder in bundle build output
163
+ echo " Copying artifact to ${OUTPUT} /dist"
145
164
[[ " $SNAPSHOT " == " true" ]] && IDENTIFIER=" -SNAPSHOT"
146
165
ARTIFACT_BUILD_NAME=` ls distribution/$TYPE /$TARGET /build/distributions/ | grep " opensearch-min.*$SUFFIX .$EXT " `
166
+ # [WAZUH] Used by the GH workflow to upload the artifact
167
+ echo " $ARTIFACT_BUILD_NAME " > " $OUTPUT /artifact_name.txt"
147
168
mkdir -p " ${OUTPUT} /dist"
148
169
cp distribution/$TYPE /$TARGET /build/distributions/$ARTIFACT_BUILD_NAME " ${OUTPUT} " /dist/$ARTIFACT_BUILD_NAME
149
-
150
- echo " Building core plugins..."
151
- mkdir -p " ${OUTPUT} /core-plugins"
152
- cd plugins
153
- ../gradlew assemble -Dbuild.snapshot=" $SNAPSHOT " -Dbuild.version_qualifier=$QUALIFIER
154
- cd ..
155
- for plugin in plugins/* ; do
156
- PLUGIN_NAME=$( basename " $plugin " )
157
- if [ -d " $plugin " ] && [ " examples" != " $PLUGIN_NAME " ]; then
158
- PLUGIN_ARTIFACT_BUILD_NAME=` ls " $plugin " /build/distributions/ | grep " $PLUGIN_NAME .*$IDENTIFIER .zip" `
159
- cp " $plugin " /build/distributions/" $PLUGIN_ARTIFACT_BUILD_NAME " " ${OUTPUT} " /core-plugins/" $PLUGIN_ARTIFACT_BUILD_NAME "
160
- fi
161
- done
0 commit comments