Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL: Update Tableau connector generation script #71614

Merged
merged 1 commit into from
Apr 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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