Skip to content

Commit

Permalink
Improve healthcheck for "db2" service
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Sep 20, 2023
1 parent f29467a commit c61c06d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- tests/**
push:
branches:
- "*.x"
# - "*.x"
paths:
- .github/workflows/continuous-integration.yml
- ci/**
Expand Down Expand Up @@ -540,19 +540,22 @@ jobs:
ibm_db2:
image: "icr.io/db2_community/db2:11.5.8.0"
env:
DB2INSTANCE: "db2inst1"
DB2INST1_PASSWORD: "Doctrine2018"
LICENSE: "accept"
DBNAME: "doctrine"

options: "--privileged=true"
options: >-
--health-cmd "su - ${DB2INSTANCE} -c \"db2 -t CONNECT TO ${DBNAME};\""
--health-interval 30s
--health-timeout 10s
--health-retries 5
--privileged
ports:
- "50000:50000"

steps:
- name: "Perform healthcheck from the outside"
run: "docker logs -f ${{ job.services.ibm_db2.id }} | sed '/(*) Setup has completed./ q'"

- name: "Create temporary tablespace"
run: "docker exec ${{ job.services.ibm_db2.id }} su - db2inst1 -c 'db2 -t CONNECT TO doctrine; db2 -t CREATE USER TEMPORARY TABLESPACE doctrine_tbsp PAGESIZE 4 K;'"

Expand Down

0 comments on commit c61c06d

Please sign in to comment.