Skip to content

Commit 68a791e

Browse files
committed
fix(contributing): runnig formula inside container
1 parent 26f3fa2 commit 68a791e

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

postgres/codenamemap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
prepare_cluster:
3636
pgcommand: pg_createcluster {{ version }} {{ cluster_name }} -d
3737
user: root
38+
bake_image_run_cmd: pg_ctlcluster {{ version }} {{ cluster_name }} start
3839

3940
{% endmacro %}
4041

postgres/defaults.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ postgres:
7676
sysrc: false
7777

7878
bake_image: false
79+
bake_image_run_cmd: echo "do nothing by default"
7980

8081
fromrepo: ''
8182

postgres/server/image.sls

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,19 @@ include:
1010
1111
# An attempt to start PostgreSQL with `pg_ctl`
1212
13-
postgresql-start:
13+
postgresql-running:
1414
cmd.run:
15-
- name: pg_ctl -D {{ postgres.data_dir }} -l logfile start
15+
- name: {{ postgres.bake_image_run_cmd }}
1616
- runas: {{ postgres.user }}
1717
- unless:
1818
- ps -p $(head -n 1 {{ postgres.data_dir }}/postmaster.pid) 2>/dev/null
1919
- require:
2020
- file: postgresql-pg_hba
2121
22+
postgresql-service-reload:
23+
test.show_notification:
24+
- text: Imitating reload while baking an image
25+
2226
# Try to enable PostgreSQL in "manual" way
2327
2428
postgresql-enable:
@@ -34,11 +38,11 @@ postgresql-enable:
3438
- name: 'true'
3539
{%- endif %}
3640
- require:
37-
- cmd: postgresql-start
41+
- cmd: postgresql-running
3842
3943
{%- else %}
4044
41-
postgresql-start:
45+
postgresql-running:
4246
test.show_notification:
4347
- text: The 'postgres:bake_image' Pillar is disabled (set to 'False').
4448

0 commit comments

Comments
 (0)