Commit 374387b5 authored by Filipa Lacerda's avatar Filipa Lacerda

Resolve conflict after merge

parents 2159694e 98e6e306
......@@ -180,7 +180,7 @@
<tr>
<th class="environments-name">Environment</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-date">Updated</th>
<th class="hidden-xs environments-actions"></th>
......
......@@ -25,9 +25,10 @@
<button
v-if='actions'
class="dropdown-toggle btn btn-default has-tooltip js-pipeline-dropdown-manual-actions"
title="Manual build"
data-toggle="dropdown"
title="Manual job"
data-placement="top"
aria-label="Manual build"
aria-label="Manual job"
>
<span v-html='svgs.iconPlay' aria-hidden="true"></span>
<i class="fa fa-caret-down" aria-hidden="true"></i>
......
......@@ -201,7 +201,8 @@
.stage-container {
display: inline-block;
position: relative;
margin-right: 6px;
height: 22px;
margin: 3px 6px 3px 0;
.tooltip {
white-space: nowrap;
......
......@@ -204,7 +204,7 @@
.col-sm-10
= f.number_field :max_artifacts_size, class: 'form-control'
.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")
- if Gitlab.config.registry.enabled
......
......@@ -12,7 +12,7 @@
= 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
#{(@scope || 'all').capitalize} builds
#{(@scope || 'all').capitalize} jobs
%ul.content-list.builds-content-list.admin-builds-table
= render "projects/builds/table", builds: @builds, admin: true
......@@ -20,9 +20,9 @@
%span
Groups
= nav_link path: 'builds#index' do
= link_to admin_builds_path, title: 'Builds' do
= link_to admin_builds_path, title: 'Jobs' do
%span
Builds
Jobs
= nav_link path: ['runners#index', 'runners#show'] do
= link_to admin_runners_path, title: 'Runners' do
%span
......
......@@ -26,7 +26,7 @@
.bs-callout
%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.
%br
Runners can be placed on separate users, servers, even on your local machine.
......@@ -37,16 +37,16 @@
%ul
%li
%span.label.label-success shared
\- Runner runs builds from all unassigned projects
\- Runner runs jobs from all unassigned projects
%li
%span.label.label-info specific
\- Runner runs builds from assigned projects
\- Runner runs jobs from assigned projects
%li
%span.label.label-warning locked
\- Runner cannot be assigned to other projects
%li
%span.label.label-danger paused
\- Runner will not receive any new builds
\- Runner will not receive any new jobs
.append-bottom-20.clearfix
.pull-left
......@@ -68,7 +68,7 @@
%th Runner token
%th Description
%th Projects
%th Builds
%th Jobs
%th Tags
%th Last contact
%th
......
......@@ -11,13 +11,13 @@
- if @runner.shared?
.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
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.
- else
.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.
%hr
......@@ -70,11 +70,11 @@
= paginate @projects, theme: "gitlab"
.col-md-6
%h4 Recent builds served by this Runner
%h4 Recent jobs served by this Runner
%table.table.ci-table.runner-builds
%thead
%tr
%th Build
%th Job
%th Status
%th Project
%th Commit
......
......@@ -143,7 +143,7 @@
.key g
.key b
%td
Go to builds
Go to jobs
%tr
%td.shortcut
.key g
......
......@@ -96,8 +96,8 @@
-# Shortcut to builds page
- if project_nav_tab? :builds
%li.hidden
= link_to project_builds_path(@project), title: 'Builds', class: 'shortcuts-builds' do
Builds
= link_to project_builds_path(@project), title: 'Jobs', class: 'shortcuts-builds' do
Jobs
-# Shortcut to commits page
- if project_nav_tab? :commits
......
- 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;" }
GitLab (build failed)
GitLab (job failed)
%h3
Project:
......@@ -21,4 +21,4 @@
Message: #{@build.pipeline.git_commit_message}
%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 %>
Commit: <%= @build.pipeline.short_sha %>
......
- 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;" }
GitLab (build successful)
GitLab (job successful)
%h3
Project:
......@@ -21,4 +21,4 @@
Message: #{@build.pipeline.git_commit_message}
%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 %>
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 @@
%h4
Customize your workflow!
%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)
= link_to "Get started", edit_project_path(@project), class: "btn btn-success"
......@@ -4,10 +4,10 @@
.checkbox.builds-feature
= form.label :only_allow_merge_if_build_succeeds do
= 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
%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')
.checkbox
= 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
.pull-right
......
.content-block.build-header
.header-content
= render 'ci/status/badge', status: @build.detailed_status(current_user), link: false
Build
Job
%strong.js-build-id ##{@build.id}
in pipeline
= link_to pipeline_path(@build.pipeline) do
......@@ -17,6 +17,6 @@
= render "user"
= time_ago_with_tooltip(@build.created_at)
- 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" }
= icon('angle-double-left')
......@@ -2,7 +2,7 @@
%aside.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
Build
Job
%strong ##{@build.id}
%a.gutter-toggle.pull-right.js-sidebar-build-toggle{ href: "#" }
= icon('angle-double-right')
......@@ -17,7 +17,7 @@
- if can?(current_user, :read_build, @project) && (@build.artifacts? || @build.artifacts_expired?)
.block{ class: ("block-first" if !@build.coverage) }
.title
Build artifacts
Job artifacts
- if @build.artifacts_expired?
%p.build-detail-row
The artifacts were removed
......@@ -42,9 +42,9 @@
.block{ class: ("block-first" if !@build.coverage && !(can?(current_user, :read_build, @project) && (@build.artifacts? || @build.artifacts_expired?))) }
.title
Build details
Job details
- 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
%p.build-detail-row
%span.build-light-text Merge Request:
......@@ -136,4 +136,4 @@
- else
= build.id
- 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 @@
- if builds.blank?
%div
.nothing-here-block No builds to show
.nothing-here-block No jobs to show
- else
.table-holder
%table.table.ci-table.builds-page
%thead
%tr
%th Status
%th Build
%th Job
%th Pipeline
- if admin
%th Project
......
- @no_container = true
- page_title "Builds"
- page_title "Jobs"
= render "projects/pipelines/head"
%div{ class: container_class }
......@@ -14,7 +14,7 @@
data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
- 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
%span CI Lint
......
- @no_container = true
- page_title "#{@build.name} (##{@build.id})", "Builds"
- page_title "#{@build.name} (##{@build.id})", "Jobs"
- trace_with_state = @build.trace_with_state
= render "projects/pipelines/head", build_subnav: true
......@@ -12,14 +12,14 @@
.bs-callout.bs-callout-warning
%p
- 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?
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|
%span.label.label-primary
= tag
- 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
Go to
......@@ -37,14 +37,14 @@
- environment = environment_for_build(@build.project, @build)
- if @build.success? && @build.last_deployment.present?
- 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
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)}.
- 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
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)
and will overwrite the #{deployment_link(environment.last_deployment, text: 'latest deployment')}
......@@ -52,9 +52,9 @@
- if @build.erased?
.erased.alert.alert-warning
- 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
Build has been erased #{time_ago_with_tooltip(@build.erased_at)}
Job has been erased #{time_ago_with_tooltip(@build.erased_at)}
- else
#js-build-scroll.scroll-controls
.scroll-step
......
......@@ -32,10 +32,10 @@
= link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "commit-id monospace"
- 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
= icon('refresh', class: 'text-warning has-tooltip', title: 'Build was retried')
= icon('refresh', class: 'text-warning has-tooltip', title: 'Job was retried')
.label-container
- if build.tags.any?
......
......@@ -15,7 +15,7 @@
- else
%span.api.monospace API
- 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?
%span.label.label-primary triggered
- if pipeline.yaml_errors.present?
......@@ -78,7 +78,7 @@
.btn-group.inline
- if actions.any?
.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')
= icon('caret-down', 'aria-hidden' => 'true')
%ul.dropdown-menu.dropdown-menu-align-right
......
......@@ -13,7 +13,7 @@
Pipeline
= link_to "##{pipeline.id}", namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id), class: "monospace"
with
= pluralize pipeline.statuses.count(:id), "build"
= pluralize pipeline.statuses.count(:id), "job"
- if pipeline.ref
for
= link_to pipeline.ref, namespace_project_commits_path(pipeline.project.namespace, pipeline.project, pipeline.ref), class: "monospace"
......@@ -44,7 +44,7 @@
%thead
%tr
%th Status
%th Build ID
%th Job ID
%th Name
%th
- if pipeline.project.build_coverage_enabled?
......
......@@ -63,7 +63,7 @@
.row
.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
.col-md-3
= project_feature_access_select(:builds_access_level)
......@@ -180,7 +180,7 @@
%p
The following items will NOT be exported:
%ul
%li Build traces and artifacts
%li Job traces and artifacts
%li LFS objects
%li Container registry images
%li CI variables
......
......@@ -32,7 +32,7 @@
%tr
%th ID
%th Commit
%th Build
%th Job
%th Created
%th.hidden-xs
......
%h4 Build charts
%h4 Pipelines charts
%p
&nbsp;
%span.cgreen
......@@ -11,19 +11,19 @@
.prepend-top-default
%p.light
Builds for last week
Jobs for last week
(#{date_from_to(Date.today - 7.days, Date.today)})
%canvas#weekChart{ height: 200 }
.prepend-top-default
%p.light
Builds for last month
Jobs for last month
(#{date_from_to(Date.today - 30.days, Date.today)})
%canvas#monthChart{ height: 200 }
.prepend-top-default
%p.light
Builds for last year
Jobs for last year
%canvas#yearChart.padded{ height: 250 }
- [:week, :month, :year].each do |scope|
......
......@@ -21,7 +21,7 @@
.ci_widget{ class: "ci-#{status} ci-status-icon-#{status}", style: "display:none" }
= ci_icon_for_status(status)
%span
CI build
CI job
= ci_label_for_status(status)
for
- commit = @merge_request.diff_head_commit
......
......@@ -16,13 +16,13 @@
gitlab_icon: "#{asset_path 'gitlab_logo.png'}",
ci_status: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.status : ''}",
ci_message: {
normal: "Build {{status}} for \"{{title}}\"",
preparing: "{{status}} build for \"{{title}}\""
normal: "Job {{status}} for \"{{title}}\"",
preparing: "{{status}} job for \"{{title}}\""
},
ci_enable: #{@project.ci_service ? "true" : "false"},
ci_title: {
preparing: "{{status}} build",
normal: "Build {{status}}"
preparing: "{{status}} job",
normal: "Job {{status}}"
},
ci_sha: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.short_sha : ''}",
ci_pipeline: #{@merge_request.head_pipeline.try(:id).to_json},
......
%h4
= icon('exclamation-triangle')
The build for this merge request failed
The job for this merge request failed
%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 @@
- if project_nav_tab? :builds
= 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
Builds
Jobs
- if project_nav_tab? :environments
= nav_link(controller: %w(environments)) do
......
......@@ -25,7 +25,7 @@
.well-segment.pipeline-info
.icon-container
= icon('clock-o')
= pluralize @pipeline.statuses.count(:id), "build"
= pluralize @pipeline.statuses.count(:id), "job"
- if @pipeline.ref
from
= link_to @pipeline.ref, namespace_project_commits_path(@project.namespace, @project, @pipeline.ref), class: "monospace"
......
......@@ -5,7 +5,7 @@
Pipeline
%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
Builds
Jobs
%span.badge.js-builds-counter= pipeline.statuses.count
......@@ -33,7 +33,7 @@
%thead
%tr
%th Status
%th Build ID
%th Job ID
%th Name
%th
- if pipeline.project.build_coverage_enabled?
......
......@@ -66,7 +66,7 @@
%span.input-group-addon /
%p.help-block
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')
.bs-callout.bs-callout-info
%p Below are examples of regex for existing tools:
......
......@@ -5,7 +5,7 @@
.col-sm-10
.checkbox
= f.check_box :active
%span.light Paused Runners don't accept new builds
%span.light Paused Runners don't accept new jobs
.form-group
= label :run_untagged, 'Run untagged jobs', class: 'control-label'
.col-sm-10
......
......@@ -2,7 +2,7 @@
.light.prepend-top-default
%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.
%br
Runners can be placed on separate users, servers, and even on your local machine.
......@@ -12,14 +12,14 @@
%ul
%li
%span.label.label-success active
\- Runner is active and can process any new builds
\- Runner is active and can process any new jobs
%li
%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
%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
.col-sm-6
= render 'specific_runners'
......
......@@ -67,7 +67,7 @@
In the
%code .gitlab-ci.yml
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
:plain
......@@ -86,12 +86,12 @@
:plain
#{builds_trigger_url(@project.id, ref: 'REF_NAME')}?token=TOKEN
%h5.prepend-top-default
Pass build variables
Pass job variables
%p.light
Add
%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:
......
......@@ -5,4 +5,4 @@
%p
So you can use them for passwords, secret keys or whatever you want.
%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 @@
= f.check_box :build_events, class: 'pull-left'
.prepend-left-20
= f.label :build_events, class: 'list-label' do
%strong Build events
%strong Jobs events
%p.light
This URL will be triggered when the build status changes
This URL will be triggered when the job status changes
%li
= f.check_box :pipeline_events, class: 'pull-left'
.prepend-left-20
......
---
title: Rename Builds to Pipelines, CI/CD Pipelines, or Jobs everywhere
merge_request: 8787
author:
---
title: Fix pipeline graph vertical spacing in Firefox and Safari
merge_request: 8886
author:
......@@ -33,7 +33,7 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps
step 'recent build summary contains information saying that build has been 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
......
......@@ -34,9 +34,9 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
step 'page should have CI graphs' do
expect(page).to have_content 'Overall'
expect(page).to have_content 'Builds for last week'
expect(page).to have_content 'Builds for last month'
expect(page).to have_content 'Builds for last year'
expect(page).to have_content 'Jobs for last week'
expect(page).to have_content 'Jobs for last month'
expect(page).to have_content 'Jobs for last year'
expect(page).to have_content 'Commit duration in minutes for last 30 commits'
end
......
......@@ -47,7 +47,7 @@ module SharedBuilds
end
step 'recent build has a build trace' do
@build.trace = 'build trace'
@build.trace = 'job trace'
end
step 'download of build artifacts archive starts' do
......@@ -60,7 +60,7 @@ module SharedBuilds
end
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
step 'I see build trace' do
......
......@@ -209,7 +209,7 @@ module API
build = get_build!(params[:build_id])
bad_request!("Unplayable Build") unless build.playable?
bad_request!("Unplayable Job") unless build.playable?
build.play(current_user)
......
......@@ -9,8 +9,8 @@ describe 'Admin Builds' do
let(:pipeline) { create(:ci_pipeline) }
context 'All tab' do
context 'when have builds' do
it 'shows all builds' do
context 'when have jobs' do
it 'shows all jobs' do
create(:ci_build, pipeline: pipeline, status: :pending)
create(:ci_build, pipeline: pipeline, status: :running)
create(:ci_build, pipeline: pipeline, status: :success)
......@@ -19,26 +19,26 @@ describe 'Admin Builds' do
visit admin_builds_path
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).to have_link 'Cancel all'
end
end
context 'when have no builds' do
context 'when have no jobs' do
it 'shows a message' do
visit admin_builds_path
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'
end
end
end
context 'Pending tab' do
context 'when have pending builds' do
it 'shows pending builds' do
context 'when have pending jobs' do
it 'shows pending jobs' do
build1 = create(:ci_build, pipeline: pipeline, status: :pending)
build2 = create(:ci_build, pipeline: pipeline, status: :running)
build3 = create(:ci_build, pipeline: pipeline, status: :success)
......@@ -55,22 +55,22 @@ describe 'Admin Builds' do
end
end
context 'when have no builds pending' do
context 'when have no jobs pending' do
it 'shows a message' do
create(:ci_build, pipeline: pipeline, status: :success)
visit admin_builds_path(scope: :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'
end
end
end
context 'Running tab' do
context 'when have running builds' do
it 'shows running builds' do
context 'when have running jobs' do
it 'shows running jobs' do
build1 = create(:ci_build, pipeline: pipeline, status: :running)
build2 = create(:ci_build, pipeline: pipeline, status: :success)
build3 = create(:ci_build, pipeline: pipeline, status: :failed)
......@@ -87,22 +87,22 @@ describe 'Admin Builds' do
end
end
context 'when have no builds running' do
context 'when have no jobs running' do
it 'shows a message' do
create(:ci_build, pipeline: pipeline, status: :success)
visit admin_builds_path(scope: :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'
end
end
end
context 'Finished tab' do
context 'when have finished builds' do
it 'shows finished builds' do
context 'when have finished jobs' do
it 'shows finished jobs' do
build1 = create(:ci_build, pipeline: pipeline, status: :pending)
build2 = create(:ci_build, pipeline: pipeline, status: :running)
build3 = create(:ci_build, pipeline: pipeline, status: :success)
......@@ -117,14 +117,14 @@ describe 'Admin Builds' do
end
end
context 'when have no builds finished' do
context 'when have no jobs finished' do
it 'shows a message' do
create(:ci_build, pipeline: pipeline, status: :running)
visit admin_builds_path(scope: :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'
end
end
......
......@@ -50,7 +50,7 @@ feature 'Only allow merge requests to be merged if the build succeeds', feature:
visit_merge_request(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
......@@ -61,7 +61,7 @@ feature 'Only allow merge requests to be merged if the build succeeds', feature:
visit_merge_request(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
......
......@@ -27,7 +27,7 @@ feature 'Builds', :feature do
visit namespace_project_builds_path(project.namespace, project, scope: :pending)
end
it "shows Pending tab builds" do
it "shows Pending tab jobs" do
expect(page).to have_link 'Cancel running'
expect(page).to have_selector('.nav-links li.active', text: 'Pending')
expect(page).to have_content build.short_sha
......@@ -42,7 +42,7 @@ feature 'Builds', :feature do
visit namespace_project_builds_path(project.namespace, project, scope: :running)
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_link 'Cancel running'
expect(page).to have_content build.short_sha
......@@ -57,20 +57,20 @@ feature 'Builds', :feature do
visit namespace_project_builds_path(project.namespace, project, scope: :finished)
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_content 'No builds to show'
expect(page).to have_content 'No jobs to show'
expect(page).to have_link 'Cancel running'
end
end
context "All builds" do
context "All jobs" do
before do
project.builds.running_or_pending.each(&:success)
visit namespace_project_builds_path(project.namespace, project)
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_content build.short_sha
expect(page).to have_content build.ref
......@@ -98,7 +98,7 @@ feature 'Builds', :feature do
end
describe "GET /:project/builds/:id" do
context "Build from project" do
context "Job from project" do
before do
visit namespace_project_build_path(project.namespace, project, build)
end
......@@ -111,7 +111,7 @@ feature 'Builds', :feature do
end
end
context "Build from other project" do
context "Job from other project" do
before do
visit namespace_project_build_path(project.namespace, project, build2)
end
......@@ -149,7 +149,7 @@ feature 'Builds', :feature do
context 'when expire date is defined' do
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
expect(page).to have_content 'The artifacts will be removed'
......@@ -160,7 +160,7 @@ feature 'Builds', :feature do
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 }
it 'does not have keep button' do
......@@ -197,8 +197,8 @@ feature 'Builds', :feature do
visit namespace_project_build_path(project.namespace, project, build)
end
context 'when build has an initial trace' do
it 'loads build trace' do
context 'when job has an initial trace' do
it 'loads job trace' do
expect(page).to have_content 'BUILD TRACE'
build.append_trace(' and more trace', 11)
......@@ -242,32 +242,32 @@ feature 'Builds', :feature do
end
end
context 'when build starts environment' do
context 'when job starts environment' do
let(:environment) { create(:environment, 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(: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)
expect(page).to have_link environment.name
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) }
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)
expect(page).to have_link environment.name
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(:build) { create(:ci_build, :success, environment: environment.name, pipeline: pipeline) }
......@@ -281,7 +281,7 @@ feature 'Builds', :feature do
end
describe "POST /:project/builds/:id/cancel" do
context "Build from project" do
context "Job from project" do
before do
build.run!
visit namespace_project_build_path(project.namespace, project, build)
......@@ -295,7 +295,7 @@ feature 'Builds', :feature do
end
end
context "Build from other project" do
context "Job from other project" do
before do
build.run!
visit namespace_project_build_path(project.namespace, project, build)
......@@ -307,13 +307,13 @@ feature 'Builds', :feature do
end
describe "POST /:project/builds/:id/retry" do
context "Build from project" do
context "Job from project" do
before do
build.run!
visit namespace_project_build_path(project.namespace, project, build)
click_link 'Cancel'
page.within('.build-header') do
click_link 'Retry build'
click_link 'Retry job'
end
end
......
......@@ -91,10 +91,10 @@ describe 'Pipeline', :feature, :js do
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')
expect(page).not_to have_content('Retry build')
expect(page).not_to have_content('Retry job')
end
end
......@@ -113,11 +113,11 @@ describe 'Pipeline', :feature, :js do
it 'should be possible to retry the failed build' do
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
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
page.within('#ci-badge-manual-build') do
expect(page).to have_selector('.js-ci-status-icon-manual')
......@@ -129,14 +129,14 @@ describe 'Pipeline', :feature, :js do
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')
expect(page).not_to have_content('Play build')
expect(page).not_to have_content('Play job')
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
expect(page).to have_selector('.js-ci-status-icon-success')
expect(page).to have_content('jenkins')
......@@ -146,12 +146,12 @@ describe 'Pipeline', :feature, :js do
end
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('Builds')
expect(page).to have_link('Jobs')
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)
end
......@@ -160,7 +160,7 @@ describe 'Pipeline', :feature, :js do
end
end
context 'retrying builds' do
context 'retrying jobs' do
it { expect(page).not_to have_content('retried') }
context 'when retrying' do
......@@ -170,7 +170,7 @@ describe 'Pipeline', :feature, :js do
end
end
context 'canceling builds' do
context 'canceling jobs' do
it { expect(page).not_to have_selector('.ci-canceled') }
context 'when canceling' do
......@@ -191,7 +191,7 @@ describe 'Pipeline', :feature, :js do
visit builds_namespace_project_pipeline_path(project.namespace, project, pipeline)
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(build_passed.id)
expect(page).to have_content('Deploy')
......@@ -203,26 +203,26 @@ describe 'Pipeline', :feature, :js do
expect(page).to have_link('Play')
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')
end
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('Builds')
expect(page).to have_link('Jobs')
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)
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')
end
end
context 'retrying builds' do
context 'retrying jobs' do
it { expect(page).not_to have_content('retried') }
context 'when retrying' do
......@@ -233,7 +233,7 @@ describe 'Pipeline', :feature, :js do
end
end
context 'canceling builds' do
context 'canceling jobs' do
it { expect(page).not_to have_selector('.ci-canceled') }
context 'when canceling' do
......@@ -244,7 +244,7 @@ describe 'Pipeline', :feature, :js do
end
end
context 'playing manual build' do
context 'playing manual job' do
before do
within '.pipeline-holder' do
click_link('Play')
......
......@@ -11,41 +11,41 @@ feature 'Project settings > Merge Requests', feature: true, js: true do
login_as(user)
end
context 'when Merge Request and Builds are initially enabled' do
context 'when Merge Request and Pipelines are initially enabled' do
before do
project.project_feature.update_attribute('merge_requests_access_level', ProjectFeature::ENABLED)
end
context 'when Builds are initially enabled' do
context 'when Pipelines are initially enabled' do
before do
project.project_feature.update_attribute('builds_access_level', ProjectFeature::ENABLED)
visit edit_project_path(project)
end
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')
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')
end
end
context 'when Builds are initially disabled' do
context 'when Pipelines are initially disabled' do
before do
project.project_feature.update_attribute('builds_access_level', ProjectFeature::DISABLED)
visit edit_project_path(project)
end
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')
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')
end
end
......@@ -58,12 +58,12 @@ feature 'Project settings > Merge Requests', feature: true, js: true do
end
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')
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')
end
end
......
......@@ -3,7 +3,7 @@
%tr
%th Environment
%th Last deployment
%th Build
%th Job
%th Commit
%th
%th
......
......@@ -484,11 +484,11 @@ describe Ci::Build, :models do
let!(:build) { create(:ci_build, :trace, :success, :artifacts) }
subject { build.erased? }
context 'build has not been erased' do
context 'job has not been erased' do
it { is_expected.to be_falsey }
end
context 'build has been erased' do
context 'job has been erased' do
before do
build.erase
end
......
......@@ -86,7 +86,7 @@ describe API::Builds, api: true do
context 'when commit exists in repository' do
context 'when user is authorized' do
context 'when pipeline has builds' do
context 'when pipeline has jobs' do
before do
create(:ci_pipeline, project: project, sha: project.commit.id)
create(:ci_build, pipeline: pipeline)
......@@ -95,7 +95,7 @@ describe API::Builds, api: true do
get api("/projects/#{project.id}/repository/commits/#{project.commit.id}/builds", api_user)
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(json_response).to be_an Array
expect(json_response.size).to eq 2
......@@ -111,7 +111,7 @@ describe API::Builds, api: true do
end
end
context 'when pipeline has no builds' do
context 'when pipeline has no jobs' do
before do
branch_head = project.commit('feature').id
get api("/projects/#{project.id}/repository/commits/#{branch_head}/builds", api_user)
......@@ -133,7 +133,7 @@ describe API::Builds, api: true do
get api("/projects/#{project.id}/repository/commits/#{project.commit.id}/builds", nil)
end
it 'does not return project builds' do
it 'does not return project jobs' do
expect(response).to have_http_status(401)
expect(json_response.except('message')).to be_empty
end
......@@ -147,7 +147,7 @@ describe API::Builds, api: true do
end
context 'authorized user' do
it 'returns specific build data' do
it 'returns specific job data' do
expect(response).to have_http_status(200)
expect(json_response['name']).to eq('test')
end
......@@ -165,7 +165,7 @@ describe API::Builds, api: true do
context 'unauthorized user' do
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)
end
end
......@@ -176,7 +176,7 @@ describe API::Builds, api: true do
get api("/projects/#{project.id}/builds/#{build.id}/artifacts", api_user)
end
context 'build with artifacts' do
context 'job with artifacts' do
let(:build) { create(:ci_build, :artifacts, pipeline: pipeline) }
context 'authorized user' do
......@@ -185,7 +185,7 @@ describe API::Builds, api: true do
'Content-Disposition' => 'attachment; filename=ci_build_artifacts.zip' }
end
it 'returns specific build artifacts' do
it 'returns specific job artifacts' do
expect(response).to have_http_status(200)
expect(response.headers).to include(download_headers)
end
......@@ -194,13 +194,13 @@ describe API::Builds, api: true do
context 'unauthorized user' do
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)
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)
end
end
......@@ -241,7 +241,7 @@ describe API::Builds, api: true do
end
end
context 'non-existing build' do
context 'non-existing job' do
shared_examples 'not found' do
it { expect(response).to have_http_status(:not_found) }
end
......@@ -254,7 +254,7 @@ describe API::Builds, api: true do
it_behaves_like 'not found'
end
context 'has no such build' do
context 'has no such job' do
before do
get path_for_ref(pipeline.ref, 'NOBUILD')
end
......@@ -263,7 +263,7 @@ describe API::Builds, api: true do
end
end
context 'find proper build' do
context 'find proper job' do
shared_examples 'a valid file' do
let(:download_headers) do
{ 'Content-Transfer-Encoding' => 'binary',
......@@ -311,7 +311,7 @@ describe API::Builds, api: true do
end
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.body).to eq(build.trace)
end
......@@ -320,7 +320,7 @@ describe API::Builds, api: true do
context 'unauthorized user' do
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)
end
end
......@@ -333,7 +333,7 @@ describe API::Builds, api: true do
context 'authorized user' 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(project.builds.first.status).to eq('canceled')
end
......@@ -342,7 +342,7 @@ describe API::Builds, api: true do
context 'user without :update_build permission' do
let(:api_user) { reporter.user }
it 'does not cancel build' do
it 'does not cancel job' do
expect(response).to have_http_status(403)
end
end
......@@ -351,7 +351,7 @@ describe API::Builds, api: true do
context 'unauthorized user' do
let(:api_user) { nil }
it 'does not cancel build' do
it 'does not cancel job' do
expect(response).to have_http_status(401)
end
end
......@@ -366,7 +366,7 @@ describe API::Builds, api: true do
context 'authorized user' 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(project.builds.first.status).to eq('canceled')
expect(json_response['status']).to eq('pending')
......@@ -376,7 +376,7 @@ describe API::Builds, api: true do
context 'user without :update_build permission' do
let(:api_user) { reporter.user }
it 'does not retry build' do
it 'does not retry job' do
expect(response).to have_http_status(403)
end
end
......@@ -385,7 +385,7 @@ describe API::Builds, api: true do
context 'unauthorized user' do
let(:api_user) { nil }
it 'does not retry build' do
it 'does not retry job' do
expect(response).to have_http_status(401)
end
end
......@@ -396,23 +396,23 @@ describe API::Builds, api: true do
post api("/projects/#{project.id}/builds/#{build.id}/erase", user)
end
context 'build is erasable' do
context 'job is erasable' do
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(build.trace).to be_empty
expect(build.artifacts_file.exists?).to be_falsy
expect(build.artifacts_metadata.exists?).to be_falsy
end
it 'updates build' do
it 'updates job' do
expect(build.reload.erased_at).to be_truthy
expect(build.reload.erased_by).to eq user
end
end
context 'build is not erasable' do
context 'job is not erasable' do
let(:build) { create(:ci_build, :trace, project: project, pipeline: pipeline) }
it 'responds with forbidden' do
......@@ -452,20 +452,20 @@ describe API::Builds, api: true do
post api("/projects/#{project.id}/builds/#{build.id}/play", user)
end
context 'on an playable build' do
context 'on an playable job' do
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(json_response['user']['id']).to eq(user.id)
expect(json_response['id']).to eq(build.id)
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
expect(response).to have_http_status 400
expect(response.body).to match("Unplayable Build")
expect(response.body).to match("Unplayable Job")
end
end
end
......
......@@ -288,7 +288,7 @@ describe Ci::API::Builds do
expect(build.reload.trace).to eq 'BUILD TRACE'
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) }
it 'responds with forbidden' do
......
......@@ -15,7 +15,7 @@ describe 'projects/builds/show', :view do
allow(view).to receive(:can?).and_return(true)
end
describe 'build information in header' do
describe 'job information in header' do
let(:build) do
create(:ci_build, :success, environment: 'staging')
end
......@@ -28,11 +28,11 @@ describe 'projects/builds/show', :view do
expect(rendered).to have_css('.ci-status.ci-success', text: 'passed')
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')
end
it 'shows build id' do
it 'shows job id' do
expect(rendered).to have_css('.js-build-id', text: build.id)
end
......@@ -45,8 +45,8 @@ describe 'projects/builds/show', :view do
end
end
describe 'environment info in build view' do
context 'build with latest deployment' do
describe 'environment info in job view' do
context 'job with latest deployment' do
let(:build) do
create(:ci_build, :success, environment: 'staging')
end
......@@ -57,7 +57,7 @@ describe 'projects/builds/show', :view do
end
it 'shows deployment message' do
expected_text = 'This build is the most recent deployment'
expected_text = 'This job is the most recent deployment'
render
expect(rendered).to have_css(
......@@ -65,7 +65,7 @@ describe 'projects/builds/show', :view do
end
end
context 'build with outdated deployment' do
context 'job with outdated deployment' do
let(:build) do
create(:ci_build, :success, environment: 'staging', pipeline: pipeline)
end
......@@ -87,7 +87,7 @@ describe 'projects/builds/show', :view do
end
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}."
render
......@@ -95,7 +95,7 @@ describe 'projects/builds/show', :view do
end
end
context 'build failed to deploy' do
context 'job failed to deploy' do
let(:build) do
create(:ci_build, :failed, environment: 'staging', pipeline: pipeline)
end
......@@ -105,7 +105,7 @@ describe 'projects/builds/show', :view do
end
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
expect(rendered).to have_css(
......@@ -113,7 +113,7 @@ describe 'projects/builds/show', :view do
end
end
context 'build will deploy' do
context 'job will deploy' do
let(:build) do
create(:ci_build, :running, environment: 'staging', pipeline: pipeline)
end
......@@ -124,7 +124,7 @@ describe 'projects/builds/show', :view do
end
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
expect(rendered).to have_css(
......@@ -137,7 +137,7 @@ describe 'projects/builds/show', :view do
end
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
expect(rendered).to have_css(
......@@ -150,7 +150,7 @@ describe 'projects/builds/show', :view do
context 'when environment does not exist' 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
expect(rendered).to have_css(
......@@ -161,7 +161,7 @@ describe 'projects/builds/show', :view do
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
create(:ci_build, :failed, environment: 'staging', pipeline: pipeline)
end
......@@ -171,7 +171,7 @@ describe 'projects/builds/show', :view do
end
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
expect(rendered).to have_css(
......@@ -179,7 +179,7 @@ describe 'projects/builds/show', :view do
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
create(:ci_build, :running, environment: 'staging', pipeline: pipeline)
end
......@@ -189,7 +189,7 @@ describe 'projects/builds/show', :view do
end
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
expect(rendered).to have_css(
......@@ -200,7 +200,7 @@ describe 'projects/builds/show', :view do
end
end
context 'when build is running' do
context 'when job is running' do
before do
build.run!
render
......@@ -211,7 +211,7 @@ describe 'projects/builds/show', :view do
end
end
context 'when build is not running' do
context 'when job is not running' do
before do
build.success!
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