Skip to content

Commit

Permalink
fix sql server healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Aug 2, 2024
1 parent fa6e819 commit 3595a52
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 29 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/main-5.4.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Ant
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant

name: Java CI
name: Java CI Lucee 5.4

on: [push, pull_request,workflow_dispatch]

Expand All @@ -11,36 +11,36 @@ jobs:
runs-on: ubuntu-latest
services:
sql-server:
# Docker Hub image
image: mcr.microsoft.com/mssql/server:2019-latest
env:
MSSQL_PID: Express
ACCEPT_EULA: Y
SA_PASSWORD: Lucee!1433 # password must be complex or the service won't start
ports:
- 1433:1433
options: --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P ${SA_PASSWORD} -Q 'SELECT 1' || exit 1" --health-interval 10s --health-timeout 5s --health-retries 5
image: mcr.microsoft.com/mssql/server:2022-latest
env:
MSSQL_PID: Express
ACCEPT_EULA: Y
SA_PASSWORD: Lucee!1433 # password must be complex or the service won't start
ports:
- 1433:1433
options: --health-cmd="/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P ${SA_PASSWORD} -Q 'SELECT 1' || exit 1" --health-interval 10s --health-timeout 5s --health-retries 5

env:
luceeVersion: light-5.4.0.65-RC
luceeVersionQuery: 5.4/stable/light

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2
key: lucee-mssql
restore-keys: |
${{ runner.os }}-m2
maven-cache
- name: Cache Lucee files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: _actions/lucee/script-runner/main/lucee-download-cache
key: lucee-downloads-${{ env.luceeVersion }}
Expand All @@ -49,12 +49,12 @@ jobs:
- name: Build extension-jdbc-mssql with Ant
run: ant -noinput -verbose -buildfile build.xml
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mssql-lex
path: dist/*.lex
- name: Checkout Lucee
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: lucee/lucee
path: lucee
Expand All @@ -64,6 +64,7 @@ jobs:
webroot: ${{ github.workspace }}/lucee/test
execute: /bootstrap-tests.cfm
luceeVersion: ${{ env.luceeVersion }}
luceeVersionQuery: ${{ env.luceeVersionQuery }}
extensionDir: ${{ github.workspace }}/dist
extensions:
env:
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Ant
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant

name: Java CI
name: Java CI Lucee 6

on: [push, pull_request,workflow_dispatch]

Expand All @@ -11,50 +11,49 @@ jobs:
runs-on: ubuntu-latest
services:
sql-server:
# Docker Hub image
image: mcr.microsoft.com/mssql/server:2019-latest
image: mcr.microsoft.com/mssql/server:2022-latest
env:
MSSQL_PID: Express
ACCEPT_EULA: Y
SA_PASSWORD: Lucee!1433 # password must be complex or the service won't start
ports:
- 1433:1433
options: --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P ${SA_PASSWORD} -Q 'SELECT 1' || exit 1" --health-interval 10s --health-timeout 5s --health-retries 5

options: --health-cmd="/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P ${SA_PASSWORD} -Q 'SELECT 1' || exit 1" --health-interval 10s --health-timeout 5s --health-retries 5
env:
luceeVersion: light-6.0.0.419-SNAPSHOT
luceeVersion: light-6.1.0.243
luceeVersionQuery: 6/stable/light

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2
key: lucee-mssql
restore-keys: |
${{ runner.os }}-m2
maven-cache
- name: Cache Lucee files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: _actions/lucee/script-runner/main/lucee-download-cache
key: lucee-downloads-${{ env.luceeVersion }}
key: lucee-downloads
restore-keys: |
lucee-downloads
- name: Build extension-jdbc-mssql with Ant
run: ant -noinput -verbose -buildfile build.xml
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mssql-lex
path: dist/*.lex
- name: Checkout Lucee
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: lucee/lucee
path: lucee
Expand All @@ -64,6 +63,7 @@ jobs:
webroot: ${{ github.workspace }}/lucee/test
execute: /bootstrap-tests.cfm
luceeVersion: ${{ env.luceeVersion }}
luceeVersionQuery: ${{ env.luceeVersionQuery }}
extensionDir: ${{ github.workspace }}/dist
extensions:
env:
Expand Down

0 comments on commit 3595a52

Please sign in to comment.