Commit 25311ff3 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '17662-rename-builds' into 'master'

Resolve "Rename "Builds" to "Pipelines", "CI/CD Pipelines", or "Jobs" everywhere"

Closes #17662

See merge request !8787
parents 806b038a c5f5ce88
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
<tr> <tr>
<th class="environments-name">Environment</th> <th class="environments-name">Environment</th>
<th class="environments-deploy">Last deployment</th> <th class="environments-deploy">Last deployment</th>
<th class="environments-build">Build</th> <th class="environments-build">Job</th>
<th class="environments-commit">Commit</th> <th class="environments-commit">Commit</th>
<th class="environments-date">Updated</th> <th class="environments-date">Updated</th>
<th class="hidden-xs environments-actions"></th> <th class="hidden-xs environments-actions"></th>
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
v-if='actions' v-if='actions'
class="dropdown-toggle btn btn-default has-tooltip js-pipeline-dropdown-manual-actions" class="dropdown-toggle btn btn-default has-tooltip js-pipeline-dropdown-manual-actions"
data-toggle="dropdown" data-toggle="dropdown"
title="Manual build" title="Manual job"
data-placement="top" data-placement="top"
aria-label="Manual build" aria-label="Manual job"
> >
<span v-html='svgs.iconPlay' aria-hidden="true"></span> <span v-html='svgs.iconPlay' aria-hidden="true"></span>
<i class="fa fa-caret-down" aria-hidden="true"></i> <i class="fa fa-caret-down" aria-hidden="true"></i>
......
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
.col-sm-10 .col-sm-10
= f.number_field :max_artifacts_size, class: 'form-control' = f.number_field :max_artifacts_size, class: 'form-control'
.help-block .help-block
Set the maximum file size each build's artifacts can have Set the maximum file size each jobs's artifacts can have
= link_to "(?)", help_page_path("user/admin_area/settings/continuous_integration", anchor: "maximum-artifacts-size") = link_to "(?)", help_page_path("user/admin_area/settings/continuous_integration", anchor: "maximum-artifacts-size")
- if Gitlab.config.registry.enabled - if Gitlab.config.registry.enabled
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
= link_to 'Cancel all', cancel_all_admin_builds_path, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post = link_to 'Cancel all', cancel_all_admin_builds_path, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
.row-content-block.second-block .row-content-block.second-block
#{(@scope || 'all').capitalize} builds #{(@scope || 'all').capitalize} jobs
%ul.content-list.builds-content-list.admin-builds-table %ul.content-list.builds-content-list.admin-builds-table
= render "projects/builds/table", builds: @builds, admin: true = render "projects/builds/table", builds: @builds, admin: true
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
%span %span
Groups Groups
= nav_link path: 'builds#index' do = nav_link path: 'builds#index' do
= link_to admin_builds_path, title: 'Builds' do = link_to admin_builds_path, title: 'Jobs' do
%span %span
Builds Jobs
= nav_link path: ['runners#index', 'runners#show'] do = nav_link path: ['runners#index', 'runners#show'] do
= link_to admin_runners_path, title: 'Runners' do = link_to admin_runners_path, title: 'Runners' do
%span %span
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
.bs-callout .bs-callout
%p %p
A 'Runner' is a process which runs a build. A 'Runner' is a process which runs a job.
You can setup as many Runners as you need. You can setup as many Runners as you need.
%br %br
Runners can be placed on separate users, servers, even on your local machine. Runners can be placed on separate users, servers, even on your local machine.
...@@ -37,16 +37,16 @@ ...@@ -37,16 +37,16 @@
%ul %ul
%li %li
%span.label.label-success shared %span.label.label-success shared
\- Runner runs builds from all unassigned projects \- Runner runs jobs from all unassigned projects
%li %li
%span.label.label-info specific %span.label.label-info specific
\- Runner runs builds from assigned projects \- Runner runs jobs from assigned projects
%li %li
%span.label.label-warning locked %span.label.label-warning locked
\- Runner cannot be assigned to other projects \- Runner cannot be assigned to other projects
%li %li
%span.label.label-danger paused %span.label.label-danger paused
\- Runner will not receive any new builds \- Runner will not receive any new jobs
.append-bottom-20.clearfix .append-bottom-20.clearfix
.pull-left .pull-left
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
%th Runner token %th Runner token
%th Description %th Description
%th Projects %th Projects
%th Builds %th Jobs
%th Tags %th Tags
%th Last contact %th Last contact
%th %th
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
- if @runner.shared? - if @runner.shared?
.bs-callout.bs-callout-success .bs-callout.bs-callout-success
%h4 This Runner will process builds from ALL UNASSIGNED projects %h4 This Runner will process jobs from ALL UNASSIGNED projects
%p %p
If you want Runners to build only specific projects, enable them in the table below. If you want Runners to build only specific projects, enable them in the table below.
Keep in mind that this is a one way transition. Keep in mind that this is a one way transition.
- else - else
.bs-callout.bs-callout-info .bs-callout.bs-callout-info
%h4 This Runner will process builds only from ASSIGNED projects %h4 This Runner will process jobs only from ASSIGNED projects
%p You can't make this a shared Runner. %p You can't make this a shared Runner.
%hr %hr
...@@ -70,11 +70,11 @@ ...@@ -70,11 +70,11 @@
= paginate @projects, theme: "gitlab" = paginate @projects, theme: "gitlab"
.col-md-6 .col-md-6
%h4 Recent builds served by this Runner %h4 Recent jobs served by this Runner
%table.table.ci-table.runner-builds %table.table.ci-table.runner-builds
%thead %thead
%tr %tr
%th Build %th Job
%th Status %th Status
%th Project %th Project
%th Commit %th Commit
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
.key g .key g
.key b .key b
%td %td
Go to builds Go to jobs
%tr %tr
%td.shortcut %td.shortcut
.key g .key g
......
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
-# Shortcut to builds page -# Shortcut to builds page
- if project_nav_tab? :builds - if project_nav_tab? :builds
%li.hidden %li.hidden
= link_to project_builds_path(@project), title: 'Builds', class: 'shortcuts-builds' do = link_to project_builds_path(@project), title: 'Jobs', class: 'shortcuts-builds' do
Builds Jobs
-# Shortcut to commits page -# Shortcut to commits page
- if project_nav_tab? :commits - if project_nav_tab? :commits
......
- content_for :header do - content_for :header do
%h1{ style: "background: #c40834; color: #FFF; font: normal 20px Helvetica, Arial, sans-serif; margin: 0; padding: 5px 10px; line-height: 32px; font-size: 16px;" } %h1{ style: "background: #c40834; color: #FFF; font: normal 20px Helvetica, Arial, sans-serif; margin: 0; padding: 5px 10px; line-height: 32px; font-size: 16px;" }
GitLab (build failed) GitLab (job failed)
%h3 %h3
Project: Project:
...@@ -21,4 +21,4 @@ ...@@ -21,4 +21,4 @@
Message: #{@build.pipeline.git_commit_message} Message: #{@build.pipeline.git_commit_message}
%p %p
Build details: #{link_to "Build #{@build.id}", namespace_project_build_url(@build.project.namespace, @build.project, @build)} Job details: #{link_to "Job #{@build.id}", namespace_project_build_url(@build.project.namespace, @build.project, @build)}
Build failed for <%= @project.name %> Job failed for <%= @project.name %>
Status: <%= @build.status %> Status: <%= @build.status %>
Commit: <%= @build.pipeline.short_sha %> Commit: <%= @build.pipeline.short_sha %>
......
- content_for :header do - content_for :header do
%h1{ style: "background: #38CF5B; color: #FFF; font: normal 20px Helvetica, Arial, sans-serif; margin: 0; padding: 5px 10px; line-height: 32px; font-size: 16px;" } %h1{ style: "background: #38CF5B; color: #FFF; font: normal 20px Helvetica, Arial, sans-serif; margin: 0; padding: 5px 10px; line-height: 32px; font-size: 16px;" }
GitLab (build successful) GitLab (job successful)
%h3 %h3
Project: Project:
...@@ -21,4 +21,4 @@ ...@@ -21,4 +21,4 @@
Message: #{@build.pipeline.git_commit_message} Message: #{@build.pipeline.git_commit_message}
%p %p
Build details: #{link_to "Build #{@build.id}", namespace_project_build_url(@build.project.namespace, @build.project, @build)} Job details: #{link_to "Job #{@build.id}", namespace_project_build_url(@build.project.namespace, @build.project, @build)}
Build successful for <%= @project.name %> Job successful for <%= @project.name %>
Status: <%= @build.status %> Status: <%= @build.status %>
Commit: <%= @build.pipeline.short_sha %> Commit: <%= @build.pipeline.short_sha %>
......
Build #<%= build.id %> ( <%= pipeline_build_url(pipeline, build) %> ) Job #<%= build.id %> ( <%= pipeline_build_url(pipeline, build) %> )
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
%h4 %h4
Customize your workflow! Customize your workflow!
%p %p
Get started with GitLab by enabling features that work best for your project. From issues and wikis, to merge requests and builds, GitLab can help manage your workflow from idea to production! Get started with GitLab by enabling features that work best for your project. From issues and wikis, to merge requests and pipelines, GitLab can help manage your workflow from idea to production!
- if can?(current_user, :admin_project, @project) - if can?(current_user, :admin_project, @project)
= link_to "Get started", edit_project_path(@project), class: "btn btn-success" = link_to "Get started", edit_project_path(@project), class: "btn btn-success"
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
.checkbox.builds-feature .checkbox.builds-feature
= form.label :only_allow_merge_if_build_succeeds do = form.label :only_allow_merge_if_build_succeeds do
= form.check_box :only_allow_merge_if_build_succeeds = form.check_box :only_allow_merge_if_build_succeeds
%strong Only allow merge requests to be merged if the build succeeds %strong Only allow merge requests to be merged if the pipeline succeeds
%br %br
%span.descr %span.descr
Builds need to be configured to enable this feature. Pipelines need to be configured to enable this feature.
= link_to icon('question-circle'), help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds') = link_to icon('question-circle'), help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds')
.checkbox .checkbox
= form.label :only_allow_merge_if_all_discussions_are_resolved do = form.label :only_allow_merge_if_all_discussions_are_resolved do
......
- page_title 'Artifacts', "#{@build.name} (##{@build.id})", 'Builds' - page_title 'Artifacts', "#{@build.name} (##{@build.id})", 'Jobs'
.top-block.row-content-block.clearfix .top-block.row-content-block.clearfix
.pull-right .pull-right
......
.content-block.build-header .content-block.build-header
.header-content .header-content
= render 'ci/status/badge', status: @build.detailed_status(current_user), link: false = render 'ci/status/badge', status: @build.detailed_status(current_user), link: false
Build Job
%strong.js-build-id ##{@build.id} %strong.js-build-id ##{@build.id}
in pipeline in pipeline
= link_to pipeline_path(@build.pipeline) do = link_to pipeline_path(@build.pipeline) do
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
= render "user" = render "user"
= time_ago_with_tooltip(@build.created_at) = time_ago_with_tooltip(@build.created_at)
- if can?(current_user, :update_build, @build) && @build.retryable? - if can?(current_user, :update_build, @build) && @build.retryable?
= link_to "Retry build", retry_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-inverted-secondary pull-right', method: :post = link_to "Retry job", retry_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-inverted-secondary pull-right', method: :post
%button.btn.btn-default.pull-right.visible-xs-block.visible-sm-block.build-gutter-toggle.js-sidebar-build-toggle{ role: "button", type: "button" } %button.btn.btn-default.pull-right.visible-xs-block.visible-sm-block.build-gutter-toggle.js-sidebar-build-toggle{ role: "button", type: "button" }
= icon('angle-double-left') = icon('angle-double-left')
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
%aside.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar %aside.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default .block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
Build Job
%strong ##{@build.id} %strong ##{@build.id}
%a.gutter-toggle.pull-right.js-sidebar-build-toggle{ href: "#" } %a.gutter-toggle.pull-right.js-sidebar-build-toggle{ href: "#" }
= icon('angle-double-right') = icon('angle-double-right')
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
- if can?(current_user, :read_build, @project) && (@build.artifacts? || @build.artifacts_expired?) - if can?(current_user, :read_build, @project) && (@build.artifacts? || @build.artifacts_expired?)
.block{ class: ("block-first" if !@build.coverage) } .block{ class: ("block-first" if !@build.coverage) }
.title .title
Build artifacts Job artifacts
- if @build.artifacts_expired? - if @build.artifacts_expired?
%p.build-detail-row %p.build-detail-row
The artifacts were removed The artifacts were removed
...@@ -42,9 +42,9 @@ ...@@ -42,9 +42,9 @@
.block{ class: ("block-first" if !@build.coverage && !(can?(current_user, :read_build, @project) && (@build.artifacts? || @build.artifacts_expired?))) } .block{ class: ("block-first" if !@build.coverage && !(can?(current_user, :read_build, @project) && (@build.artifacts? || @build.artifacts_expired?))) }
.title .title
Build details Job details
- if can?(current_user, :update_build, @build) && @build.retryable? - if can?(current_user, :update_build, @build) && @build.retryable?
= link_to "Retry build", retry_namespace_project_build_path(@project.namespace, @project, @build), class: 'pull-right retry-link', method: :post = link_to "Retry job", retry_namespace_project_build_path(@project.namespace, @project, @build), class: 'pull-right retry-link', method: :post
- if @build.merge_request - if @build.merge_request
%p.build-detail-row %p.build-detail-row
%span.build-light-text Merge Request: %span.build-light-text Merge Request:
...@@ -136,4 +136,4 @@ ...@@ -136,4 +136,4 @@
- else - else
= build.id = build.id
- if build.retried? - if build.retried?
%i.fa.fa-refresh.has-tooltip{ data: { container: 'body', placement: 'bottom' }, title: 'Build was retried' } %i.fa.fa-refresh.has-tooltip{ data: { container: 'body', placement: 'bottom' }, title: 'Job was retried' }
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
- if builds.blank? - if builds.blank?
%div %div
.nothing-here-block No builds to show .nothing-here-block No jobs to show
- else - else
.table-holder .table-holder
%table.table.ci-table.builds-page %table.table.ci-table.builds-page
%thead %thead
%tr %tr
%th Status %th Status
%th Build %th Job
%th Pipeline %th Pipeline
- if admin - if admin
%th Project %th Project
......
- @no_container = true - @no_container = true
- page_title "Builds" - page_title "Jobs"
= render "projects/pipelines/head" = render "projects/pipelines/head"
%div{ class: container_class } %div{ class: container_class }
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
- unless @repository.gitlab_ci_yml - unless @repository.gitlab_ci_yml
= link_to 'Get started with Builds', help_page_path('ci/quick_start/README'), class: 'btn btn-info' = link_to 'Get started with CI/CD Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info'
= link_to ci_lint_path, class: 'btn btn-default' do = link_to ci_lint_path, class: 'btn btn-default' do
%span CI Lint %span CI Lint
......
- @no_container = true - @no_container = true
- page_title "#{@build.name} (##{@build.id})", "Builds" - page_title "#{@build.name} (##{@build.id})", "Jobs"
- trace_with_state = @build.trace_with_state - trace_with_state = @build.trace_with_state
= render "projects/pipelines/head", build_subnav: true = render "projects/pipelines/head", build_subnav: true
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
.bs-callout.bs-callout-warning .bs-callout.bs-callout-warning
%p %p
- if no_runners_for_project?(@build.project) - if no_runners_for_project?(@build.project)
This build is stuck, because the project doesn't have any runners online assigned to it. This job is stuck, because the project doesn't have any runners online assigned to it.
- elsif @build.tags.any? - elsif @build.tags.any?
This build is stuck, because you don't have any active runners online with any of these tags assigned to them: This job is stuck, because you don't have any active runners online with any of these tags assigned to them:
- @build.tags.each do |tag| - @build.tags.each do |tag|
%span.label.label-primary %span.label.label-primary
= tag = tag
- else - else
This build is stuck, because you don't have any active runners that can run this build. This job is stuck, because you don't have any active runners that can run this job.
%br %br
Go to Go to
...@@ -37,14 +37,14 @@ ...@@ -37,14 +37,14 @@
- environment = environment_for_build(@build.project, @build) - environment = environment_for_build(@build.project, @build)
- if @build.success? && @build.last_deployment.present? - if @build.success? && @build.last_deployment.present?
- if @build.last_deployment.last? - if @build.last_deployment.last?
This build is the most recent deployment to #{environment_link_for_build(@build.project, @build)}. This job is the most recent deployment to #{environment_link_for_build(@build.project, @build)}.
- else - else
This build is an out-of-date deployment to #{environment_link_for_build(@build.project, @build)}. This job is an out-of-date deployment to #{environment_link_for_build(@build.project, @build)}.
View the most recent deployment #{deployment_link(environment.last_deployment)}. View the most recent deployment #{deployment_link(environment.last_deployment)}.
- elsif @build.complete? && !@build.success? - elsif @build.complete? && !@build.success?
The deployment of this build to #{environment_link_for_build(@build.project, @build)} did not succeed. The deployment of this job to #{environment_link_for_build(@build.project, @build)} did not succeed.
- else - else
This build is creating a deployment to #{environment_link_for_build(@build.project, @build)} This job is creating a deployment to #{environment_link_for_build(@build.project, @build)}
- if environment.try(:last_deployment) - if environment.try(:last_deployment)
and will overwrite the #{deployment_link(environment.last_deployment, text: 'latest deployment')} and will overwrite the #{deployment_link(environment.last_deployment, text: 'latest deployment')}
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
- if @build.erased? - if @build.erased?
.erased.alert.alert-warning .erased.alert.alert-warning
- if @build.erased_by_user? - if @build.erased_by_user?
Build has been erased by #{link_to(@build.erased_by_name, user_path(@build.erased_by))} #{time_ago_with_tooltip(@build.erased_at)} Job has been erased by #{link_to(@build.erased_by_name, user_path(@build.erased_by))} #{time_ago_with_tooltip(@build.erased_at)}
- else - else
Build has been erased #{time_ago_with_tooltip(@build.erased_at)} Job has been erased #{time_ago_with_tooltip(@build.erased_at)}
- else - else
#js-build-scroll.scroll-controls #js-build-scroll.scroll-controls
.scroll-step .scroll-step
......
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
= link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "commit-id monospace" = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "commit-id monospace"
- if build.stuck? - if build.stuck?
= icon('warning', class: 'text-warning has-tooltip', title: 'Build is stuck. Check runners.') = icon('warning', class: 'text-warning has-tooltip', title: 'Job is stuck. Check runners.')
- if retried - if retried
= icon('refresh', class: 'text-warning has-tooltip', title: 'Build was retried') = icon('refresh', class: 'text-warning has-tooltip', title: 'Job was retried')
.label-container .label-container
- if build.tags.any? - if build.tags.any?
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
- else - else
%span.api.monospace API %span.api.monospace API
- if pipeline.latest? - if pipeline.latest?
%span.label.label-success.has-tooltip{ title: 'Latest build for this branch' } latest %span.label.label-success.has-tooltip{ title: 'Latest job for this branch' } latest
- if pipeline.triggered? - if pipeline.triggered?
%span.label.label-primary triggered %span.label.label-primary triggered
- if pipeline.yaml_errors.present? - if pipeline.yaml_errors.present?
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
.btn-group.inline .btn-group.inline
- if actions.any? - if actions.any?
.btn-group .btn-group
%button.dropdown-toggle.btn.btn-default.has-tooltip.js-pipeline-dropdown-manual-actions{ type: 'button', title: 'Manual build', data: { toggle: 'dropdown', placement: 'top' }, 'aria-label' => 'Manual build' } %button.dropdown-toggle.btn.btn-default.has-tooltip.js-pipeline-dropdown-manual-actions{ type: 'button', title: 'Manual job', data: { toggle: 'dropdown', placement: 'top' }, 'aria-label' => 'Manual job' }
= custom_icon('icon_play') = custom_icon('icon_play')
= icon('caret-down', 'aria-hidden' => 'true') = icon('caret-down', 'aria-hidden' => 'true')
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-align-right
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
Pipeline Pipeline
= link_to "##{pipeline.id}", namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id), class: "monospace" = link_to "##{pipeline.id}", namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id), class: "monospace"
with with
= pluralize pipeline.statuses.count(:id), "build" = pluralize pipeline.statuses.count(:id), "job"
- if pipeline.ref - if pipeline.ref
for for
= link_to pipeline.ref, namespace_project_commits_path(pipeline.project.namespace, pipeline.project, pipeline.ref), class: "monospace" = link_to pipeline.ref, namespace_project_commits_path(pipeline.project.namespace, pipeline.project, pipeline.ref), class: "monospace"
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
%thead %thead
%tr %tr
%th Status %th Status
%th Build ID %th Job ID
%th Name %th Name
%th %th
- if pipeline.project.build_coverage_enabled? - if pipeline.project.build_coverage_enabled?
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
.row .row
.col-md-9.project-feature.nested .col-md-9.project-feature.nested
= feature_fields.label :builds_access_level, "Builds", class: 'label-light' = feature_fields.label :builds_access_level, "Pipelines", class: 'label-light'
%span.help-block Submit, test and deploy your changes before merge %span.help-block Submit, test and deploy your changes before merge
.col-md-3 .col-md-3
= project_feature_access_select(:builds_access_level) = project_feature_access_select(:builds_access_level)
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
%p %p
The following items will NOT be exported: The following items will NOT be exported:
%ul %ul
%li Build traces and artifacts %li Job traces and artifacts
%li LFS objects %li LFS objects
%li Container registry images %li Container registry images
%li CI variables %li CI variables
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
%tr %tr
%th ID %th ID
%th Commit %th Commit
%th Build %th Job
%th Created %th Created
%th.hidden-xs %th.hidden-xs
......
%h4 Build charts %h4 Pipelines charts
%p %p
&nbsp; &nbsp;
%span.cgreen %span.cgreen
...@@ -11,19 +11,19 @@ ...@@ -11,19 +11,19 @@
.prepend-top-default .prepend-top-default
%p.light %p.light
Builds for last week Jobs for last week
(#{date_from_to(Date.today - 7.days, Date.today)}) (#{date_from_to(Date.today - 7.days, Date.today)})
%canvas#weekChart{ height: 200 } %canvas#weekChart{ height: 200 }
.prepend-top-default .prepend-top-default
%p.light %p.light
Builds for last month Jobs for last month
(#{date_from_to(Date.today - 30.days, Date.today)}) (#{date_from_to(Date.today - 30.days, Date.today)})
%canvas#monthChart{ height: 200 } %canvas#monthChart{ height: 200 }
.prepend-top-default .prepend-top-default
%p.light %p.light
Builds for last year Jobs for last year
%canvas#yearChart.padded{ height: 250 } %canvas#yearChart.padded{ height: 250 }
- [:week, :month, :year].each do |scope| - [:week, :month, :year].each do |scope|
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
.ci_widget{ class: "ci-#{status} ci-status-icon-#{status}", style: "display:none" } .ci_widget{ class: "ci-#{status} ci-status-icon-#{status}", style: "display:none" }
= ci_icon_for_status(status) = ci_icon_for_status(status)
%span %span
CI build CI job
= ci_label_for_status(status) = ci_label_for_status(status)
for for
- commit = @merge_request.diff_head_commit - commit = @merge_request.diff_head_commit
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
gitlab_icon: "#{asset_path 'gitlab_logo.png'}", gitlab_icon: "#{asset_path 'gitlab_logo.png'}",
ci_status: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.status : ''}", ci_status: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.status : ''}",
ci_message: { ci_message: {
normal: "Build {{status}} for \"{{title}}\"", normal: "Job {{status}} for \"{{title}}\"",
preparing: "{{status}} build for \"{{title}}\"" preparing: "{{status}} job for \"{{title}}\""
}, },
ci_enable: #{@project.ci_service ? "true" : "false"}, ci_enable: #{@project.ci_service ? "true" : "false"},
ci_title: { ci_title: {
preparing: "{{status}} build", preparing: "{{status}} job",
normal: "Build {{status}}" normal: "Job {{status}}"
}, },
ci_sha: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.short_sha : ''}", ci_sha: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.short_sha : ''}",
ci_pipeline: #{@merge_request.head_pipeline.try(:id).to_json}, ci_pipeline: #{@merge_request.head_pipeline.try(:id).to_json},
......
%h4 %h4
= icon('exclamation-triangle') = icon('exclamation-triangle')
The build for this merge request failed The job for this merge request failed
%p %p
Please retry the build or push a new commit to fix the failure. Please retry the job or push a new commit to fix the failure.
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
- if project_nav_tab? :builds - if project_nav_tab? :builds
= nav_link(controller: %w(builds)) do = nav_link(controller: %w(builds)) do
= link_to project_builds_path(@project), title: 'Builds', class: 'shortcuts-builds' do = link_to project_builds_path(@project), title: 'Jobs', class: 'shortcuts-builds' do
%span %span
Builds Jobs
- if project_nav_tab? :environments - if project_nav_tab? :environments
= nav_link(controller: %w(environments)) do = nav_link(controller: %w(environments)) do
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
.well-segment.pipeline-info .well-segment.pipeline-info
.icon-container .icon-container
= icon('clock-o') = icon('clock-o')
= pluralize @pipeline.statuses.count(:id), "build" = pluralize @pipeline.statuses.count(:id), "job"
- if @pipeline.ref - if @pipeline.ref
from from
= link_to @pipeline.ref, namespace_project_commits_path(@project.namespace, @project, @pipeline.ref), class: "monospace" = link_to @pipeline.ref, namespace_project_commits_path(@project.namespace, @project, @pipeline.ref), class: "monospace"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
Pipeline Pipeline
%li.js-builds-tab-link %li.js-builds-tab-link
= link_to builds_namespace_project_pipeline_path(@project.namespace, @project, @pipeline), data: {target: 'div#js-tab-builds', action: 'builds', toggle: 'tab' }, class: 'builds-tab' do = link_to builds_namespace_project_pipeline_path(@project.namespace, @project, @pipeline), data: {target: 'div#js-tab-builds', action: 'builds', toggle: 'tab' }, class: 'builds-tab' do
Builds Jobs
%span.badge.js-builds-counter= pipeline.statuses.count %span.badge.js-builds-counter= pipeline.statuses.count
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
%thead %thead
%tr %tr
%th Status %th Status
%th Build ID %th Job ID
%th Name %th Name
%th %th
- if pipeline.project.build_coverage_enabled? - if pipeline.project.build_coverage_enabled?
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
%span.input-group-addon / %span.input-group-addon /
%p.help-block %p.help-block
A regular expression that will be used to find the test coverage A regular expression that will be used to find the test coverage
output in the build trace. Leave blank to disable output in the job trace. Leave blank to disable
= link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'test-coverage-parsing') = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'test-coverage-parsing')
.bs-callout.bs-callout-info .bs-callout.bs-callout-info
%p Below are examples of regex for existing tools: %p Below are examples of regex for existing tools:
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
.col-sm-10 .col-sm-10
.checkbox .checkbox
= f.check_box :active = f.check_box :active
%span.light Paused Runners don't accept new builds %span.light Paused Runners don't accept new jobs
.form-group .form-group
= label :run_untagged, 'Run untagged jobs', class: 'control-label' = label :run_untagged, 'Run untagged jobs', class: 'control-label'
.col-sm-10 .col-sm-10
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.light.prepend-top-default .light.prepend-top-default
%p %p
A 'Runner' is a process which runs a build. A 'Runner' is a process which runs a job.
You can setup as many Runners as you need. You can setup as many Runners as you need.
%br %br
Runners can be placed on separate users, servers, and even on your local machine. Runners can be placed on separate users, servers, and even on your local machine.
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
%ul %ul
%li %li
%span.label.label-success active %span.label.label-success active
\- Runner is active and can process any new builds \- Runner is active and can process any new jobs
%li %li
%span.label.label-danger paused %span.label.label-danger paused
\- Runner is paused and will not receive any new builds \- Runner is paused and will not receive any new jobs
%hr %hr
%p.lead To start serving your builds you can either add specific Runners to your project or use shared Runners %p.lead To start serving your jobs you can either add specific Runners to your project or use shared Runners
.row .row
.col-sm-6 .col-sm-6
= render 'specific_runners' = render 'specific_runners'
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
In the In the
%code .gitlab-ci.yml %code .gitlab-ci.yml
of another project, include the following snippet. of another project, include the following snippet.
The project will be rebuilt at the end of the build. The project will be rebuilt at the end of the job.
%pre %pre
:plain :plain
...@@ -86,12 +86,12 @@ ...@@ -86,12 +86,12 @@
:plain :plain
#{builds_trigger_url(@project.id, ref: 'REF_NAME')}?token=TOKEN #{builds_trigger_url(@project.id, ref: 'REF_NAME')}?token=TOKEN
%h5.prepend-top-default %h5.prepend-top-default
Pass build variables Pass job variables
%p.light %p.light
Add Add
%code variables[VARIABLE]=VALUE %code variables[VARIABLE]=VALUE
to an API request. Variable values can be used to distinguish between triggered builds and normal builds. to an API request. Variable values can be used to distinguish between triggered jobs and normal jobs.
With cURL: With cURL:
......
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
%p %p
So you can use them for passwords, secret keys or whatever you want. So you can use them for passwords, secret keys or whatever you want.
%p %p
The value of the variable can be visible in build log if explicitly asked to do so. The value of the variable can be visible in job log if explicitly asked to do so.
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
= f.check_box :build_events, class: 'pull-left' = f.check_box :build_events, class: 'pull-left'
.prepend-left-20 .prepend-left-20
= f.label :build_events, class: 'list-label' do = f.label :build_events, class: 'list-label' do
%strong Build events %strong Jobs events
%p.light %p.light
This URL will be triggered when the build status changes This URL will be triggered when the job status changes
%li %li
= f.check_box :pipeline_events, class: 'pull-left' = f.check_box :pipeline_events, class: 'pull-left'
.prepend-left-20 .prepend-left-20
......
---
title: Rename Builds to Pipelines, CI/CD Pipelines, or Jobs everywhere
merge_request: 8787
author:
...@@ -33,7 +33,7 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps ...@@ -33,7 +33,7 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps
step 'recent build summary contains information saying that build has been erased' do step 'recent build summary contains information saying that build has been erased' do
page.within('.erased') do page.within('.erased') do
expect(page).to have_content 'Build has been erased' expect(page).to have_content 'Job has been erased'
end end
end end
......
...@@ -34,9 +34,9 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps ...@@ -34,9 +34,9 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
step 'page should have CI graphs' do step 'page should have CI graphs' do
expect(page).to have_content 'Overall' expect(page).to have_content 'Overall'
expect(page).to have_content 'Builds for last week' expect(page).to have_content 'Jobs for last week'
expect(page).to have_content 'Builds for last month' expect(page).to have_content 'Jobs for last month'
expect(page).to have_content 'Builds for last year' expect(page).to have_content 'Jobs for last year'
expect(page).to have_content 'Commit duration in minutes for last 30 commits' expect(page).to have_content 'Commit duration in minutes for last 30 commits'
end end
......
...@@ -47,7 +47,7 @@ module SharedBuilds ...@@ -47,7 +47,7 @@ module SharedBuilds
end end
step 'recent build has a build trace' do step 'recent build has a build trace' do
@build.trace = 'build trace' @build.trace = 'job trace'
end end
step 'download of build artifacts archive starts' do step 'download of build artifacts archive starts' do
...@@ -60,7 +60,7 @@ module SharedBuilds ...@@ -60,7 +60,7 @@ module SharedBuilds
end end
step 'I see details of a build' do step 'I see details of a build' do
expect(page).to have_content "Build ##{@build.id}" expect(page).to have_content "Job ##{@build.id}"
end end
step 'I see build trace' do step 'I see build trace' do
......
...@@ -209,7 +209,7 @@ module API ...@@ -209,7 +209,7 @@ module API
build = get_build!(params[:build_id]) build = get_build!(params[:build_id])
bad_request!("Unplayable Build") unless build.playable? bad_request!("Unplayable Job") unless build.playable?
build.play(current_user) build.play(current_user)
......
...@@ -9,8 +9,8 @@ describe 'Admin Builds' do ...@@ -9,8 +9,8 @@ describe 'Admin Builds' do
let(:pipeline) { create(:ci_pipeline) } let(:pipeline) { create(:ci_pipeline) }
context 'All tab' do context 'All tab' do
context 'when have builds' do context 'when have jobs' do
it 'shows all builds' do it 'shows all jobs' do
create(:ci_build, pipeline: pipeline, status: :pending) create(:ci_build, pipeline: pipeline, status: :pending)
create(:ci_build, pipeline: pipeline, status: :running) create(:ci_build, pipeline: pipeline, status: :running)
create(:ci_build, pipeline: pipeline, status: :success) create(:ci_build, pipeline: pipeline, status: :success)
...@@ -19,26 +19,26 @@ describe 'Admin Builds' do ...@@ -19,26 +19,26 @@ describe 'Admin Builds' do
visit admin_builds_path visit admin_builds_path
expect(page).to have_selector('.nav-links li.active', text: 'All') expect(page).to have_selector('.nav-links li.active', text: 'All')
expect(page).to have_selector('.row-content-block', text: 'All builds') expect(page).to have_selector('.row-content-block', text: 'All jobs')
expect(page.all('.build-link').size).to eq(4) expect(page.all('.build-link').size).to eq(4)
expect(page).to have_link 'Cancel all' expect(page).to have_link 'Cancel all'
end end
end end
context 'when have no builds' do context 'when have no jobs' do
it 'shows a message' do it 'shows a message' do
visit admin_builds_path visit admin_builds_path
expect(page).to have_selector('.nav-links li.active', text: 'All') expect(page).to have_selector('.nav-links li.active', text: 'All')
expect(page).to have_content 'No builds to show' expect(page).to have_content 'No jobs to show'
expect(page).not_to have_link 'Cancel all' expect(page).not_to have_link 'Cancel all'
end end
end end
end end
context 'Pending tab' do context 'Pending tab' do
context 'when have pending builds' do context 'when have pending jobs' do
it 'shows pending builds' do it 'shows pending jobs' do
build1 = create(:ci_build, pipeline: pipeline, status: :pending) build1 = create(:ci_build, pipeline: pipeline, status: :pending)
build2 = create(:ci_build, pipeline: pipeline, status: :running) build2 = create(:ci_build, pipeline: pipeline, status: :running)
build3 = create(:ci_build, pipeline: pipeline, status: :success) build3 = create(:ci_build, pipeline: pipeline, status: :success)
...@@ -55,22 +55,22 @@ describe 'Admin Builds' do ...@@ -55,22 +55,22 @@ describe 'Admin Builds' do
end end
end end
context 'when have no builds pending' do context 'when have no jobs pending' do
it 'shows a message' do it 'shows a message' do
create(:ci_build, pipeline: pipeline, status: :success) create(:ci_build, pipeline: pipeline, status: :success)
visit admin_builds_path(scope: :pending) visit admin_builds_path(scope: :pending)
expect(page).to have_selector('.nav-links li.active', text: 'Pending') expect(page).to have_selector('.nav-links li.active', text: 'Pending')
expect(page).to have_content 'No builds to show' expect(page).to have_content 'No jobs to show'
expect(page).not_to have_link 'Cancel all' expect(page).not_to have_link 'Cancel all'
end end
end end
end end
context 'Running tab' do context 'Running tab' do
context 'when have running builds' do context 'when have running jobs' do
it 'shows running builds' do it 'shows running jobs' do
build1 = create(:ci_build, pipeline: pipeline, status: :running) build1 = create(:ci_build, pipeline: pipeline, status: :running)
build2 = create(:ci_build, pipeline: pipeline, status: :success) build2 = create(:ci_build, pipeline: pipeline, status: :success)
build3 = create(:ci_build, pipeline: pipeline, status: :failed) build3 = create(:ci_build, pipeline: pipeline, status: :failed)
...@@ -87,22 +87,22 @@ describe 'Admin Builds' do ...@@ -87,22 +87,22 @@ describe 'Admin Builds' do
end end
end end
context 'when have no builds running' do context 'when have no jobs running' do
it 'shows a message' do it 'shows a message' do
create(:ci_build, pipeline: pipeline, status: :success) create(:ci_build, pipeline: pipeline, status: :success)
visit admin_builds_path(scope: :running) visit admin_builds_path(scope: :running)
expect(page).to have_selector('.nav-links li.active', text: 'Running') expect(page).to have_selector('.nav-links li.active', text: 'Running')
expect(page).to have_content 'No builds to show' expect(page).to have_content 'No jobs to show'
expect(page).not_to have_link 'Cancel all' expect(page).not_to have_link 'Cancel all'
end end
end end
end end
context 'Finished tab' do context 'Finished tab' do
context 'when have finished builds' do context 'when have finished jobs' do
it 'shows finished builds' do it 'shows finished jobs' do
build1 = create(:ci_build, pipeline: pipeline, status: :pending) build1 = create(:ci_build, pipeline: pipeline, status: :pending)
build2 = create(:ci_build, pipeline: pipeline, status: :running) build2 = create(:ci_build, pipeline: pipeline, status: :running)
build3 = create(:ci_build, pipeline: pipeline, status: :success) build3 = create(:ci_build, pipeline: pipeline, status: :success)
...@@ -117,14 +117,14 @@ describe 'Admin Builds' do ...@@ -117,14 +117,14 @@ describe 'Admin Builds' do
end end
end end
context 'when have no builds finished' do context 'when have no jobs finished' do
it 'shows a message' do it 'shows a message' do
create(:ci_build, pipeline: pipeline, status: :running) create(:ci_build, pipeline: pipeline, status: :running)
visit admin_builds_path(scope: :finished) visit admin_builds_path(scope: :finished)
expect(page).to have_selector('.nav-links li.active', text: 'Finished') expect(page).to have_selector('.nav-links li.active', text: 'Finished')
expect(page).to have_content 'No builds to show' expect(page).to have_content 'No jobs to show'
expect(page).to have_link 'Cancel all' expect(page).to have_link 'Cancel all'
end end
end end
......
...@@ -50,7 +50,7 @@ feature 'Only allow merge requests to be merged if the build succeeds', feature: ...@@ -50,7 +50,7 @@ feature 'Only allow merge requests to be merged if the build succeeds', feature:
visit_merge_request(merge_request) visit_merge_request(merge_request)
expect(page).not_to have_button 'Accept Merge Request' expect(page).not_to have_button 'Accept Merge Request'
expect(page).to have_content('Please retry the build or push a new commit to fix the failure.') expect(page).to have_content('Please retry the job or push a new commit to fix the failure.')
end end
end end
...@@ -61,7 +61,7 @@ feature 'Only allow merge requests to be merged if the build succeeds', feature: ...@@ -61,7 +61,7 @@ feature 'Only allow merge requests to be merged if the build succeeds', feature:
visit_merge_request(merge_request) visit_merge_request(merge_request)
expect(page).not_to have_button 'Accept Merge Request' expect(page).not_to have_button 'Accept Merge Request'
expect(page).to have_content('Please retry the build or push a new commit to fix the failure.') expect(page).to have_content('Please retry the job or push a new commit to fix the failure.')
end end
end end
......
...@@ -27,7 +27,7 @@ feature 'Builds', :feature do ...@@ -27,7 +27,7 @@ feature 'Builds', :feature do
visit namespace_project_builds_path(project.namespace, project, scope: :pending) visit namespace_project_builds_path(project.namespace, project, scope: :pending)
end end
it "shows Pending tab builds" do it "shows Pending tab jobs" do
expect(page).to have_link 'Cancel running' expect(page).to have_link 'Cancel running'
expect(page).to have_selector('.nav-links li.active', text: 'Pending') expect(page).to have_selector('.nav-links li.active', text: 'Pending')
expect(page).to have_content build.short_sha expect(page).to have_content build.short_sha
...@@ -42,7 +42,7 @@ feature 'Builds', :feature do ...@@ -42,7 +42,7 @@ feature 'Builds', :feature do
visit namespace_project_builds_path(project.namespace, project, scope: :running) visit namespace_project_builds_path(project.namespace, project, scope: :running)
end end
it "shows Running tab builds" do it "shows Running tab jobs" do
expect(page).to have_selector('.nav-links li.active', text: 'Running') expect(page).to have_selector('.nav-links li.active', text: 'Running')
expect(page).to have_link 'Cancel running' expect(page).to have_link 'Cancel running'
expect(page).to have_content build.short_sha expect(page).to have_content build.short_sha
...@@ -57,20 +57,20 @@ feature 'Builds', :feature do ...@@ -57,20 +57,20 @@ feature 'Builds', :feature do
visit namespace_project_builds_path(project.namespace, project, scope: :finished) visit namespace_project_builds_path(project.namespace, project, scope: :finished)
end end
it "shows Finished tab builds" do it "shows Finished tab jobs" do
expect(page).to have_selector('.nav-links li.active', text: 'Finished') expect(page).to have_selector('.nav-links li.active', text: 'Finished')
expect(page).to have_content 'No builds to show' expect(page).to have_content 'No jobs to show'
expect(page).to have_link 'Cancel running' expect(page).to have_link 'Cancel running'
end end
end end
context "All builds" do context "All jobs" do
before do before do
project.builds.running_or_pending.each(&:success) project.builds.running_or_pending.each(&:success)
visit namespace_project_builds_path(project.namespace, project) visit namespace_project_builds_path(project.namespace, project)
end end
it "shows All tab builds" do it "shows All tab jobs" do
expect(page).to have_selector('.nav-links li.active', text: 'All') expect(page).to have_selector('.nav-links li.active', text: 'All')
expect(page).to have_content build.short_sha expect(page).to have_content build.short_sha
expect(page).to have_content build.ref expect(page).to have_content build.ref
...@@ -98,7 +98,7 @@ feature 'Builds', :feature do ...@@ -98,7 +98,7 @@ feature 'Builds', :feature do
end end
describe "GET /:project/builds/:id" do describe "GET /:project/builds/:id" do
context "Build from project" do context "Job from project" do
before do before do
visit namespace_project_build_path(project.namespace, project, build) visit namespace_project_build_path(project.namespace, project, build)
end end
...@@ -111,7 +111,7 @@ feature 'Builds', :feature do ...@@ -111,7 +111,7 @@ feature 'Builds', :feature do
end end
end end
context "Build from other project" do context "Job from other project" do
before do before do
visit namespace_project_build_path(project.namespace, project, build2) visit namespace_project_build_path(project.namespace, project, build2)
end end
...@@ -149,7 +149,7 @@ feature 'Builds', :feature do ...@@ -149,7 +149,7 @@ feature 'Builds', :feature do
context 'when expire date is defined' do context 'when expire date is defined' do
let(:expire_at) { Time.now + 7.days } let(:expire_at) { Time.now + 7.days }
context 'when user has ability to update build' do context 'when user has ability to update job' do
it 'keeps artifacts when keep button is clicked' do it 'keeps artifacts when keep button is clicked' do
expect(page).to have_content 'The artifacts will be removed' expect(page).to have_content 'The artifacts will be removed'
...@@ -160,7 +160,7 @@ feature 'Builds', :feature do ...@@ -160,7 +160,7 @@ feature 'Builds', :feature do
end end
end end
context 'when user does not have ability to update build' do context 'when user does not have ability to update job' do
let(:user_access_level) { :guest } let(:user_access_level) { :guest }
it 'does not have keep button' do it 'does not have keep button' do
...@@ -197,8 +197,8 @@ feature 'Builds', :feature do ...@@ -197,8 +197,8 @@ feature 'Builds', :feature do
visit namespace_project_build_path(project.namespace, project, build) visit namespace_project_build_path(project.namespace, project, build)
end end
context 'when build has an initial trace' do context 'when job has an initial trace' do
it 'loads build trace' do it 'loads job trace' do
expect(page).to have_content 'BUILD TRACE' expect(page).to have_content 'BUILD TRACE'
build.append_trace(' and more trace', 11) build.append_trace(' and more trace', 11)
...@@ -242,32 +242,32 @@ feature 'Builds', :feature do ...@@ -242,32 +242,32 @@ feature 'Builds', :feature do
end end
end end
context 'when build starts environment' do context 'when job starts environment' do
let(:environment) { create(:environment, project: project) } let(:environment) { create(:environment, project: project) }
let(:pipeline) { create(:ci_pipeline, project: project) } let(:pipeline) { create(:ci_pipeline, project: project) }
context 'build is successfull and has deployment' do context 'job is successfull and has deployment' do
let(:deployment) { create(:deployment) } let(:deployment) { create(:deployment) }
let(:build) { create(:ci_build, :success, environment: environment.name, deployments: [deployment], pipeline: pipeline) } let(:build) { create(:ci_build, :success, environment: environment.name, deployments: [deployment], pipeline: pipeline) }
it 'shows a link for the build' do it 'shows a link for the job' do
visit namespace_project_build_path(project.namespace, project, build) visit namespace_project_build_path(project.namespace, project, build)
expect(page).to have_link environment.name expect(page).to have_link environment.name
end end
end end
context 'build is complete and not successfull' do context 'job is complete and not successfull' do
let(:build) { create(:ci_build, :failed, environment: environment.name, pipeline: pipeline) } let(:build) { create(:ci_build, :failed, environment: environment.name, pipeline: pipeline) }
it 'shows a link for the build' do it 'shows a link for the job' do
visit namespace_project_build_path(project.namespace, project, build) visit namespace_project_build_path(project.namespace, project, build)
expect(page).to have_link environment.name expect(page).to have_link environment.name
end end
end end
context 'build creates a new deployment' do context 'job creates a new deployment' do
let!(:deployment) { create(:deployment, environment: environment, sha: project.commit.id) } let!(:deployment) { create(:deployment, environment: environment, sha: project.commit.id) }
let(:build) { create(:ci_build, :success, environment: environment.name, pipeline: pipeline) } let(:build) { create(:ci_build, :success, environment: environment.name, pipeline: pipeline) }
...@@ -281,7 +281,7 @@ feature 'Builds', :feature do ...@@ -281,7 +281,7 @@ feature 'Builds', :feature do
end end
describe "POST /:project/builds/:id/cancel" do describe "POST /:project/builds/:id/cancel" do
context "Build from project" do context "Job from project" do
before do before do
build.run! build.run!
visit namespace_project_build_path(project.namespace, project, build) visit namespace_project_build_path(project.namespace, project, build)
...@@ -295,7 +295,7 @@ feature 'Builds', :feature do ...@@ -295,7 +295,7 @@ feature 'Builds', :feature do
end end
end end
context "Build from other project" do context "Job from other project" do
before do before do
build.run! build.run!
visit namespace_project_build_path(project.namespace, project, build) visit namespace_project_build_path(project.namespace, project, build)
...@@ -307,13 +307,13 @@ feature 'Builds', :feature do ...@@ -307,13 +307,13 @@ feature 'Builds', :feature do
end end
describe "POST /:project/builds/:id/retry" do describe "POST /:project/builds/:id/retry" do
context "Build from project" do context "Job from project" do
before do before do
build.run! build.run!
visit namespace_project_build_path(project.namespace, project, build) visit namespace_project_build_path(project.namespace, project, build)
click_link 'Cancel' click_link 'Cancel'
page.within('.build-header') do page.within('.build-header') do
click_link 'Retry build' click_link 'Retry job'
end end
end end
......
...@@ -91,10 +91,10 @@ describe 'Pipeline', :feature, :js do ...@@ -91,10 +91,10 @@ describe 'Pipeline', :feature, :js do
end end
end end
it 'should be possible to retry the success build' do it 'should be possible to retry the success job' do
find('#ci-badge-build .ci-action-icon-container').trigger('click') find('#ci-badge-build .ci-action-icon-container').trigger('click')
expect(page).not_to have_content('Retry build') expect(page).not_to have_content('Retry job')
end end
end end
...@@ -113,11 +113,11 @@ describe 'Pipeline', :feature, :js do ...@@ -113,11 +113,11 @@ describe 'Pipeline', :feature, :js do
it 'should be possible to retry the failed build' do it 'should be possible to retry the failed build' do
find('#ci-badge-test .ci-action-icon-container').trigger('click') find('#ci-badge-test .ci-action-icon-container').trigger('click')
expect(page).not_to have_content('Retry build') expect(page).not_to have_content('Retry job')
end end
end end
context 'when pipeline has manual builds' do context 'when pipeline has manual jobs' do
it 'shows the skipped icon and a play action for the manual build' do it 'shows the skipped icon and a play action for the manual build' do
page.within('#ci-badge-manual-build') do page.within('#ci-badge-manual-build') do
expect(page).to have_selector('.js-ci-status-icon-manual') expect(page).to have_selector('.js-ci-status-icon-manual')
...@@ -129,14 +129,14 @@ describe 'Pipeline', :feature, :js do ...@@ -129,14 +129,14 @@ describe 'Pipeline', :feature, :js do
end end
end end
it 'should be possible to play the manual build' do it 'should be possible to play the manual job' do
find('#ci-badge-manual-build .ci-action-icon-container').trigger('click') find('#ci-badge-manual-build .ci-action-icon-container').trigger('click')
expect(page).not_to have_content('Play build') expect(page).not_to have_content('Play job')
end end
end end
context 'when pipeline has external build' do context 'when pipeline has external job' do
it 'shows the success icon and the generic comit status build' do it 'shows the success icon and the generic comit status build' do
expect(page).to have_selector('.js-ci-status-icon-success') expect(page).to have_selector('.js-ci-status-icon-success')
expect(page).to have_content('jenkins') expect(page).to have_content('jenkins')
...@@ -146,12 +146,12 @@ describe 'Pipeline', :feature, :js do ...@@ -146,12 +146,12 @@ describe 'Pipeline', :feature, :js do
end end
context 'page tabs' do context 'page tabs' do
it 'shows Pipeline and Builds tabs with link' do it 'shows Pipeline and Jobs tabs with link' do
expect(page).to have_link('Pipeline') expect(page).to have_link('Pipeline')
expect(page).to have_link('Builds') expect(page).to have_link('Jobs')
end end
it 'shows counter in Builds tab' do it 'shows counter in Jobs tab' do
expect(page.find('.js-builds-counter').text).to eq(pipeline.statuses.count.to_s) expect(page.find('.js-builds-counter').text).to eq(pipeline.statuses.count.to_s)
end end
...@@ -160,7 +160,7 @@ describe 'Pipeline', :feature, :js do ...@@ -160,7 +160,7 @@ describe 'Pipeline', :feature, :js do
end end
end end
context 'retrying builds' do context 'retrying jobs' do
it { expect(page).not_to have_content('retried') } it { expect(page).not_to have_content('retried') }
context 'when retrying' do context 'when retrying' do
...@@ -170,7 +170,7 @@ describe 'Pipeline', :feature, :js do ...@@ -170,7 +170,7 @@ describe 'Pipeline', :feature, :js do
end end
end end
context 'canceling builds' do context 'canceling jobs' do
it { expect(page).not_to have_selector('.ci-canceled') } it { expect(page).not_to have_selector('.ci-canceled') }
context 'when canceling' do context 'when canceling' do
...@@ -191,7 +191,7 @@ describe 'Pipeline', :feature, :js do ...@@ -191,7 +191,7 @@ describe 'Pipeline', :feature, :js do
visit builds_namespace_project_pipeline_path(project.namespace, project, pipeline) visit builds_namespace_project_pipeline_path(project.namespace, project, pipeline)
end end
it 'shows a list of builds' do it 'shows a list of jobs' do
expect(page).to have_content('Test') expect(page).to have_content('Test')
expect(page).to have_content(build_passed.id) expect(page).to have_content(build_passed.id)
expect(page).to have_content('Deploy') expect(page).to have_content('Deploy')
...@@ -203,26 +203,26 @@ describe 'Pipeline', :feature, :js do ...@@ -203,26 +203,26 @@ describe 'Pipeline', :feature, :js do
expect(page).to have_link('Play') expect(page).to have_link('Play')
end end
it 'shows Builds tab pane as active' do it 'shows jobs tab pane as active' do
expect(page).to have_css('#js-tab-builds.active') expect(page).to have_css('#js-tab-builds.active')
end end
context 'page tabs' do context 'page tabs' do
it 'shows Pipeline and Builds tabs with link' do it 'shows Pipeline and Jobs tabs with link' do
expect(page).to have_link('Pipeline') expect(page).to have_link('Pipeline')
expect(page).to have_link('Builds') expect(page).to have_link('Jobs')
end end
it 'shows counter in Builds tab' do it 'shows counter in Jobs tab' do
expect(page.find('.js-builds-counter').text).to eq(pipeline.statuses.count.to_s) expect(page.find('.js-builds-counter').text).to eq(pipeline.statuses.count.to_s)
end end
it 'shows Builds tab as active' do it 'shows Jobs tab as active' do
expect(page).to have_css('li.js-builds-tab-link.active') expect(page).to have_css('li.js-builds-tab-link.active')
end end
end end
context 'retrying builds' do context 'retrying jobs' do
it { expect(page).not_to have_content('retried') } it { expect(page).not_to have_content('retried') }
context 'when retrying' do context 'when retrying' do
...@@ -233,7 +233,7 @@ describe 'Pipeline', :feature, :js do ...@@ -233,7 +233,7 @@ describe 'Pipeline', :feature, :js do
end end
end end
context 'canceling builds' do context 'canceling jobs' do
it { expect(page).not_to have_selector('.ci-canceled') } it { expect(page).not_to have_selector('.ci-canceled') }
context 'when canceling' do context 'when canceling' do
...@@ -244,7 +244,7 @@ describe 'Pipeline', :feature, :js do ...@@ -244,7 +244,7 @@ describe 'Pipeline', :feature, :js do
end end
end end
context 'playing manual build' do context 'playing manual job' do
before do before do
within '.pipeline-holder' do within '.pipeline-holder' do
click_link('Play') click_link('Play')
......
...@@ -11,41 +11,41 @@ feature 'Project settings > Merge Requests', feature: true, js: true do ...@@ -11,41 +11,41 @@ feature 'Project settings > Merge Requests', feature: true, js: true do
login_as(user) login_as(user)
end end
context 'when Merge Request and Builds are initially enabled' do context 'when Merge Request and Pipelines are initially enabled' do
before do before do
project.project_feature.update_attribute('merge_requests_access_level', ProjectFeature::ENABLED) project.project_feature.update_attribute('merge_requests_access_level', ProjectFeature::ENABLED)
end end
context 'when Builds are initially enabled' do context 'when Pipelines are initially enabled' do
before do before do
project.project_feature.update_attribute('builds_access_level', ProjectFeature::ENABLED) project.project_feature.update_attribute('builds_access_level', ProjectFeature::ENABLED)
visit edit_project_path(project) visit edit_project_path(project)
end end
scenario 'shows the Merge Requests settings' do scenario 'shows the Merge Requests settings' do
expect(page).to have_content('Only allow merge requests to be merged if the build succeeds') expect(page).to have_content('Only allow merge requests to be merged if the pipeline succeeds')
expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved') expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved')
select 'Disabled', from: "project_project_feature_attributes_merge_requests_access_level" select 'Disabled', from: "project_project_feature_attributes_merge_requests_access_level"
expect(page).not_to have_content('Only allow merge requests to be merged if the build succeeds') expect(page).not_to have_content('Only allow merge requests to be merged if the pipeline succeeds')
expect(page).not_to have_content('Only allow merge requests to be merged if all discussions are resolved') expect(page).not_to have_content('Only allow merge requests to be merged if all discussions are resolved')
end end
end end
context 'when Builds are initially disabled' do context 'when Pipelines are initially disabled' do
before do before do
project.project_feature.update_attribute('builds_access_level', ProjectFeature::DISABLED) project.project_feature.update_attribute('builds_access_level', ProjectFeature::DISABLED)
visit edit_project_path(project) visit edit_project_path(project)
end end
scenario 'shows the Merge Requests settings that do not depend on Builds feature' do scenario 'shows the Merge Requests settings that do not depend on Builds feature' do
expect(page).not_to have_content('Only allow merge requests to be merged if the build succeeds') expect(page).not_to have_content('Only allow merge requests to be merged if the pipeline succeeds')
expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved') expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved')
select 'Everyone with access', from: "project_project_feature_attributes_builds_access_level" select 'Everyone with access', from: "project_project_feature_attributes_builds_access_level"
expect(page).to have_content('Only allow merge requests to be merged if the build succeeds') expect(page).to have_content('Only allow merge requests to be merged if the pipeline succeeds')
expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved') expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved')
end end
end end
...@@ -58,12 +58,12 @@ feature 'Project settings > Merge Requests', feature: true, js: true do ...@@ -58,12 +58,12 @@ feature 'Project settings > Merge Requests', feature: true, js: true do
end end
scenario 'does not show the Merge Requests settings' do scenario 'does not show the Merge Requests settings' do
expect(page).not_to have_content('Only allow merge requests to be merged if the build succeeds') expect(page).not_to have_content('Only allow merge requests to be merged if the pipeline succeeds')
expect(page).not_to have_content('Only allow merge requests to be merged if all discussions are resolved') expect(page).not_to have_content('Only allow merge requests to be merged if all discussions are resolved')
select 'Everyone with access', from: "project_project_feature_attributes_merge_requests_access_level" select 'Everyone with access', from: "project_project_feature_attributes_merge_requests_access_level"
expect(page).to have_content('Only allow merge requests to be merged if the build succeeds') expect(page).to have_content('Only allow merge requests to be merged if the pipeline succeeds')
expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved') expect(page).to have_content('Only allow merge requests to be merged if all discussions are resolved')
end end
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
%tr %tr
%th Environment %th Environment
%th Last deployment %th Last deployment
%th Build %th Job
%th Commit %th Commit
%th %th
%th %th
......
...@@ -484,11 +484,11 @@ describe Ci::Build, :models do ...@@ -484,11 +484,11 @@ describe Ci::Build, :models do
let!(:build) { create(:ci_build, :trace, :success, :artifacts) } let!(:build) { create(:ci_build, :trace, :success, :artifacts) }
subject { build.erased? } subject { build.erased? }
context 'build has not been erased' do context 'job has not been erased' do
it { is_expected.to be_falsey } it { is_expected.to be_falsey }
end end
context 'build has been erased' do context 'job has been erased' do
before do before do
build.erase build.erase
end end
......
...@@ -86,7 +86,7 @@ describe API::Builds, api: true do ...@@ -86,7 +86,7 @@ describe API::Builds, api: true do
context 'when commit exists in repository' do context 'when commit exists in repository' do
context 'when user is authorized' do context 'when user is authorized' do
context 'when pipeline has builds' do context 'when pipeline has jobs' do
before do before do
create(:ci_pipeline, project: project, sha: project.commit.id) create(:ci_pipeline, project: project, sha: project.commit.id)
create(:ci_build, pipeline: pipeline) create(:ci_build, pipeline: pipeline)
...@@ -95,7 +95,7 @@ describe API::Builds, api: true do ...@@ -95,7 +95,7 @@ describe API::Builds, api: true do
get api("/projects/#{project.id}/repository/commits/#{project.commit.id}/builds", api_user) get api("/projects/#{project.id}/repository/commits/#{project.commit.id}/builds", api_user)
end end
it 'returns project builds for specific commit' do it 'returns project jobs for specific commit' do
expect(response).to have_http_status(200) expect(response).to have_http_status(200)
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response.size).to eq 2 expect(json_response.size).to eq 2
...@@ -111,7 +111,7 @@ describe API::Builds, api: true do ...@@ -111,7 +111,7 @@ describe API::Builds, api: true do
end end
end end
context 'when pipeline has no builds' do context 'when pipeline has no jobs' do
before do before do
branch_head = project.commit('feature').id branch_head = project.commit('feature').id
get api("/projects/#{project.id}/repository/commits/#{branch_head}/builds", api_user) get api("/projects/#{project.id}/repository/commits/#{branch_head}/builds", api_user)
...@@ -133,7 +133,7 @@ describe API::Builds, api: true do ...@@ -133,7 +133,7 @@ describe API::Builds, api: true do
get api("/projects/#{project.id}/repository/commits/#{project.commit.id}/builds", nil) get api("/projects/#{project.id}/repository/commits/#{project.commit.id}/builds", nil)
end end
it 'does not return project builds' do it 'does not return project jobs' do
expect(response).to have_http_status(401) expect(response).to have_http_status(401)
expect(json_response.except('message')).to be_empty expect(json_response.except('message')).to be_empty
end end
...@@ -147,7 +147,7 @@ describe API::Builds, api: true do ...@@ -147,7 +147,7 @@ describe API::Builds, api: true do
end end
context 'authorized user' do context 'authorized user' do
it 'returns specific build data' do it 'returns specific job data' do
expect(response).to have_http_status(200) expect(response).to have_http_status(200)
expect(json_response['name']).to eq('test') expect(json_response['name']).to eq('test')
end end
...@@ -165,7 +165,7 @@ describe API::Builds, api: true do ...@@ -165,7 +165,7 @@ describe API::Builds, api: true do
context 'unauthorized user' do context 'unauthorized user' do
let(:api_user) { nil } let(:api_user) { nil }
it 'does not return specific build data' do it 'does not return specific job data' do
expect(response).to have_http_status(401) expect(response).to have_http_status(401)
end end
end end
...@@ -176,7 +176,7 @@ describe API::Builds, api: true do ...@@ -176,7 +176,7 @@ describe API::Builds, api: true do
get api("/projects/#{project.id}/builds/#{build.id}/artifacts", api_user) get api("/projects/#{project.id}/builds/#{build.id}/artifacts", api_user)
end end
context 'build with artifacts' do context 'job with artifacts' do
let(:build) { create(:ci_build, :artifacts, pipeline: pipeline) } let(:build) { create(:ci_build, :artifacts, pipeline: pipeline) }
context 'authorized user' do context 'authorized user' do
...@@ -185,7 +185,7 @@ describe API::Builds, api: true do ...@@ -185,7 +185,7 @@ describe API::Builds, api: true do
'Content-Disposition' => 'attachment; filename=ci_build_artifacts.zip' } 'Content-Disposition' => 'attachment; filename=ci_build_artifacts.zip' }
end end
it 'returns specific build artifacts' do it 'returns specific job artifacts' do
expect(response).to have_http_status(200) expect(response).to have_http_status(200)
expect(response.headers).to include(download_headers) expect(response.headers).to include(download_headers)
end end
...@@ -194,13 +194,13 @@ describe API::Builds, api: true do ...@@ -194,13 +194,13 @@ describe API::Builds, api: true do
context 'unauthorized user' do context 'unauthorized user' do
let(:api_user) { nil } let(:api_user) { nil }
it 'does not return specific build artifacts' do it 'does not return specific job artifacts' do
expect(response).to have_http_status(401) expect(response).to have_http_status(401)
end end
end end
end end
it 'does not return build artifacts if not uploaded' do it 'does not return job artifacts if not uploaded' do
expect(response).to have_http_status(404) expect(response).to have_http_status(404)
end end
end end
...@@ -241,7 +241,7 @@ describe API::Builds, api: true do ...@@ -241,7 +241,7 @@ describe API::Builds, api: true do
end end
end end
context 'non-existing build' do context 'non-existing job' do
shared_examples 'not found' do shared_examples 'not found' do
it { expect(response).to have_http_status(:not_found) } it { expect(response).to have_http_status(:not_found) }
end end
...@@ -254,7 +254,7 @@ describe API::Builds, api: true do ...@@ -254,7 +254,7 @@ describe API::Builds, api: true do
it_behaves_like 'not found' it_behaves_like 'not found'
end end
context 'has no such build' do context 'has no such job' do
before do before do
get path_for_ref(pipeline.ref, 'NOBUILD') get path_for_ref(pipeline.ref, 'NOBUILD')
end end
...@@ -263,7 +263,7 @@ describe API::Builds, api: true do ...@@ -263,7 +263,7 @@ describe API::Builds, api: true do
end end
end end
context 'find proper build' do context 'find proper job' do
shared_examples 'a valid file' do shared_examples 'a valid file' do
let(:download_headers) do let(:download_headers) do
{ 'Content-Transfer-Encoding' => 'binary', { 'Content-Transfer-Encoding' => 'binary',
...@@ -311,7 +311,7 @@ describe API::Builds, api: true do ...@@ -311,7 +311,7 @@ describe API::Builds, api: true do
end end
context 'authorized user' do context 'authorized user' do
it 'returns specific build trace' do it 'returns specific job trace' do
expect(response).to have_http_status(200) expect(response).to have_http_status(200)
expect(response.body).to eq(build.trace) expect(response.body).to eq(build.trace)
end end
...@@ -320,7 +320,7 @@ describe API::Builds, api: true do ...@@ -320,7 +320,7 @@ describe API::Builds, api: true do
context 'unauthorized user' do context 'unauthorized user' do
let(:api_user) { nil } let(:api_user) { nil }
it 'does not return specific build trace' do it 'does not return specific job trace' do
expect(response).to have_http_status(401) expect(response).to have_http_status(401)
end end
end end
...@@ -333,7 +333,7 @@ describe API::Builds, api: true do ...@@ -333,7 +333,7 @@ describe API::Builds, api: true do
context 'authorized user' do context 'authorized user' do
context 'user with :update_build persmission' do context 'user with :update_build persmission' do
it 'cancels running or pending build' do it 'cancels running or pending job' do
expect(response).to have_http_status(201) expect(response).to have_http_status(201)
expect(project.builds.first.status).to eq('canceled') expect(project.builds.first.status).to eq('canceled')
end end
...@@ -342,7 +342,7 @@ describe API::Builds, api: true do ...@@ -342,7 +342,7 @@ describe API::Builds, api: true do
context 'user without :update_build permission' do context 'user without :update_build permission' do
let(:api_user) { reporter.user } let(:api_user) { reporter.user }
it 'does not cancel build' do it 'does not cancel job' do
expect(response).to have_http_status(403) expect(response).to have_http_status(403)
end end
end end
...@@ -351,7 +351,7 @@ describe API::Builds, api: true do ...@@ -351,7 +351,7 @@ describe API::Builds, api: true do
context 'unauthorized user' do context 'unauthorized user' do
let(:api_user) { nil } let(:api_user) { nil }
it 'does not cancel build' do it 'does not cancel job' do
expect(response).to have_http_status(401) expect(response).to have_http_status(401)
end end
end end
...@@ -366,7 +366,7 @@ describe API::Builds, api: true do ...@@ -366,7 +366,7 @@ describe API::Builds, api: true do
context 'authorized user' do context 'authorized user' do
context 'user with :update_build permission' do context 'user with :update_build permission' do
it 'retries non-running build' do it 'retries non-running job' do
expect(response).to have_http_status(201) expect(response).to have_http_status(201)
expect(project.builds.first.status).to eq('canceled') expect(project.builds.first.status).to eq('canceled')
expect(json_response['status']).to eq('pending') expect(json_response['status']).to eq('pending')
...@@ -376,7 +376,7 @@ describe API::Builds, api: true do ...@@ -376,7 +376,7 @@ describe API::Builds, api: true do
context 'user without :update_build permission' do context 'user without :update_build permission' do
let(:api_user) { reporter.user } let(:api_user) { reporter.user }
it 'does not retry build' do it 'does not retry job' do
expect(response).to have_http_status(403) expect(response).to have_http_status(403)
end end
end end
...@@ -385,7 +385,7 @@ describe API::Builds, api: true do ...@@ -385,7 +385,7 @@ describe API::Builds, api: true do
context 'unauthorized user' do context 'unauthorized user' do
let(:api_user) { nil } let(:api_user) { nil }
it 'does not retry build' do it 'does not retry job' do
expect(response).to have_http_status(401) expect(response).to have_http_status(401)
end end
end end
...@@ -396,23 +396,23 @@ describe API::Builds, api: true do ...@@ -396,23 +396,23 @@ describe API::Builds, api: true do
post api("/projects/#{project.id}/builds/#{build.id}/erase", user) post api("/projects/#{project.id}/builds/#{build.id}/erase", user)
end end
context 'build is erasable' do context 'job is erasable' do
let(:build) { create(:ci_build, :trace, :artifacts, :success, project: project, pipeline: pipeline) } let(:build) { create(:ci_build, :trace, :artifacts, :success, project: project, pipeline: pipeline) }
it 'erases build content' do it 'erases job content' do
expect(response.status).to eq 201 expect(response.status).to eq 201
expect(build.trace).to be_empty expect(build.trace).to be_empty
expect(build.artifacts_file.exists?).to be_falsy expect(build.artifacts_file.exists?).to be_falsy
expect(build.artifacts_metadata.exists?).to be_falsy expect(build.artifacts_metadata.exists?).to be_falsy
end end
it 'updates build' do it 'updates job' do
expect(build.reload.erased_at).to be_truthy expect(build.reload.erased_at).to be_truthy
expect(build.reload.erased_by).to eq user expect(build.reload.erased_by).to eq user
end end
end end
context 'build is not erasable' do context 'job is not erasable' do
let(:build) { create(:ci_build, :trace, project: project, pipeline: pipeline) } let(:build) { create(:ci_build, :trace, project: project, pipeline: pipeline) }
it 'responds with forbidden' do it 'responds with forbidden' do
...@@ -452,20 +452,20 @@ describe API::Builds, api: true do ...@@ -452,20 +452,20 @@ describe API::Builds, api: true do
post api("/projects/#{project.id}/builds/#{build.id}/play", user) post api("/projects/#{project.id}/builds/#{build.id}/play", user)
end end
context 'on an playable build' do context 'on an playable job' do
let(:build) { create(:ci_build, :manual, project: project, pipeline: pipeline) } let(:build) { create(:ci_build, :manual, project: project, pipeline: pipeline) }
it 'plays the build' do it 'plays the job' do
expect(response).to have_http_status 200 expect(response).to have_http_status 200
expect(json_response['user']['id']).to eq(user.id) expect(json_response['user']['id']).to eq(user.id)
expect(json_response['id']).to eq(build.id) expect(json_response['id']).to eq(build.id)
end end
end end
context 'on a non-playable build' do context 'on a non-playable job' do
it 'returns a status code 400, Bad Request' do it 'returns a status code 400, Bad Request' do
expect(response).to have_http_status 400 expect(response).to have_http_status 400
expect(response.body).to match("Unplayable Build") expect(response.body).to match("Unplayable Job")
end end
end end
end end
......
...@@ -288,7 +288,7 @@ describe Ci::API::Builds do ...@@ -288,7 +288,7 @@ describe Ci::API::Builds do
expect(build.reload.trace).to eq 'BUILD TRACE' expect(build.reload.trace).to eq 'BUILD TRACE'
end end
context 'build has been erased' do context 'job has been erased' do
let(:build) { create(:ci_build, runner_id: runner.id, erased_at: Time.now) } let(:build) { create(:ci_build, runner_id: runner.id, erased_at: Time.now) }
it 'responds with forbidden' do it 'responds with forbidden' do
......
...@@ -15,7 +15,7 @@ describe 'projects/builds/show', :view do ...@@ -15,7 +15,7 @@ describe 'projects/builds/show', :view do
allow(view).to receive(:can?).and_return(true) allow(view).to receive(:can?).and_return(true)
end end
describe 'build information in header' do describe 'job information in header' do
let(:build) do let(:build) do
create(:ci_build, :success, environment: 'staging') create(:ci_build, :success, environment: 'staging')
end end
...@@ -28,11 +28,11 @@ describe 'projects/builds/show', :view do ...@@ -28,11 +28,11 @@ describe 'projects/builds/show', :view do
expect(rendered).to have_css('.ci-status.ci-success', text: 'passed') expect(rendered).to have_css('.ci-status.ci-success', text: 'passed')
end end
it 'does not render a link to the build' do it 'does not render a link to the job' do
expect(rendered).not_to have_link('passed') expect(rendered).not_to have_link('passed')
end end
it 'shows build id' do it 'shows job id' do
expect(rendered).to have_css('.js-build-id', text: build.id) expect(rendered).to have_css('.js-build-id', text: build.id)
end end
...@@ -45,8 +45,8 @@ describe 'projects/builds/show', :view do ...@@ -45,8 +45,8 @@ describe 'projects/builds/show', :view do
end end
end end
describe 'environment info in build view' do describe 'environment info in job view' do
context 'build with latest deployment' do context 'job with latest deployment' do
let(:build) do let(:build) do
create(:ci_build, :success, environment: 'staging') create(:ci_build, :success, environment: 'staging')
end end
...@@ -57,7 +57,7 @@ describe 'projects/builds/show', :view do ...@@ -57,7 +57,7 @@ describe 'projects/builds/show', :view do
end end
it 'shows deployment message' do it 'shows deployment message' do
expected_text = 'This build is the most recent deployment' expected_text = 'This job is the most recent deployment'
render render
expect(rendered).to have_css( expect(rendered).to have_css(
...@@ -65,7 +65,7 @@ describe 'projects/builds/show', :view do ...@@ -65,7 +65,7 @@ describe 'projects/builds/show', :view do
end end
end end
context 'build with outdated deployment' do context 'job with outdated deployment' do
let(:build) do let(:build) do
create(:ci_build, :success, environment: 'staging', pipeline: pipeline) create(:ci_build, :success, environment: 'staging', pipeline: pipeline)
end end
...@@ -87,7 +87,7 @@ describe 'projects/builds/show', :view do ...@@ -87,7 +87,7 @@ describe 'projects/builds/show', :view do
end end
it 'shows deployment message' do it 'shows deployment message' do
expected_text = 'This build is an out-of-date deployment ' \ expected_text = 'This job is an out-of-date deployment ' \
"to staging.\nView the most recent deployment ##{second_deployment.iid}." "to staging.\nView the most recent deployment ##{second_deployment.iid}."
render render
...@@ -95,7 +95,7 @@ describe 'projects/builds/show', :view do ...@@ -95,7 +95,7 @@ describe 'projects/builds/show', :view do
end end
end end
context 'build failed to deploy' do context 'job failed to deploy' do
let(:build) do let(:build) do
create(:ci_build, :failed, environment: 'staging', pipeline: pipeline) create(:ci_build, :failed, environment: 'staging', pipeline: pipeline)
end end
...@@ -105,7 +105,7 @@ describe 'projects/builds/show', :view do ...@@ -105,7 +105,7 @@ describe 'projects/builds/show', :view do
end end
it 'shows deployment message' do it 'shows deployment message' do
expected_text = 'The deployment of this build to staging did not succeed.' expected_text = 'The deployment of this job to staging did not succeed.'
render render
expect(rendered).to have_css( expect(rendered).to have_css(
...@@ -113,7 +113,7 @@ describe 'projects/builds/show', :view do ...@@ -113,7 +113,7 @@ describe 'projects/builds/show', :view do
end end
end end
context 'build will deploy' do context 'job will deploy' do
let(:build) do let(:build) do
create(:ci_build, :running, environment: 'staging', pipeline: pipeline) create(:ci_build, :running, environment: 'staging', pipeline: pipeline)
end end
...@@ -124,7 +124,7 @@ describe 'projects/builds/show', :view do ...@@ -124,7 +124,7 @@ describe 'projects/builds/show', :view do
end end
it 'shows deployment message' do it 'shows deployment message' do
expected_text = 'This build is creating a deployment to staging' expected_text = 'This job is creating a deployment to staging'
render render
expect(rendered).to have_css( expect(rendered).to have_css(
...@@ -137,7 +137,7 @@ describe 'projects/builds/show', :view do ...@@ -137,7 +137,7 @@ describe 'projects/builds/show', :view do
end end
it 'shows that deployment will be overwritten' do it 'shows that deployment will be overwritten' do
expected_text = 'This build is creating a deployment to staging' expected_text = 'This job is creating a deployment to staging'
render render
expect(rendered).to have_css( expect(rendered).to have_css(
...@@ -150,7 +150,7 @@ describe 'projects/builds/show', :view do ...@@ -150,7 +150,7 @@ describe 'projects/builds/show', :view do
context 'when environment does not exist' do context 'when environment does not exist' do
it 'shows deployment message' do it 'shows deployment message' do
expected_text = 'This build is creating a deployment to staging' expected_text = 'This job is creating a deployment to staging'
render render
expect(rendered).to have_css( expect(rendered).to have_css(
...@@ -161,7 +161,7 @@ describe 'projects/builds/show', :view do ...@@ -161,7 +161,7 @@ describe 'projects/builds/show', :view do
end end
end end
context 'build that failed to deploy and environment has not been created' do context 'job that failed to deploy and environment has not been created' do
let(:build) do let(:build) do
create(:ci_build, :failed, environment: 'staging', pipeline: pipeline) create(:ci_build, :failed, environment: 'staging', pipeline: pipeline)
end end
...@@ -171,7 +171,7 @@ describe 'projects/builds/show', :view do ...@@ -171,7 +171,7 @@ describe 'projects/builds/show', :view do
end end
it 'shows deployment message' do it 'shows deployment message' do
expected_text = 'The deployment of this build to staging did not succeed' expected_text = 'The deployment of this job to staging did not succeed'
render render
expect(rendered).to have_css( expect(rendered).to have_css(
...@@ -179,7 +179,7 @@ describe 'projects/builds/show', :view do ...@@ -179,7 +179,7 @@ describe 'projects/builds/show', :view do
end end
end end
context 'build that will deploy and environment has not been created' do context 'job that will deploy and environment has not been created' do
let(:build) do let(:build) do
create(:ci_build, :running, environment: 'staging', pipeline: pipeline) create(:ci_build, :running, environment: 'staging', pipeline: pipeline)
end end
...@@ -189,7 +189,7 @@ describe 'projects/builds/show', :view do ...@@ -189,7 +189,7 @@ describe 'projects/builds/show', :view do
end end
it 'shows deployment message' do it 'shows deployment message' do
expected_text = 'This build is creating a deployment to staging' expected_text = 'This job is creating a deployment to staging'
render render
expect(rendered).to have_css( expect(rendered).to have_css(
...@@ -200,7 +200,7 @@ describe 'projects/builds/show', :view do ...@@ -200,7 +200,7 @@ describe 'projects/builds/show', :view do
end end
end end
context 'when build is running' do context 'when job is running' do
before do before do
build.run! build.run!
render render
...@@ -211,7 +211,7 @@ describe 'projects/builds/show', :view do ...@@ -211,7 +211,7 @@ describe 'projects/builds/show', :view do
end end
end end
context 'when build is not running' do context 'when job is not running' do
before do before do
build.success! build.success!
render render
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment