Skip to content

Commit

Permalink
Update Tableau connector generation scripts (elastic#71614)
Browse files Browse the repository at this point in the history
This updates the output directory, to better align with the stack
building infrastructure.

(cherry picked from commit 6d1d8dc)
  • Loading branch information
bpintea committed Apr 13, 2021
1 parent a49341c commit 463f853
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions x-pack/plugin/sql/connectors/tableau/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ TAB_SDK_TAG="tdvt-2.1.9"
MY_NAME="Packager for Elastic's Tableau connector to Elasticsearch"
MY_FILE=$(basename $0)
MY_WORKSPACE=$(realpath ${PACKAGE_WORKSPACE:-build})
MY_OUT_DIR=$MY_WORKSPACE/distributions
MY_TOP_DIR=$(dirname $(realpath $0))
SRC_DIR=connector

Expand Down Expand Up @@ -82,14 +83,16 @@ function package() {

# finally, create the connector
python -m connector_packager.package $MY_WORKSPACE/$SRC_DIR
cp -f packaged-connector/$OUT_TACO $MY_WORKSPACE/$ES_TACO
mkdir -p $MY_OUT_DIR
cp -f packaged-connector/$OUT_TACO $MY_OUT_DIR/$ES_TACO

log "TACO packaged under: $MY_WORKSPACE/$ES_TACO"
log "TACO packaged under: $MY_OUT_DIR/$ES_TACO"
}

function sha() {
cd $MY_WORKSPACE
cd $MY_OUT_DIR
sha512sum $ES_TACO > $ES_TACO.sha512
echo $(cat $ES_TACO.sha512)
}

# Vars:
Expand Down Expand Up @@ -201,7 +204,7 @@ function read_cmd_params() {
}

function sign() {
for taco in $(ls -t $MY_WORKSPACE/*.taco 2>/dev/null); do
for taco in $(ls -t $MY_OUT_DIR/*.taco 2>/dev/null); do
jarsigner $taco $SIGN_PARAMS
jarsigner -verify -verbose -certs $taco

Expand All @@ -210,7 +213,7 @@ function sign() {
done

if [ -z $taco ]; then
die "No connector to sign found under: $MY_WORKSPACE/" \
die "No connector to sign found under: $MY_OUT_DIR/" \
"\nCall 'assemble' first."
fi

Expand Down

0 comments on commit 463f853

Please sign in to comment.