Skip to content

Commit

Permalink
LDEV-4979 build: fix docker creds for PRs and sql server (5.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Aug 2, 2024
1 parent 33d4c01 commit 9ef2a5a
Showing 1 changed file with 63 additions and 26 deletions.
89 changes: 63 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,57 @@ jobs:
LUCEE_BUILD_JAVA_VERSION: 8
LUCEE_TEST_JAVA_VERSION: ''
services:
sql-server:
image: mcr.microsoft.com/mssql/server:2019-latest
ldap_with_creds:
image: ${{ (github.secret_source != 'none') && 'rroemhild/test-openldap' || '' }}
ports:
- 10389:10389
- 10636:10636
credentials:
username: ${{ secrets.DOCKERHUB_PUBLIC_USERNAME || ' ' }} # empty string to avoid invalid template
password: ${{ secrets.DOCKERHUB_PUBLIC_TOKEN || ' ' }}
ldap_no_creds:
image: ${{ (github.secret_source == 'none') && 'rroemhild/test-openldap' || '' }}
ports:
- 10389:10389
- 10636:10636
sql-server_with_creds:
image: ${{ (github.secret_source != 'none') && '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
greenmail:
image: greenmail/standalone:1.6.9
credentials:
username: ${{ secrets.DOCKERHUB_PUBLIC_USERNAME || ' ' }}
password: ${{ secrets.DOCKERHUB_PUBLIC_TOKEN || ' ' }}
sql-server_without_creds:
image: ${{ (github.secret_source == 'none') && '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:
- 3025:3025 #SMTP
- 3110:3110 #POP3
- 3143:3143 #IMAP
- 3465:3465 #SMTPS
- 3993:3993 #IMAPS
- 3995:3995 #POP3S
- 8080:8080 #API
- 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
redis_with_creds:
image: ${{ (github.secret_source != 'none') && 'redis' || '' }}
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps port 6379 on service container to the host
- 6379:6379
credentials:
username: ${{ secrets.DOCKERHUB_PUBLIC_USERNAME }}
password: ${{ secrets.DOCKERHUB_PUBLIC_TOKEN }}
ldap:
# image: kwart/ldap-server
image: rroemhild/test-openldap
ports:
- 10389:10389
- 10636:10636
credentials:
username: ${{ secrets.DOCKERHUB_PUBLIC_USERNAME }}
password: ${{ secrets.DOCKERHUB_PUBLIC_TOKEN }}
redis:
username: ${{ secrets.DOCKERHUB_PUBLIC_USERNAME || ' ' }}
password: ${{ secrets.DOCKERHUB_PUBLIC_TOKEN || ' ' }}
redis_without_creds:
# Docker Hub image
image: redis
image: ${{ (github.secret_source == 'none') && 'redis' || '' }}
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
Expand All @@ -72,9 +89,29 @@ jobs:
ports:
# Maps port 6379 on service container to the host
- 6379:6379
greenmail_with_creds:
image: ${{ (github.secret_source != 'none') && 'greenmail/standalone:1.6.9' || '' }}
ports:
- 3025:3025 #SMTP
- 3110:3110 #POP3
- 3143:3143 #IMAP
- 3465:3465 #SMTPS
- 3993:3993 #IMAPS
- 3995:3995 #POP3S
- 8080:8080 #API
credentials:
username: ${{ secrets.DOCKERHUB_PUBLIC_USERNAME }}
password: ${{ secrets.DOCKERHUB_PUBLIC_TOKEN }}
username: ${{ secrets.DOCKERHUB_PUBLIC_USERNAME || ' ' }}
password: ${{ secrets.DOCKERHUB_PUBLIC_TOKEN || ' ' }}
greenmail_no_creds:
image: ${{ (github.secret_source == 'none') && 'greenmail/standalone:1.6.9' || '' }}
ports:
- 3025:3025 #SMTP
- 3110:3110 #POP3
- 3143:3143 #IMAP
- 3465:3465 #SMTPS
- 3993:3993 #IMAPS
- 3995:3995 #POP3S
- 8080:8080 #API
steps:
# when workflow is run via a workflow_call, these vars are found under input, which doesn't exist otherwise
# so lets copy them over to the normal env vars
Expand Down

0 comments on commit 9ef2a5a

Please sign in to comment.