diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2015-12-28 11:43:15 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-01-14 12:48:14 +0100 |
commit | 8eeed761a9c25ea8ccfc347fbd3f5894b5957d9e (patch) | |
tree | b5a07923abb806e7b24ce5cacba905288023bb1a /app/models | |
parent | 9e0e9342a47022a9caaa4a5596ec3ddb91fddc58 (diff) | |
download | gitlab-ce-8eeed761a9c25ea8ccfc347fbd3f5894b5957d9e.tar.gz |
Update specs for CI Build, add `artifacts?` method
`artifacts?` method checks if artifacts archive is available.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/build.rb | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 9adbfdd2c92..327114e0350 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -319,24 +319,26 @@ module Ci pending? && !any_runners_online? end - def artifacts_download_url - if artifacts_file.exists? - download_namespace_project_build_artifacts_path(project.namespace, project, self) - end - end - - def artifacts_browse_url - if artifacts_file.exists? - browse_namespace_project_build_artifacts_path(project.namespace, project, self) - end - end - def execute_hooks build_data = Gitlab::BuildDataBuilder.build(self) project.execute_hooks(build_data.dup, :build_hooks) project.execute_services(build_data.dup, :build_hooks) end + def artifacts? + artifacts_file.exists? + end + + def artifacts_download_url + download_namespace_project_build_artifacts_path(project.namespace, project, self) if + artifacts? + end + + def artifacts_browse_url + browse_namespace_project_build_artifacts_path(project.namespace, project, self) if + artifacts? + end + def artifacts_metadata(path) [] end |