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

Add SqlCl client #1455

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
12 changes: 10 additions & 2 deletions docker/pypi/wmagent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ ENV WMA_LOG_DIR=$WMA_CURRENT_DIR/logs
ENV WMA_DEPLOY_DIR=/usr/local
ENV WMA_ENV_FILE=$WMA_DEPLOY_DIR/deploy/env.sh
ENV WMA_SECRETS_FILE=$WMA_ADMIN_DIR/WMAgent.secrets
ENV ORACLE_PATH=$WMA_DEPLOY_DIR/etc/oracle


# Setting up users and previleges
RUN groupadd -g ${WMA_GID} ${WMA_GROUP}
Expand All @@ -47,6 +45,16 @@ RUN echo "${WMA_USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
ADD bin $WMA_DEPLOY_DIR/bin
ADD etc $WMA_DEPLOY_DIR/etc

# Oracle features (must be added after bin/):
ENV ORACLE_PATH=$WMA_DEPLOY_DIR/etc/oracle
ENV SQLCL_VER=sqlcl-23.4.0.023.2321
RUN wget -P $WMA_DEPLOY_DIR/ https://download.oracle.com/otn_software/java/sqldeveloper/${SQLCL_VER}.zip && \
echo "f0adb2b8b60c248f5f15e0dc1e95876262316460b4ebf85e601116d73dad19ce $WMA_DEPLOY_DIR/${SQLCL_VER}.zip" > $WMA_DEPLOY_DIR/${SQLCL_VER}.sha256 && \
sha256sum $WMA_DEPLOY_DIR/${SQLCL_VER}.sha256 && unzip -d $WMA_DEPLOY_DIR/ $WMA_DEPLOY_DIR/${SQLCL_VER}.zip
ENV PATH="$PATH:$WMA_DEPLOY_DIR/sqlcl/bin:"
RUN apt-get update
RUN apt-get install -y openjdk-17-jre && apt-get clean

# Add install script
ADD install.sh ${WMA_ROOT_DIR}/install.sh

Expand Down
2 changes: 1 addition & 1 deletion docker/pypi/wmagent/bin/manage-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ _exec_oracle() {
if $isInitCall || $hasArgs; then
( unset ORACLE_PATH; echo -e $execStr | sqlplus -NOLOGINTIME -S $ORACLE_USER/$ORACLE_PASS@$ORACLE_TNS )
elif $isPipe || ! $hasArgs; then
rlwrap -H $WMA_LOG_DIR/.sqlplus_history -pgreen sqlplus $ORACLE_USER/$ORACLE_PASS@$ORACLE_TNS
rlwrap -H $WMA_LOG_DIR/.sqlplus_history -pgreen sql $ORACLE_USER/$ORACLE_PASS@$ORACLE_TNS
else
echo "$FUNCNAME: ERROR: Unhandled type of call with: isPipe: $isPipe && noArgs: $noArgs && isInitCall: $isInitCall"
return $(false)
Expand Down