Skip to content

Commit 15dce8e

Browse files
committed
Fix CI: Use container env vars for Oracle user
Instead of manually creating the 'root' user with SQL*Plus, rely on the `gvenzl/oracle-free` container's initialization features (`APP_USER` and `APP_USER_PASSWORD`) which were already configured in `docker-compose.yml`. Removed the SQL*Plus installation and user creation steps from the CI workflow.
1 parent 414f9f8 commit 15dce8e

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,27 +78,15 @@ jobs:
7878
sudo apt-get install -y alien libaio1t64 libodbcinst2 unixodbc
7979
wget https://download.oracle.com/otn_software/linux/instantclient/2114000/oracle-instantclient-basic-21.14.0.0.0-1.el8.x86_64.rpm
8080
wget https://download.oracle.com/otn_software/linux/instantclient/2114000/oracle-instantclient-odbc-21.14.0.0.0-1.el8.x86_64.rpm
81-
wget https://download.oracle.com/otn_software/linux/instantclient/2114000/oracle-instantclient-sqlplus-21.14.0.0.0-1.el8.x86_64.rpm
8281
sudo alien -i oracle-instantclient-basic-21.14.0.0.0-1.el8.x86_64.rpm
8382
sudo alien -i oracle-instantclient-odbc-21.14.0.0.0-1.el8.x86_64.rpm
84-
sudo alien -i oracle-instantclient-sqlplus-21.14.0.0.0-1.el8.x86_64.rpm
8583
sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/libaio.so.1
8684
echo "[Oracle 21 ODBC driver]" | sudo tee -a /etc/odbcinst.ini
8785
echo "Description = Oracle ODBC driver for Oracle 21c" | sudo tee -a /etc/odbcinst.ini
8886
echo "Driver = /usr/lib/oracle/21/client64/lib/libsqora.so.21.1" | sudo tee -a /etc/odbcinst.ini
8987
echo "LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
9088
- name: Start database container
9189
run: docker compose up --wait ${{ matrix.container }}
92-
- name: Create Oracle user
93-
if: matrix.database == 'oracle'
94-
run: |
95-
export LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib:$LD_LIBRARY_PATH
96-
/usr/lib/oracle/21/client64/bin/sqlplus sys/Password123!@//127.0.0.1:1521/FREE as sysdba <<EOF
97-
CREATE USER root IDENTIFIED BY "Password123!";
98-
GRANT CONNECT, RESOURCE, DBA TO root;
99-
ALTER USER root QUOTA UNLIMITED ON USERS;
100-
EXIT;
101-
EOF
10290
- name: Show container logs
10391
if: failure()
10492
run: docker compose logs ${{ matrix.container }}

0 commit comments

Comments
 (0)