Skip to content
Snippets Groups Projects
Commit ee160e52 authored by Alex Iribarren's avatar Alex Iribarren
Browse files

Added job prefix and change schedule for prod/dev

parent 9965da09
No related branches found
No related tags found
1 merge request!1Promote to production
Pipeline #520417 failed
job "reposync" { job "${JOB_PREFIX}reposync" {
datacenters = ["meyrin"] datacenters = ["meyrin"]
type = "batch" type = "batch"
...@@ -8,7 +8,7 @@ job "reposync" { ...@@ -8,7 +8,7 @@ job "reposync" {
meta_required = ["PARENT_JOB"] meta_required = ["PARENT_JOB"]
} }
task "reposync" { task "${JOB_PREFIX}reposync" {
driver = "docker" driver = "docker"
config { config {
...@@ -17,7 +17,7 @@ job "reposync" { ...@@ -17,7 +17,7 @@ job "reposync" {
type = "gelf" type = "gelf"
config { config {
gelf-address = "udp://127.0.0.1:12201" gelf-address = "udp://127.0.0.1:12201"
tag = "reposync" tag = "${JOB_PREFIX}reposync"
env = "NOMAD_JOB_NAME,NOMAD_GROUP_NAME,NOMAD_TASK_NAME,NOMAD_ALLOC_ID,NOMAD_ALLOC_NAME,NOMAD_ALLOC_INDEX,NOMAD_META_PARENT_JOB" env = "NOMAD_JOB_NAME,NOMAD_GROUP_NAME,NOMAD_TASK_NAME,NOMAD_ALLOC_ID,NOMAD_ALLOC_NAME,NOMAD_ALLOC_INDEX,NOMAD_META_PARENT_JOB"
} }
} }
......
job "reposync_oneshot" { job "${JOB_PREFIX}reposync_oneshot" {
datacenters = ["meyrin"] datacenters = ["meyrin"]
type = "batch" type = "batch"
...@@ -7,7 +7,7 @@ job "reposync_oneshot" { ...@@ -7,7 +7,7 @@ job "reposync_oneshot" {
meta_required = ["repoid"] meta_required = ["repoid"]
} }
task "reposync_oneshot" { task "${JOB_PREFIX}reposync_oneshot" {
driver = "docker" driver = "docker"
config { config {
...@@ -16,7 +16,7 @@ job "reposync_oneshot" { ...@@ -16,7 +16,7 @@ job "reposync_oneshot" {
type = "gelf" type = "gelf"
config { config {
gelf-address = "udp://127.0.0.1:12201" gelf-address = "udp://127.0.0.1:12201"
tag = "reposync_oneshot" tag = "${JOB_PREFIX}reposync_oneshot"
env = "NOMAD_JOB_NAME,NOMAD_GROUP_NAME,NOMAD_TASK_NAME,NOMAD_ALLOC_ID,NOMAD_ALLOC_NAME,NOMAD_ALLOC_INDEX,NOMAD_META_PARENT_JOB" env = "NOMAD_JOB_NAME,NOMAD_GROUP_NAME,NOMAD_TASK_NAME,NOMAD_ALLOC_ID,NOMAD_ALLOC_NAME,NOMAD_ALLOC_INDEX,NOMAD_META_PARENT_JOB"
} }
} }
......
job "reposync_scheduler" { job "${JOB_PREFIX}reposync_scheduler" {
datacenters = ["meyrin"] datacenters = ["meyrin"]
type = "batch" type = "batch"
periodic { periodic {
// Launch every minute // Launch every minute
cron = "* * * * *" cron = "${SCHEDULE}"
time_zone = "Europe/Zurich" time_zone = "Europe/Zurich"
prohibit_overlap = true prohibit_overlap = true
} }
task "reposync_scheduler" { task "${JOB_PREFIX}reposync_scheduler" {
driver = "docker" driver = "docker"
config { config {
...@@ -19,7 +19,7 @@ job "reposync_scheduler" { ...@@ -19,7 +19,7 @@ job "reposync_scheduler" {
type = "gelf" type = "gelf"
config { config {
gelf-address = "udp://127.0.0.1:12201" gelf-address = "udp://127.0.0.1:12201"
tag = "reposync_scheduler" tag = "${JOB_PREFIX}reposync_scheduler"
env = "NOMAD_JOB_NAME,NOMAD_GROUP_NAME,NOMAD_TASK_NAME,NOMAD_ALLOC_ID,NOMAD_ALLOC_NAME,NOMAD_ALLOC_INDEX,NOMAD_META_PARENT_JOB" env = "NOMAD_JOB_NAME,NOMAD_GROUP_NAME,NOMAD_TASK_NAME,NOMAD_ALLOC_ID,NOMAD_ALLOC_NAME,NOMAD_ALLOC_INDEX,NOMAD_META_PARENT_JOB"
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment