From 2892d26e5670332d9ef45112bf964f06f810508e Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sun, 9 Jul 2023 07:30:34 +0200 Subject: [PATCH] containers/woodpecker: set max timeout to 6 hours --- roles/containers/woodpecker-ci/defaults/main.yml | 2 ++ roles/containers/woodpecker-ci/tasks/caddy.yml | 3 +++ roles/containers/woodpecker-ci/tasks/setup.yml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/roles/containers/woodpecker-ci/defaults/main.yml b/roles/containers/woodpecker-ci/defaults/main.yml index 36dedb3..bd2e0ed 100644 --- a/roles/containers/woodpecker-ci/defaults/main.yml +++ b/roles/containers/woodpecker-ci/defaults/main.yml @@ -11,3 +11,5 @@ woodpecker_orgs: "" woodpecker_admin: "{{ username }}" woodpecker_repo_owners: "{{ username }}" woodpecker_agent_secret: "changeme" +woodpecker_max_pipeline_timeout: "360" +woodpecker_default_pipeline_timeout: "60" diff --git a/roles/containers/woodpecker-ci/tasks/caddy.yml b/roles/containers/woodpecker-ci/tasks/caddy.yml index e567da7..989665c 100644 --- a/roles/containers/woodpecker-ci/tasks/caddy.yml +++ b/roles/containers/woodpecker-ci/tasks/caddy.yml @@ -8,6 +8,7 @@ src: ../../../network/caddy/templates/reverse-proxy.template dest: /etc/caddy/woodpecker validate: caddy validate --adapter caddyfile --config %s + register: projectconfig - name: Make sure caddy links to the woodpecker config become: true @@ -16,9 +17,11 @@ search_string: "^import /etc/caddy/woodpecker" line: "import /etc/caddy/woodpecker" validate: caddy validate --adapter caddyfile --config %s + register: caddyconfig - name: Restart caddy become: true service: name: caddy state: restarted + when: caddyconfig.changed or projectconfig.changed diff --git a/roles/containers/woodpecker-ci/tasks/setup.yml b/roles/containers/woodpecker-ci/tasks/setup.yml index 50d3c15..5a5252b 100644 --- a/roles/containers/woodpecker-ci/tasks/setup.yml +++ b/roles/containers/woodpecker-ci/tasks/setup.yml @@ -27,6 +27,9 @@ WOODPECKER_ORGS: "{{ woodpecker_orgs }}" WOODPECKER_ADMIN: "{{ woodpecker_admin }}" WOODPECKER_REPO_OWNERS: "{{ woodpecker_repo_owners }}" + WOODPECKER_DEFAULT_PIPELINE_TIMEOUT: + "{{ woodpecker_default_pipeline_timeout }}" + WOODPECKER_MAX_PIPELINE_TIMEOUT: "{{ woodpecker_max_pipeline_timeout }}" - name: Setup woodpecker-agent docker_container: -- 2.38.5