diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-10-23 12:58:41 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-05 15:51:57 +0100 |
commit | 40397f35771a37a772f86e00d7dc708ddc6d3544 (patch) | |
tree | 0aea3cca4b405fc6fc6624474f5593d7f90b5e57 /app/services/ci/register_job_service.rb | |
parent | 90473e064eac21be283e751005e0c7abbdbf9089 (diff) | |
download | gitlab-ce-40397f35771a37a772f86e00d7dc708ddc6d3544.tar.gz |
Allow to make builds soft-archived.disallow-retry-of-old-builds
The soft-archived builds cannot be run after some deadline time.
The intent is to aggressively recycle old builds after sometime.
Diffstat (limited to 'app/services/ci/register_job_service.rb')
-rw-r--r-- | app/services/ci/register_job_service.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/services/ci/register_job_service.rb b/app/services/ci/register_job_service.rb index 5a7be921389..e06f1c05843 100644 --- a/app/services/ci/register_job_service.rb +++ b/app/services/ci/register_job_service.rb @@ -82,6 +82,11 @@ module Ci return false end + if build.archived? + build.drop!(:archived_failure) + return false + end + build.run! true end |