From 5968616793ce4c24b53216e759ad47b9702f6618 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 16 Feb 2026 00:46:23 -0500 Subject: [PATCH 1/4] .github/workflows: add workflows for linting nomad and terraform formatting --- .github/workflows/nomad-lint.yml | 43 ++++++++++++++++++++++++++++ .github/workflows/terraform-lint.yml | 43 ++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 .github/workflows/nomad-lint.yml create mode 100644 .github/workflows/terraform-lint.yml diff --git a/.github/workflows/nomad-lint.yml b/.github/workflows/nomad-lint.yml new file mode 100644 index 00000000..b22e4176 --- /dev/null +++ b/.github/workflows/nomad-lint.yml @@ -0,0 +1,43 @@ +name: Lint Nomad files +on: + workflow_dispatch: + pull_request: + branches: + - master + paths: + - services/nomad/**.nomad + push: + branches: + - master + paths: + - services/nomad/**.nomad + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint Nomad files + runs-on: ubuntu-latest + container: + image: ghcr.io/void-linux/void-glibc + steps: + - name: Prepare container + run: | + xbps-install -Syu xbps && xbps-install -y void-repo-nonfree && \ + xbps-install -Syu && xbps-install -y nomad bash git + + - name: Checkout repo + uses: classabbyamp/treeless-checkout-action@v1 + + - name: Run Lints + run: | + rv=0 + printf "\033[1m=> Checking formatting of nomad files\033[0m\n" + nomad fmt -check -recursive services/nomad || rv=1 + if [ "$rv" -ne 0 ]; then + printf "\033[1m=> Some nomad files need formatting! Run 'nomad fmt' on the listed files. \033[0m\n" + fi + exit "$rv" + diff --git a/.github/workflows/terraform-lint.yml b/.github/workflows/terraform-lint.yml new file mode 100644 index 00000000..caca332d --- /dev/null +++ b/.github/workflows/terraform-lint.yml @@ -0,0 +1,43 @@ +name: Lint Terraform files +on: + workflow_dispatch: + pull_request: + branches: + - master + paths: + - terraform/**.tf + push: + branches: + - master + paths: + - terraform/**.tf + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint Terraform files + runs-on: ubuntu-latest + container: + image: ghcr.io/void-linux/void-glibc + steps: + - name: Prepare container + run: | + xbps-install -Syu xbps && xbps-install -y void-repo-nonfree && \ + xbps-install -Syu && xbps-install -y terraform bash git + + - name: Checkout repo + uses: classabbyamp/treeless-checkout-action@v1 + + - name: Run Lints + run: | + rv=0 + printf "\033[1m=> Checking formatting of terraform files\033[0m\n" + terraform fmt -check -recursive terraform || rv=1 + if [ "$rv" -ne 0 ]; then + printf "\033[1m=> Some terraform files need formatting! Run 'terraform fmt' on the listed files. \033[0m\n" + fi + exit "$rv" + From 301aae86217b9c24fed83ac28f5da3d06d30e47e Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 16 Feb 2026 01:05:26 -0500 Subject: [PATCH 2/4] terraform/**: terraform fmt --- terraform/hashistack/policy_buildbot.tf | 4 ++-- terraform/hashistack/policy_buildsync.tf | 8 ++++---- terraform/hashistack/policy_certs.tf | 4 ++-- terraform/hashistack/policy_popcorn.tf | 4 ++-- terraform/le/provider.tf | 2 +- terraform/le/variables.tf | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/terraform/hashistack/policy_buildbot.tf b/terraform/hashistack/policy_buildbot.tf index 1e894fef..222c2965 100644 --- a/terraform/hashistack/policy_buildbot.tf +++ b/terraform/hashistack/policy_buildbot.tf @@ -1,10 +1,10 @@ resource "nomad_acl_policy" "buildbot_worker_admin" { - name = "buildbot-worker-admin" + name = "buildbot-worker-admin" description = "Manage buildbot worker secrets in nomad variables" job_acl { namespace = "build" - job_id = "buildbot" + job_id = "buildbot" } rules_hcl = < Date: Mon, 16 Feb 2026 01:33:01 -0500 Subject: [PATCH 3/4] services/nomad/**: nomad fmt --- services/nomad/apps/alps.nomad | 8 +- services/nomad/apps/debuginfod.nomad | 34 ++++---- services/nomad/apps/devspace.nomad | 70 +++++++-------- services/nomad/apps/etherpad.nomad | 20 ++--- services/nomad/apps/feediverse.nomad | 16 ++-- services/nomad/apps/infradocs.nomad | 14 +-- services/nomad/apps/ircbot.nomad | 18 ++-- services/nomad/apps/maddy.nomad | 38 ++++---- services/nomad/apps/man-cgi.nomad | 16 ++-- services/nomad/apps/popcorn-report.nomad | 22 ++--- services/nomad/apps/popcorn.nomad | 34 ++++---- services/nomad/apps/void-docs.nomad | 14 +-- services/nomad/apps/void-updates.nomad | 12 +-- services/nomad/apps/xlocate.nomad | 18 ++-- services/nomad/apps/xmandump.nomad | 14 +-- services/nomad/apps/xq-api.nomad | 16 ++-- services/nomad/build/build-rsyncd.nomad | 42 ++++----- services/nomad/build/buildbot-worker.nomad | 86 +++++++++---------- services/nomad/build/buildbot.nomad | 70 +++++++-------- services/nomad/build/buildsync.nomad | 26 +++--- services/nomad/build/root-pkgs-httpd.nomad | 16 ++-- services/nomad/build/signing.nomad | 24 +++--- services/nomad/build/timefiles.nomad | 16 ++-- .../nomad/infrastructure/cert-renew.nomad | 18 ++-- .../nomad/infrastructure/nginx-control.nomad | 20 ++--- .../nomad/infrastructure/nginx-mirror.nomad | 26 +++--- .../nomad/infrastructure/terrastate.nomad | 44 +++++----- services/nomad/mirror/rsyncd.nomad | 16 ++-- services/nomad/mirror/shadow-rsyncd.nomad | 28 +++--- services/nomad/mirror/sync.nomad | 30 +++---- services/nomad/monitoring/alertmanager.nomad | 16 ++-- services/nomad/monitoring/alertrelay.nomad | 12 +-- services/nomad/monitoring/ccache.nomad | 20 ++--- services/nomad/monitoring/grafana.nomad | 54 ++++++------ services/nomad/monitoring/prometheus.nomad | 44 +++++----- services/nomad/monitoring/promtail.nomad | 22 ++--- services/nomad/monitoring/repo_exporter.nomad | 16 ++-- services/nomad/monitoring/ssl_exporter.nomad | 16 ++-- services/nomad/monitoring/vector.nomad | 12 +-- services/nomad/monitoring/vmlogs.nomad | 6 +- 40 files changed, 522 insertions(+), 522 deletions(-) diff --git a/services/nomad/apps/alps.nomad b/services/nomad/apps/alps.nomad index 14d73fab..af960ccc 100644 --- a/services/nomad/apps/alps.nomad +++ b/services/nomad/apps/alps.nomad @@ -1,7 +1,7 @@ job "alps" { datacenters = ["VOID"] - namespace = "apps-restricted" - type = "service" + namespace = "apps-restricted" + type = "service" group "app" { count = 1 @@ -16,7 +16,7 @@ job "alps" { port = "http" meta { nginx_enable = "true" - nginx_names = "alps.s.voidlinux.org alps.voidlinux.org" + nginx_names = "alps.s.voidlinux.org alps.voidlinux.org" } } @@ -25,7 +25,7 @@ job "alps" { config { image = "ghcr.io/void-linux/infra-alps:9cb23b09" - args = ["imaps://mx1.voidlinux.org:993", "smtps://mx1.voidlinux.org:465"] + args = ["imaps://mx1.voidlinux.org:993", "smtps://mx1.voidlinux.org:465"] } } } diff --git a/services/nomad/apps/debuginfod.nomad b/services/nomad/apps/debuginfod.nomad index 8e2d64f3..4cdd4136 100644 --- a/services/nomad/apps/debuginfod.nomad +++ b/services/nomad/apps/debuginfod.nomad @@ -1,21 +1,21 @@ job "debuginfod" { datacenters = ["VOID"] - namespace = "apps" - type = "service" + namespace = "apps" + type = "service" group "app" { count = 1 volume "binpkgs" { - type = "host" + type = "host" read_only = true - source = "root-pkgs" + source = "root-pkgs" } volume "debuginfod" { - type = "host" + type = "host" read_only = false - source = "debuginfod-data" + source = "debuginfod-data" } network { @@ -30,15 +30,15 @@ job "debuginfod" { port = "http" meta { nginx_enable = "true" - nginx_names = "debuginfod.s.voidlinux.org debuginfod.voidlinux.org" + nginx_names = "debuginfod.s.voidlinux.org debuginfod.voidlinux.org" } check { - type = "http" + type = "http" address_mode = "host" - path = "/metrics" - timeout = "30s" - interval = "15s" + path = "/metrics" + timeout = "30s" + interval = "15s" } } @@ -46,15 +46,15 @@ job "debuginfod" { driver = "docker" volume_mount { - volume = "binpkgs" + volume = "binpkgs" destination = "/binpkgs" - read_only = true + read_only = true } volume_mount { - volume = "debuginfod" + volume = "debuginfod" destination = "/debuginfod" - read_only = false + read_only = false } config { @@ -73,12 +73,12 @@ job "debuginfod" { resources { memory = 8000 - cpu = 6000 + cpu = 6000 } restart { attempts = 100 - delay = "30s" + delay = "30s" } } } diff --git a/services/nomad/apps/devspace.nomad b/services/nomad/apps/devspace.nomad index 0e7a1bd5..efa7b78d 100644 --- a/services/nomad/apps/devspace.nomad +++ b/services/nomad/apps/devspace.nomad @@ -1,21 +1,21 @@ job "devspace" { datacenters = ["VOID-MIRROR"] - namespace = "apps" - type = "service" + namespace = "apps" + type = "service" group "sftpgo" { count = 1 volume "devspace_data" { - type = "host" + type = "host" read_only = false - source = "devspace_data" + source = "devspace_data" } volume "netauth_config" { - type = "host" + type = "host" read_only = true - source = "netauth_config" + source = "netauth_config" } network { @@ -31,13 +31,13 @@ job "devspace" { port = "http" meta { nginx_enable = "true" - nginx_names = "devspace-sftp.voidlinux.org" + nginx_names = "devspace-sftp.voidlinux.org" } check { - type = "http" - port = 8081 - path = "/healthz" - timeout = "1s" + type = "http" + port = 8081 + path = "/healthz" + timeout = "1s" interval = "30s" } } @@ -46,39 +46,39 @@ job "devspace" { driver = "docker" volume_mount { - volume = "devspace_data" + volume = "devspace_data" destination = "/data" - read_only = false + read_only = false } volume_mount { - volume = "netauth_config" + volume = "netauth_config" destination = "/etc/netauth" - read_only = true + read_only = true } config { - image = "ghcr.io/void-linux/infra-sftpgo:20241231R1" + image = "ghcr.io/void-linux/infra-sftpgo:20241231R1" network_mode = "host" } env { - SFTPGO_HTTPD__BINDINGS__0__PORT = "${NOMAD_PORT_http}" - SFTPGO_HTTPD__TEMPLATES_PATH = "/usr/share/sftpgo/templates" - SFTPGO_HTTPD__STATIC_FILES_PATH = "/usr/share/sftpgo/static" - SFTPGO_SFTPD__HOST_KEYS = "/secrets/id_rsa,/secrets/id_ecdsa,/secrets/id_ed25519" - SFTPGO_TELEMETRY__BIND_PORT = "8081" - SFTPGO_TELEMETRY__BIND_ADDRESS = "" - SFTPGO_DATA_PROVIDER__DRIVER = "sqlite" - SFTPGO_DATA_PROVIDER__NAME = "/data/sftpgo.db" + SFTPGO_HTTPD__BINDINGS__0__PORT = "${NOMAD_PORT_http}" + SFTPGO_HTTPD__TEMPLATES_PATH = "/usr/share/sftpgo/templates" + SFTPGO_HTTPD__STATIC_FILES_PATH = "/usr/share/sftpgo/static" + SFTPGO_SFTPD__HOST_KEYS = "/secrets/id_rsa,/secrets/id_ecdsa,/secrets/id_ed25519" + SFTPGO_TELEMETRY__BIND_PORT = "8081" + SFTPGO_TELEMETRY__BIND_ADDRESS = "" + SFTPGO_DATA_PROVIDER__DRIVER = "sqlite" + SFTPGO_DATA_PROVIDER__NAME = "/data/sftpgo.db" SFTPGO_DATA_PROVIDER__EXTERNAL_AUTH_HOOK = "/usr/libexec/sftpgo/netauth-hook" - SFTPGO_COMMAND__COMMANDS__0__PATH = "/usr/libexec/sftpgo/netauth-hook" - SFTPGO_COMMAND__COMMANDS__0__ENV = "SFTPGO_NETAUTH_REQUIREGROUP=devspace-users,SFTPGO_NETAUTH_HOMEDIR=/data/home" - SFTPGO_COMMAND__COMMANDS__0__HOOK = "external_auth" + SFTPGO_COMMAND__COMMANDS__0__PATH = "/usr/libexec/sftpgo/netauth-hook" + SFTPGO_COMMAND__COMMANDS__0__ENV = "SFTPGO_NETAUTH_REQUIREGROUP=devspace-users,SFTPGO_NETAUTH_HOMEDIR=/data/home" + SFTPGO_COMMAND__COMMANDS__0__HOOK = "external_auth" } template { - data = < Date: Mon, 16 Feb 2026 01:34:02 -0500 Subject: [PATCH 4/4] .git-blame-ignore-revs: add nomad/terraform fmt commits --- .git-blame-ignore-revs | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..e6eddc2a --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +1d72ba6c0beeb30d85d8021cb2004b3f6f48126d +301aae86217b9c24fed83ac28f5da3d06d30e47e