From c170c795d046134caa5f3dcc977b787dba25e580 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Mon, 13 Oct 2025 11:07:57 -0400 Subject: Consolidate build yml files and adjust sqlcmd path for 2017 mssql image --- .builds/test-mssql-compat.yml | 20 -------------------- .builds/test-mysql-compat.yml | 19 ------------------- .builds/test-postgresql-compat.yml | 22 ---------------------- scripts/lib/docker.sh | 8 +++++++- 4 files changed, 7 insertions(+), 62 deletions(-) delete mode 100644 .builds/test-mssql-compat.yml delete mode 100644 .builds/test-mysql-compat.yml delete mode 100644 .builds/test-postgresql-compat.yml diff --git a/.builds/test-mssql-compat.yml b/.builds/test-mssql-compat.yml deleted file mode 100644 index 65848f4..0000000 --- a/.builds/test-mssql-compat.yml +++ /dev/null @@ -1,20 +0,0 @@ -image: archlinux -packages: - - go - - docker - - jq -sources: - - https://git.sr.ht/~eugenetriguba/bolt -triggers: - - action: email - condition: failure - to: builds@eugenetriguba.com -tasks: - - setup: | - sudo dockerd > /tmp/dockerd.log 2>&1 & - - test-mssql: | - cd bolt - ./scripts/test.sh mssql-2017-latest - ./scripts/test.sh mssql-2019-latest - ./scripts/test.sh mssql-2022-latest - ./scripts/test.sh mssql-2025-latest diff --git a/.builds/test-mysql-compat.yml b/.builds/test-mysql-compat.yml deleted file mode 100644 index d2d65b2..0000000 --- a/.builds/test-mysql-compat.yml +++ /dev/null @@ -1,19 +0,0 @@ -image: archlinux -packages: - - go - - docker - - jq -sources: - - https://git.sr.ht/~eugenetriguba/bolt -triggers: - - action: email - condition: failure - to: builds@eugenetriguba.com -tasks: - - setup: | - sudo dockerd > /tmp/dockerd.log 2>&1 & - - test-mysql: | - cd bolt - ./scripts/test.sh mysql-5.7 - ./scripts/test.sh mysql-8 - ./scripts/test.sh mysql-9 diff --git a/.builds/test-postgresql-compat.yml b/.builds/test-postgresql-compat.yml deleted file mode 100644 index d1f8e6e..0000000 --- a/.builds/test-postgresql-compat.yml +++ /dev/null @@ -1,22 +0,0 @@ -image: archlinux -packages: - - go - - docker - - jq -sources: - - https://git.sr.ht/~eugenetriguba/bolt -triggers: - - action: email - condition: failure - to: builds@eugenetriguba.com -tasks: - - setup: | - sudo dockerd > /tmp/dockerd.log 2>&1 & - - test-postgresql: | - cd bolt - ./scripts/test.sh postgresql-13 - ./scripts/test.sh postgresql-14 - ./scripts/test.sh postgresql-15 - ./scripts/test.sh postgresql-16 - ./scripts/test.sh postgresql-17 - ./scripts/test.sh postgresql-18 diff --git a/scripts/lib/docker.sh b/scripts/lib/docker.sh index 6a9f177..89a9beb 100644 --- a/scripts/lib/docker.sh +++ b/scripts/lib/docker.sh @@ -147,10 +147,16 @@ docker_start_mssql() { log_info "Starting MSSQL $version container '$container_name'..." + # MSSQL 2017 uses mssql-tools, 2019+ uses mssql-tools18 + local sqlcmd_path="/opt/mssql-tools18/bin/sqlcmd" + if [[ "$version" =~ ^2017 ]]; then + sqlcmd_path="/opt/mssql-tools/bin/sqlcmd" + fi + docker run --detach \ --name "$container_name" \ --publish 1433:1433 \ - --health-cmd "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P '$BOLT_MSSQL_SA_PASSWORD' -Q 'SELECT 1' -C || exit 1" \ + --health-cmd "$sqlcmd_path -S localhost -U sa -P '$BOLT_MSSQL_SA_PASSWORD' -Q 'SELECT 1' -C || exit 1" \ --health-interval 10s \ --health-timeout 3s \ --health-start-period 10s \ -- cgit v1.2.3