Skip to content

Commit

Permalink
services/nomad/build/buildsync*.nomad: combine
Browse files Browse the repository at this point in the history
  • Loading branch information
classabbyamp committed Aug 18, 2023
1 parent c5cee5e commit 36a3c31
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 102 deletions.
94 changes: 0 additions & 94 deletions services/nomad/build/buildsync-musl.nomad

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
job "buildsync-aarch64" {
job "buildsync" {
type = "service"
datacenters = ["VOID"]
namespace = "build"

group "lsyncd" {
dynamic "group" {
for_each = [ "aarch64", "musl", ]

count = 1
network { mode = "bridge" }

volume "aarch64_hostdir" {
volume "${group.value}_hostdir" {
type = "host"
source = "aarch64_hostdir"
source = "${group.value}_hostdir"
read_only = true
}

Expand All @@ -25,13 +27,13 @@ job "buildsync-aarch64" {
}

volume_mount {
volume = "aarch64_hostdir"
volume = "${group.value}_hostdir"
destination = "/hostdir"
}

template {
data = <<EOF
{{- with secret "secret/buildsync/aarch64" -}}
{{- with secret "secret/buildsync/${group.value}" -}}
{{.Data.password}}
{{- end -}}
EOF
Expand All @@ -50,7 +52,7 @@ sync {
default.rsync,
source = "/hostdir/binpkgs",
{{- range nomadService "build-rsyncd" -}}
target = "rsync://buildsync-aarch64@a-fsn-de.node.consul:{{ .Port }}/aarch64",
target = "rsync://buildsync-${group.value}@a-fsn-de.node.consul:{{ .Port }}/${group.value}",
{{- end -}}
delay = 15,
filter = {
Expand All @@ -74,7 +76,7 @@ sync {
default.rsync,
source = "/hostdir/sources",
{{- range nomadService "build-rsyncd" -}}
target = "rsync://buildsync-aarch64@a-fsn-de.node.consul:{{ .Port }}/sources",
target = "rsync://buildsync-${group.value}@a-fsn-de.node.consul:{{ .Port }}/sources",
{{- end -}}
delay = 15,
rsync = {
Expand Down

0 comments on commit 36a3c31

Please sign in to comment.