Skip to content

Commit

Permalink
chore: more setup for staging AMI
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Rose committed Oct 8, 2024
1 parent 9ad5b69 commit 86ba8d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ami-release-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set PostgreSQL versions
id: set-versions
run: |
VERSIONS=$(nix run nixpkgs#yq -- eval '.postgres_major[]' ansible/vars.yml | jq -R -s -c 'split("\n")[:-1]')
VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c 'split("\n")[:-1]')
echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT
build:
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Run checks if triggered manually
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
SUFFIX=$(nix run nixpkgs#yq -- eval '.postgres_release["postgres${{ matrix.postgres_version }}"]' ansible/vars.yml | sed -E 's/[0-9\.]+(.*)$/\1/')
SUFFIX=$(nix run nixpkgs#yq -- '.postgres_release["postgres${{ matrix.postgres_version }}"]' ansible/vars.yml | sed -E 's/[0-9\.]+(.*)$/\1/')
if [[ -z $SUFFIX ]] ; then
echo "Version must include non-numeric characters if built manually."
exit 1
Expand All @@ -75,7 +75,7 @@ jobs:

- name: Generate common-nix.vars.pkr.hcl
run: |
PG_VERSION=$(nix run nixpkgs#yq -- eval '.postgres_release["postgres${{ matrix.postgres_version }}"]' ansible/vars.yml)
PG_VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres${{ matrix.postgres_version }}"]' ansible/vars.yml)
echo "postgres-version = \"$PG_VERSION\"" > common-nix.vars.pkr.hcl
- name: Build AMI stage 1
Expand Down
4 changes: 2 additions & 2 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ postgres_major:

# Full version strings for each major version
postgres_release:
postgres15: "15.8.1.003"
postgres16: "16.3.1.000"
postgres15: "15.8.1.003-staging"
postgres16: "16.3.1.000-staging"

# Non Postgres Extensions
pgbouncer_release: "1.19.0"
Expand Down
2 changes: 1 addition & 1 deletion stage2-nix-psql.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ packer {
}

source "amazon-ebs" "ubuntu" {
ami_name = "${var.ami_name}-${var.postgres-version}-staging"
ami_name = "${var.ami_name}-${var.postgres-version}"
instance_type = "c6g.4xlarge"
region = "${var.region}"
source_ami_filter {
Expand Down

0 comments on commit 86ba8d8

Please sign in to comment.