Skip to content

Commit

Permalink
fix: add dgoss wait for fpm builds
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed Apr 3, 2024
1 parent cdbddfa commit 1dc7e92
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export DOCKER_BUILDKIT ?= 1
export COMPOSE_DOCKER_CLI_BUILD ?= 1

IMAGE_NAMESPACE ?= wayofdev/php-base
IMAGE_TEMPLATE ?= 8.1-supervisord-alpine
IMAGE_TEMPLATE ?= 8.3-fpm-alpine
IMAGE_TAG ?= $(IMAGE_NAMESPACE):$(IMAGE_TEMPLATE)-latest

DOCKERFILE_DIR ?= ./dist/base/$(IMAGE_TEMPLATE)
Expand Down
7 changes: 7 additions & 0 deletions src/Dockerfiles/base/goss_wait_fpm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---

process:
php-fpm:
running: true

...
File renamed without changes.
8 changes: 6 additions & 2 deletions src/group_vars/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ tpl_docker_tests:
- src: Dockerfiles/base/goss.yaml.j2
dst: "../dist/base/{{ php_version }}-{{ php_type }}-{{ os_name }}/goss.yaml"

tpl_docker_supervisor_tests:
- src: Dockerfiles/base/goss_wait.yaml
tpl_docker_fpm_tests:
- src: Dockerfiles/base/goss_wait_fpm.yaml
dst: "../dist/base/{{ php_version }}-fpm-{{ os_name }}/goss_wait.yaml"

tpl_docker_supervisord_tests:
- src: Dockerfiles/base/goss_wait_supervisord.yaml
dst: "../dist/base/{{ php_version }}-supervisord-{{ os_name }}/goss_wait.yaml"


Expand Down
15 changes: 13 additions & 2 deletions src/roles/base/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,18 @@
mode: "0644"
with_items:
- "{{ tpl_docker_tests }}"
when: php_type != 'supervisord'
when: php_type == 'cli'

- name: Generate Dockerfile Goss tests for fpm
ansible.builtin.template:
src: "{{ item.src }}"
dest: "{{ item.dst }}"
force: true
mode: "0644"
with_items:
- "{{ tpl_docker_tests }}"
- "{{ tpl_docker_fpm_tests }}"
when: php_type == 'fpm'

- name: Generate Dockerfile Goss tests for supervisord
ansible.builtin.template:
Expand All @@ -83,7 +94,7 @@
mode: "0644"
with_items:
- "{{ tpl_docker_tests }}"
- "{{ tpl_docker_supervisor_tests }}"
- "{{ tpl_docker_supervisord_tests }}"
when: php_type == 'supervisord'

...

0 comments on commit 1dc7e92

Please sign in to comment.