From 065f9883ffdb7a9639b7871783d9363d4695f020 Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Sat, 19 Nov 2022 23:46:36 +0000 Subject: [PATCH] Add woodpecker job file --- woodpecker-ci/woodpecker.nomad | 66 ++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 woodpecker-ci/woodpecker.nomad diff --git a/woodpecker-ci/woodpecker.nomad b/woodpecker-ci/woodpecker.nomad new file mode 100644 index 0000000..3c7305b --- /dev/null +++ b/woodpecker-ci/woodpecker.nomad @@ -0,0 +1,66 @@ +job "woodpecker" { + region = "global" + datacenters = ["dc1"] + type = "service" + + group "woodpecker" { + count = 1 + + network { + port "agent" { + to = 9000 + static = 9000 + } + + port "http" { + to = 8000 + } + } + + volume "woodpecker" { + type = "host" + source = "woodpecker" + read_only = false + } + + restart { + attempts = 5 + delay = "30s" + } + + task "woodpecker" { + driver = "docker" + volume_mount { + volume = "woodpecker" + destination = "/var/lib/woodpecker" + read_only = false + } + + config { + image = "woodpeckerci/woodpecker-server:latest" + ports = ["agent", "http"] + } + + env { + WOODPECKER_OPEN = "true" + WOODPECKER_HOST = "https://ci.arsenm.dev" + WOODPECKER_GITEA = "true" + WOODPECKER_GITEA_URL = "https://gitea.arsenm.dev" + WOODPECKER_GITEA_CLIENT = "CHANGE ME" + WOODPECKER_GITEA_SECRET = "CHANGE ME" + WOODPECKER_AGENT_SECRET = "CHANGE ME" + } + + service { + name = "woodpecker-ci" + port = "http" + + tags = [ + "traefik.enable=true", + "traefik.http.routers.woodpecker-ci.rule=Host(`ci.arsenm.dev`)", + "traefik.http.routers.woodpecker-ci.tls.certResolver=letsencrypt" + ] + } + } + } +}