Skip to content

Commit 67bc2c9

Browse files
committed
fix: define postgres major version
1 parent 5658e78 commit 67bc2c9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ebssurrogate/scripts/qemu-bootstrap-nix.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ callbacks_enabled = timer, profile_tasks, profile_roles
3636
EOF
3737
# Run Ansible playbook
3838
export ANSIBLE_LOG_PATH=/tmp/ansible.log && export ANSIBLE_REMOTE_TEMP=/mnt/tmp
39-
ansible-playbook ./ansible/playbook.yml --extra-vars '{"nixpkg_mode": true, "debpkg_mode": false, "stage2_nix": false}'
39+
ansible-playbook ./ansible/playbook.yml --extra-vars '{"nixpkg_mode": true, "debpkg_mode": false, "stage2_nix": false}' \
40+
--extra-vars "psql_version=psql_${POSTGRES_MAJOR_VERSION}"
4041
}
4142

4243
function setup_postgesql_env {
@@ -94,7 +95,8 @@ EOF
9495
export ANSIBLE_LOG_PATH=/tmp/ansible.log && export ANSIBLE_REMOTE_TEMP=/tmp
9596
ansible-playbook ./ansible/playbook.yml \
9697
--extra-vars '{"nixpkg_mode": false, "stage2_nix": true, "debpkg_mode": false, "qemu_mode": true}' \
97-
--extra-vars "git_commit_sha=${GIT_SHA}"
98+
--extra-vars "git_commit_sha=${GIT_SHA}" \
99+
--extra-vars "psql_version=psql_${POSTGRES_MAJOR_VERSION}"
98100
}
99101

100102
function clean_system {

qemu-arm64-nix.pkr.hcl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ build {
125125
provisioner "shell" {
126126
environment_vars = [
127127
"POSTGRES_SUPABASE_VERSION=${var.postgres-version}",
128-
"GIT_SHA=${var.git_sha}"
128+
"GIT_SHA=${var.git_sha}",
129+
"POSTGRES_MAJOR_VERSION=15" # TODO (darora): pass this in from vars
129130
]
130131
use_env_var_file = true
131132
script = "ebssurrogate/scripts/qemu-bootstrap-nix.sh"

0 commit comments

Comments
 (0)