cc-docker/.github/workflows/ccdocker_demo_startup.yml

61 lines
1.7 KiB
YAML
Raw Normal View History

# This is the workflow for testing cc-docker startup in demo mode
# This will be automatic on specified event, but is set to manual while experimenting with workflows
name: ccdocker-demo-startup
# Controls when the action will run. Workflow runs when manually triggered using the UI
on:
workflow_dispatch:
jobs:
# This workflow contains a single job
demo-startup:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Set timeout
timeout-minutes: 10
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
2021-08-06 14:20:07 +02:00
# Checkout latest cc-docker, build and start containers
- name: Checkout latest cc-docker
uses: actions/checkout@v2
- name: Build containers
2021-08-03 18:22:39 +02:00
run: docker-compose -f "docker-compose.yml" build
- name: Run containers
2021-08-03 18:32:50 +02:00
run: docker-compose -f "docker-compose.yml" up -d
2021-08-06 14:20:07 +02:00
# Allow entrypoint of cc-php to load, then show container status and start accessTest
2021-08-04 14:54:51 +02:00
- name: Giving containers 60s to load
run: sleep 60s
2021-08-04 10:47:55 +02:00
- name: Show containers
run: docker ps -a
2021-08-06 14:20:07 +02:00
- name: Attempt to curl localhost:80/login
run: |
chmod +x ./.github/accessTest.sh
./.github/accessTest.sh
# Get logs and stop containers independent from accessTest result
2021-08-04 10:47:55 +02:00
- name: Get log from cc-nginx
2021-08-06 14:20:07 +02:00
if: always()
2021-08-04 10:47:55 +02:00
run: docker logs cc-nginx
- name: Get log from cc-redis
2021-08-06 14:20:07 +02:00
if: always()
run: docker logs cc-redis
2021-08-04 10:47:55 +02:00
- name: Get log from cc-db
2021-08-06 14:20:07 +02:00
if: always()
2021-08-04 10:47:55 +02:00
run: docker logs cc-db
- name: Get log from cc-php
2021-08-06 14:20:07 +02:00
if: always()
run: docker logs cc-php
- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.yml" down