Skip to content

Commit

Permalink
Merge pull request #89 from anarazel/pr-85
Browse files Browse the repository at this point in the history
Remove version suffix from {Net,Open}BSD image family name.
  • Loading branch information
anarazel authored Jul 4, 2024
2 parents 57d05b7 + 5979bb9 commit fd5b9c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
9 changes: 3 additions & 6 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ task:
matrix:
- env:
PKRVARFILE: packer/openbsd.pkrvars.hcl
VERSION: 7-3
matrix:
- env:
TASK_NAME: openbsd-vanilla
Expand All @@ -192,7 +191,6 @@ task:

- env:
PKRVARFILE: packer/netbsd.pkrvars.hcl
VERSION: 9-3

matrix:
- env:
Expand Down Expand Up @@ -233,7 +231,6 @@ task:
-timestamp-ui \
-force \
-var-file="${PKRVARFILE}" \
-var "version=${VERSION}" \
-var "image_date=$DATE" \
-var "image_name=${IMAGE_NAME}" \
-var "prefix=${PREFIX}" \
Expand All @@ -250,7 +247,7 @@ task:
gcloud compute images update \
--project "$GCP_PROJECT" \
--family ${IMAGE_NAME}-${VERSION} \
--family ${IMAGE_NAME} \
${IMAGE_NAME}-${DATE}
Expand Down Expand Up @@ -367,11 +364,11 @@ task:
name: 'Testing VM Image: ${PREFIX}-${IMAGE_NAME}'
matrix:
- env:
IMAGE_NAME: netbsd-postgres-9-3
IMAGE_NAME: netbsd-postgres
PLATFORM: netbsd

- env:
IMAGE_NAME: openbsd-postgres-7-2
IMAGE_NAME: openbsd-postgres
PLATFORM: openbsd

depends_on:
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ pre-commit:
-var "image_date=$(IMAGE_DATE)" \
-var "image_name=netbsd-vanilla" \
-var "prefix=${PREFIX}" \
-var "version=${VERSION}" \
-var "bucket=somebucket" \
packer/netbsd_openbsd.pkr.hcl
# NetBSD Postgres
Expand All @@ -46,7 +45,6 @@ pre-commit:
-var "image_date=$(IMAGE_DATE)" \
-var "image_name=netbsd-postgres" \
-var "prefix=${PREFIX}" \
-var "version=${VERSION}" \
-var "bucket=somebucket" \
packer/netbsd_openbsd.pkr.hcl
# OpenBSD Vanilla
Expand All @@ -57,7 +55,6 @@ pre-commit:
-var "image_date=$(IMAGE_DATE)" \
-var "image_name=openbsd-vanilla" \
-var "prefix=${PREFIX}" \
-var "version=${VERSION}" \
-var "bucket=somebucket" \
packer/netbsd_openbsd.pkr.hcl
# OpenBSD Postgres
Expand All @@ -68,6 +65,5 @@ pre-commit:
-var "image_date=$(IMAGE_DATE)" \
-var "image_name=openbsd-postgres" \
-var "prefix=${PREFIX}" \
-var "version=${VERSION}" \
-var "bucket=somebucket" \
packer/netbsd_openbsd.pkr.hcl
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ The following images are available:
[official GCP images](https://cloud.google.com/compute/docs/images#freebsd).)

- NetBSD and OpenBSD images are available both with and without Postgres,
in families `pg-ci-{net,open}bsd-{vanilla,postgres}-$version`. Find
the current value of `$version` in
[packer/netbsd.pkrvars.hcl](packer/netbsd.pkrvars.hcl) and
[packer/openbsd.pkrvars.hcl](packer/openbsd.pkrvars.hcl).
in families `pg-ci-{net,open}bsd-{vanilla,postgres}`.


## How it works
Expand Down
3 changes: 1 addition & 2 deletions packer/netbsd_openbsd.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ variable "name" { type = string }
variable "output_file_name" { type = string }
variable "postgres_name" { type = list(map(string)) }
variable "vanilla_name" { type = list(map(string)) }
variable "version" { type = string }
variable "prefix" {type = string }

locals {
Expand Down Expand Up @@ -141,7 +140,7 @@ source "googlecompute" "postgres" {
disk_type = "pd-ssd"
preemptible = "true"
project_id = "${var.gcp_project}"
source_image_family = "${var.prefix}-${var.name}-vanilla-${var.version}"
source_image_family = "${var.prefix}-${var.name}-vanilla"
source_image_project_id = ["${var.gcp_project}"]
image_name = local.image_identity
instance_name = "build-${local.image_identity}"
Expand Down

0 comments on commit fd5b9c1

Please sign in to comment.