Skip to content

Commit 0238179

Browse files
peterzhuamazonVijayanB
authored andcommitted
Resolve the gem building errors before docker creation (opensearch-project#43)
* Add new docker building scripts for logstash Signed-off-by: Peter Zhu <[email protected]> * Move build related vars to the top Signed-off-by: Peter Zhu <[email protected]> * Tweak and improve the docker script comments Signed-off-by: Peter Zhu <[email protected]> * Resolve gem building incorrectly due to move of spec files Signed-off-by: Peter Zhu <[email protected]>
1 parent 95ab822 commit 0238179

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

release/docker/build-docker-multi-arch.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
# SPDX-License-Identifier: Apache-2.0
55

6-
# This is intended to be run the plugin's root directory. `dockerfiles/run.sh`
7-
# Ensure you have Docker and docker-compose installed locally
6+
# This is intended to be run the plugin's root directory. `release/docker`
7+
# Ensure you have Docker Desktop installed as buildx only support Docker Desktop on macOS and Windows
8+
89
set -e
910

1011
# Variables

release/docker/build-plugin.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@
1212
# Ensure you have Docker installed locally and set the VERSION and BUILD_DATE environment variable.
1313
set -e
1414

15+
CURR_DIR=`dirname $(realpath $0)`; cd $CURR_DIR
16+
GIT_ROOT=`git rev-parse --show-toplevel`
17+
1518
echo 'Clear previous gem'
1619
echo -n "Remove "; rm -rfv logstash-output-opensearch*.gem
1720

1821
echo 'Copy gemspec'
19-
trap '{ echo -n "Remove "; rm -rfv logstash-output-opensearch.gemspec; }' INT TERM EXIT
20-
cp -v ../../logstash-output-opensearch.gemspec .
22+
cd $GIT_ROOT # We need to build the gem in root of this repo so .gemspec file contained locations are resolving correctly
2123

2224
echo 'Building plugin gem'
2325
gem build logstash-output-opensearch.gemspec
2426

27+
echo 'Move Gem Location'
28+
mv -v logstash-output-opensearch*.gem $CURR_DIR

0 commit comments

Comments
 (0)