Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.haml-lint_todo.yml2
-rw-r--r--app/assets/javascripts/vue_shared/plugins/global_toast.js3
-rw-r--r--app/views/layouts/nav/sidebar/_project.html.haml8
-rw-r--r--app/views/projects/artifacts/_artifact.html.haml61
-rw-r--r--app/views/projects/artifacts/_table.html.haml16
-rw-r--r--app/views/projects/artifacts/index.html.haml10
-rw-r--r--doc/api/environments.md2
-rw-r--r--doc/ci/README.md2
-rw-r--r--doc/ci/caching/index.md4
-rw-r--r--doc/ci/chatops/README.md2
-rw-r--r--doc/ci/directed_acyclic_graph/index.md2
-rw-r--r--doc/ci/docker/using_docker_build.md2
-rw-r--r--doc/ci/environments.md2
-rw-r--r--doc/ci/examples/README.md2
-rw-r--r--doc/ci/examples/deployment/README.md2
-rw-r--r--doc/ci/examples/deployment/composer-npm-deploy.md4
-rw-r--r--doc/ci/examples/end_to_end_testing_webdriverio/index.md4
-rw-r--r--doc/ci/examples/laravel_with_gitlab_and_envoy/index.md6
-rw-r--r--doc/ci/examples/test-and-deploy-python-application-to-heroku.md2
-rw-r--r--doc/ci/examples/test_phoenix_app_with_gitlab_ci_cd/index.md2
-rw-r--r--doc/ci/interactive_web_terminal/index.md2
-rw-r--r--doc/ci/jenkins/index.md2
-rw-r--r--doc/ci/large_repositories/index.md2
-rw-r--r--doc/ci/quick_start/README.md4
-rw-r--r--doc/ci/ssh_keys/README.md4
-rw-r--r--doc/ci/variables/predefined_variables.md2
-rw-r--r--doc/ci/yaml/README.md28
-rw-r--r--doc/topics/git/migrate_to_git_lfs/index.md2
-rw-r--r--doc/user/group/index.md8
-rw-r--r--locale/gitlab.pot21
-rw-r--r--spec/frontend/vue_shared/plugins/global_toast_spec.js10
-rw-r--r--spec/views/projects/artifacts/_artifact.html.haml_spec.rb74
32 files changed, 244 insertions, 53 deletions
diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml
index d29cb8aa0b0..8f8cbc2072a 100644
--- a/.haml-lint_todo.yml
+++ b/.haml-lint_todo.yml
@@ -208,6 +208,8 @@ linters:
- 'app/views/projects/_md_preview.html.haml'
- 'app/views/projects/_new_project_fields.html.haml'
- 'app/views/projects/_readme.html.haml'
+ - 'app/views/projects/artifacts/_artifact.html.haml'
+ - 'app/views/projects/artifacts/_search_bar.html.haml'
- 'app/views/projects/artifacts/_tree_file.html.haml'
- 'app/views/projects/artifacts/browse.html.haml'
- 'app/views/projects/blame/_age_map_legend.html.haml'
diff --git a/app/assets/javascripts/vue_shared/plugins/global_toast.js b/app/assets/javascripts/vue_shared/plugins/global_toast.js
index c0de1cdc615..7a2e5d80a5d 100644
--- a/app/assets/javascripts/vue_shared/plugins/global_toast.js
+++ b/app/assets/javascripts/vue_shared/plugins/global_toast.js
@@ -2,7 +2,8 @@ import Vue from 'vue';
import { GlToast } from '@gitlab/ui';
Vue.use(GlToast);
+const instance = new Vue();
export default function showGlobalToast(...args) {
- return Vue.toasted.show(...args);
+ return instance.$toast.show(...args);
}
diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml
index 48fea2bbecf..c84bc0b5cd4 100644
--- a/app/views/layouts/nav/sidebar/_project.html.haml
+++ b/app/views/layouts/nav/sidebar/_project.html.haml
@@ -182,11 +182,17 @@
= _('Pipelines')
- if project_nav_tab? :builds
- = nav_link(controller: [:jobs, :artifacts]) do
+ = nav_link(controller: :jobs) do
= link_to project_jobs_path(@project), title: _('Jobs'), class: 'shortcuts-builds' do
%span
= _('Jobs')
+ - if Feature.enabled?(:artifacts_management_page, @project)
+ = nav_link(controller: :artifacts, action: :index) do
+ = link_to project_artifacts_path(@project), title: _('Artifacts'), class: 'shortcuts-builds' do
+ %span
+ = _('Artifacts')
+
- if project_nav_tab? :pipelines
= nav_link(controller: :pipeline_schedules) do
= link_to pipeline_schedules_path(@project), title: _('Schedules'), class: 'shortcuts-builds' do
diff --git a/app/views/projects/artifacts/_artifact.html.haml b/app/views/projects/artifacts/_artifact.html.haml
new file mode 100644
index 00000000000..36e149556e0
--- /dev/null
+++ b/app/views/projects/artifacts/_artifact.html.haml
@@ -0,0 +1,61 @@
+.gl-responsive-table-row.px-md-3
+ .table-section.section-25.section-wrap.commit
+ .table-mobile-header{ role: 'rowheader' }= _('Job')
+ .table-mobile-content
+ .branch-commit.cgray
+ - if can?(current_user, :read_build, @project)
+ = link_to project_job_path(@project, artifact.job) do
+ %span.build-link ##{artifact.job_id}
+ - else
+ %span.build-link ##{artifact.job_id}
+
+ - if artifact.job.ref
+ .icon-container{ "aria-label" => artifact.job.tag? ? _('Tag') : _('Branch') }
+ = artifact.job.tag? ? sprite_icon('tag', css_class: 'sprite') : sprite_icon('branch', css_class: 'sprite')
+ = link_to artifact.job.ref, project_ref_path(@project, artifact.job.ref), class: 'ref-name'
+ - else
+ .light= _('none')
+ .icon-container.commit-icon{ "aria-label" => _('Commit') }
+ = sprite_icon('commit')
+
+ - if artifact.job.sha
+ = link_to artifact.job.short_sha, project_commit_path(@project, artifact.job.sha), class: 'commit-sha mr-0'
+
+ .table-section.section-15.section-wrap
+ .table-mobile-header{ role: 'rowheader' }= _('Name')
+ .table-mobile-content
+ = artifact.job.name
+
+ .table-section.section-20
+ .table-mobile-header{ role: 'rowheader' }= _('Creation date')
+ .table-mobile-content
+ %p.finished-at
+ = icon("calendar")
+ %span= time_ago_with_tooltip(artifact.created_at)
+
+ .table-section.section-20
+ .table-mobile-header{ role: 'rowheader' }= _('Expiration date')
+ .table-mobile-content
+ - if artifact.expire_at
+ %p.finished-at
+ = icon("calendar")
+ %span= time_ago_with_tooltip(artifact.expire_at)
+
+ .table-section.section-10
+ .table-mobile-header{ role: 'rowheader' }= _('Size')
+ .table-mobile-content
+ = number_to_human_size(artifact.size, precision: 2)
+
+ .table-section.table-button-footer.section-10
+ .table-action-buttons
+ .btn-group
+ - if can?(current_user, :read_build, @project)
+ = link_to download_project_job_artifacts_path(@project, artifact.job), rel: 'nofollow', download: '', title: _('Download artifacts'), data: { placement: 'top', container: 'body' }, ref: 'tooltip', aria: { label: _('Download artifacts') }, class: 'btn btn-build has-tooltip ml-0' do
+ = sprite_icon('download')
+
+ = link_to browse_project_job_artifacts_path(@project, artifact.job), rel: 'nofollow', title: _('Browse artifacts'), data: { placement: 'top', container: 'body' }, ref: 'tooltip', aria: { label: _('Browse artifacts') }, class: 'btn btn-build has-tooltip' do
+ = sprite_icon('folder-open')
+
+ - if can?(current_user, :destroy_artifacts, @project)
+ = link_to project_artifact_path(@project, artifact), data: { placement: 'top', container: 'body', confirm: _('Are you sure you want to delete these artifacts?') }, method: :delete, title: _('Delete artifacts'), ref: 'tooltip', aria: { label: _('Delete artifacts') }, class: 'btn btn-remove has-tooltip' do
+ = sprite_icon('remove')
diff --git a/app/views/projects/artifacts/_table.html.haml b/app/views/projects/artifacts/_table.html.haml
new file mode 100644
index 00000000000..1963449d704
--- /dev/null
+++ b/app/views/projects/artifacts/_table.html.haml
@@ -0,0 +1,16 @@
+- if artifacts.blank?
+ .nothing-here-block= _('No jobs to show')
+- else
+ .table-holder
+ .ci-table
+ .gl-responsive-table-row.table-row-header.px-md-3{ role: 'row' }
+ .table-section.section-25{ role: 'rowheader' }= _('Job')
+ .table-section.section-15{ role: 'rowheader' }= _('Name')
+ .table-section.section-20{ role: 'rowheader' }= _('Creation date')
+ .table-section.section-20{ role: 'rowheader' }= _('Expiration date')
+ .table-section.section-10{ role: 'rowheader' }= _('Size')
+ .table-section.section-10{ role: 'rowheader' }
+
+ = render partial: 'artifact', collection: artifacts, as: :artifact
+
+ = paginate artifacts, theme: "gitlab", total_pages: @total_pages
diff --git a/app/views/projects/artifacts/index.html.haml b/app/views/projects/artifacts/index.html.haml
new file mode 100644
index 00000000000..1ab3e8e67d8
--- /dev/null
+++ b/app/views/projects/artifacts/index.html.haml
@@ -0,0 +1,10 @@
+- @no_container = true
+- page_title _('Artifacts')
+
+%div{ class: container_class }
+ .top-area.py-3
+ .align-self-center
+ = _('Total artifacts size: %{total_size}') % { total_size: number_to_human_size(@total_size, precicion: 2) }
+
+ .content-list.builds-content-list
+ = render "table", artifacts: @artifacts, project: @project
diff --git a/doc/api/environments.md b/doc/api/environments.md
index 44f86861ff7..26ee075c921 100644
--- a/doc/api/environments.md
+++ b/doc/api/environments.md
@@ -180,7 +180,7 @@ PUT /projects/:id/environments/:environments_id
| Attribute | Type | Required | Description |
| --------------- | ------- | --------------------------------- | ------------------------------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
-| `environment_id` | integer | yes | The ID of the environment | The ID of the environment |
+| `environment_id` | integer | yes | The ID of the environment |
| `name` | string | no | The new name of the environment |
| `external_url` | string | no | The new external_url |
diff --git a/doc/ci/README.md b/doc/ci/README.md
index cc1c85d1a53..acab433cec2 100644
--- a/doc/ci/README.md
+++ b/doc/ci/README.md
@@ -113,7 +113,7 @@ Its feature set is listed on the table below according to DevOps stages.
| [Browser Performance Testing](../user/project/merge_requests/browser_performance_testing.md) | Quickly determine the performance impact of pending code changes. |
| [CI services](services/README.md) | Link Docker containers with your base image.|
| [Code Quality](../user/project/merge_requests/code_quality.md) **(STARTER)** | Analyze your source code quality. |
-| [GitLab CI/CD for external repositories](ci_cd_for_external_repos/index.md) **(PREMIUM)** | Get the benefits of GitLab CI/CD combined with repositories in GitHub and BitBucket Cloud. |
+| [GitLab CI/CD for external repositories](ci_cd_for_external_repos/index.md) **(PREMIUM)** | Get the benefits of GitLab CI/CD combined with repositories in GitHub and Bitbucket Cloud. |
| [Interactive Web Terminals](interactive_web_terminal/index.md) **(CORE ONLY)** | Open an interactive web terminal to debug the running jobs. |
| [JUnit tests](junit_test_reports.md) | Identify script failures directly on merge requests. |
| [Using Docker images](docker/using_docker_images.md) | Use GitLab and GitLab Runner with Docker to build and test applications. |
diff --git a/doc/ci/caching/index.md b/doc/ci/caching/index.md
index 558229187f1..76ee4829a3d 100644
--- a/doc/ci/caching/index.md
+++ b/doc/ci/caching/index.md
@@ -202,7 +202,7 @@ For more fine tuning, read also about the
The most common use case of cache is to preserve contents between subsequent
runs of jobs for things like dependencies and commonly used libraries
-(Nodejs packages, PHP packages, rubygems, python libraries, etc.),
+(Nodejs packages, PHP packages, rubygems, Python libraries, etc.),
so they don't have to be re-fetched from the public internet.
NOTE: **Note:**
@@ -268,7 +268,7 @@ test:
### Caching Python dependencies
Assuming your project is using [pip](https://pip.pypa.io/en/stable/) to install
-the python dependencies, the following example defines `cache` globally so that
+the Python dependencies, the following example defines `cache` globally so that
all jobs inherit it. Python libraries are installed in a virtualenv under `venv/`,
pip's cache is defined under `.cache/pip/` and both are cached per-branch:
diff --git a/doc/ci/chatops/README.md b/doc/ci/chatops/README.md
index 40357608da4..234e7f4ed80 100644
--- a/doc/ci/chatops/README.md
+++ b/doc/ci/chatops/README.md
@@ -19,7 +19,7 @@ GitLab ChatOps is built upon two existing features:
- [GitLab CI/CD](../README.md).
- [Slack Slash Commands](../../user/project/integrations/slack_slash_commands.md).
-A new `run` action has been added to the [slash commands](../../integration/slash_commands.md), which takes two arguments: a `<job name>` to execute and the `<job arguments>`. When executed, ChatOps will look up the specified job name and attempt to match it to a corresponding job in [.gitlab-ci.yml](../yaml/README.md). If a matching job is found on `master`, a pipeline containing just that job is scheduled. Two additional [CI/CD variables](../variables/README.md#predefined-environment-variables) are passed to the job: `CHAT_INPUT` contains any additional arguments, and `CHAT_CHANNEL` is set to the name of channel the action was triggered in.
+A new `run` action has been added to the [slash commands](../../integration/slash_commands.md), which takes two arguments: a `<job name>` to execute and the `<job arguments>`. When executed, ChatOps will look up the specified job name and attempt to match it to a corresponding job in [`.gitlab-ci.yml`](../yaml/README.md). If a matching job is found on `master`, a pipeline containing just that job is scheduled. Two additional [CI/CD variables](../variables/README.md#predefined-environment-variables) are passed to the job: `CHAT_INPUT` contains any additional arguments, and `CHAT_CHANNEL` is set to the name of channel the action was triggered in.
After the job has finished, its output is sent back to Slack provided it has completed within 30 minutes. If a job takes more than 30 minutes to run it must use the Slack API to manually send data back to a channel.
diff --git a/doc/ci/directed_acyclic_graph/index.md b/doc/ci/directed_acyclic_graph/index.md
index 23604e8f898..a438d22d519 100644
--- a/doc/ci/directed_acyclic_graph/index.md
+++ b/doc/ci/directed_acyclic_graph/index.md
@@ -73,4 +73,4 @@ A directed acyclic graph is a complicated feature, and as of the initial MVC the
are certain use cases that you may need to work around. For more information:
- [`needs` requirements and limitations](../yaml/README.md#requirements-and-limitations).
-- Related epic [gitlab-org#1716](https://gitlab.com/groups/gitlab-org/-/epics/1716).
+- Related epic [#1716](https://gitlab.com/groups/gitlab-org/-/epics/1716).
diff --git a/doc/ci/docker/using_docker_build.md b/doc/ci/docker/using_docker_build.md
index a60ede2c8f8..c87e259aafd 100644
--- a/doc/ci/docker/using_docker_build.md
+++ b/doc/ci/docker/using_docker_build.md
@@ -526,7 +526,7 @@ Some things you should be aware of:
longer, but means you don’t get stuck without security patches to base images.
- Doing an explicit `docker pull` before each `docker run` fetches
the latest image that was just built. This is especially important if you are
- using multiple runners that cache images locally. Using the git SHA in your
+ using multiple runners that cache images locally. Using the Git SHA in your
image tag makes this less necessary since each job will be unique and you
shouldn't ever have a stale image. However, it's still possible to have a
stale image if you re-build a given commit after a dependency has changed.
diff --git a/doc/ci/environments.md b/doc/ci/environments.md
index d3a8689551a..dd13d368571 100644
--- a/doc/ci/environments.md
+++ b/doc/ci/environments.md
@@ -679,7 +679,7 @@ fetch = +refs/environments/*:refs/remotes/origin/environments/*
### Scoping environments with specs
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/2112) in [GitLab Premium](https://about.gitlab.com/pricing/) 9.4.
-> - [Scoping for environment variables was moved to Core](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/30779) to Core in Gitlab 12.2.
+> - [Scoping for environment variables was moved to Core](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/30779) to Core in GitLab 12.2.
You can limit the environment scope of a variable by
defining which environments it can be available for.
diff --git a/doc/ci/examples/README.md b/doc/ci/examples/README.md
index 73f7a555b9c..da55e4e1f47 100644
--- a/doc/ci/examples/README.md
+++ b/doc/ci/examples/README.md
@@ -13,7 +13,7 @@ Examples are available in several forms. As a collection of:
- `.gitlab-ci.yml` [template files](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/lib/gitlab/ci/templates) maintained in GitLab. When you create a new file via the UI,
GitLab will give you the option to choose one of these templates. This will allow you to quickly bootstrap your project for CI/CD.
If your favorite programming language or framework are missing, we would love your help by sending a merge request with a new `.gitlab-ci.yml` to this project.
-- Repositories with [example projects](https://gitlab.com/gitlab-examples) for various languages. You can fork and adjust them to your own needs. Projects include demonstrations of [multi-project pipelines](https://gitlab.com/gitlab-examples/multi-project-pipelines) and using [Review Apps with a static site served by nginx](https://gitlab.com/gitlab-examples/review-apps-nginx/).
+- Repositories with [example projects](https://gitlab.com/gitlab-examples) for various languages. You can fork and adjust them to your own needs. Projects include demonstrations of [multi-project pipelines](https://gitlab.com/gitlab-examples/multi-project-pipelines) and using [Review Apps with a static site served by NGINX](https://gitlab.com/gitlab-examples/review-apps-nginx/).
- Examples and [other resources](#other-resources) listed below.
## CI/CD examples
diff --git a/doc/ci/examples/deployment/README.md b/doc/ci/examples/deployment/README.md
index 26b10c7eeaf..afe02e0a7d8 100644
--- a/doc/ci/examples/deployment/README.md
+++ b/doc/ci/examples/deployment/README.md
@@ -46,7 +46,7 @@ staging:
- dpl --provider=heroku --app=my-app-staging --api-key=$HEROKU_STAGING_API_KEY
```
-In the above example we use Dpl to deploy `my-app-staging` to Heroku server with api-key stored in `HEROKU_STAGING_API_KEY` secure variable.
+In the above example we use Dpl to deploy `my-app-staging` to Heroku server with API key stored in `HEROKU_STAGING_API_KEY` secure variable.
To use different provider take a look at long list of [Supported Providers](https://github.com/travis-ci/dpl#supported-providers).
diff --git a/doc/ci/examples/deployment/composer-npm-deploy.md b/doc/ci/examples/deployment/composer-npm-deploy.md
index 79b3cbd0c69..c9c78c9a4e4 100644
--- a/doc/ci/examples/deployment/composer-npm-deploy.md
+++ b/doc/ci/examples/deployment/composer-npm-deploy.md
@@ -46,7 +46,7 @@ All these operations will put all files into a `build` folder, which is ready to
You have multiple options: rsync, scp, sftp and so on. For now, we will use scp.
-To make this work, you need to add a GitLab CI/CD Variable (accessible on _gitlab.example/your-project-name/variables_). That variable will be called `STAGING_PRIVATE_KEY` and it's the **private** ssh key of your server.
+To make this work, you need to add a GitLab CI/CD Variable (accessible on `gitlab.example/your-project-name/variables`). That variable will be called `STAGING_PRIVATE_KEY` and it's the **private** SSH key of your server.
### Security tip
@@ -98,7 +98,7 @@ Here's the breakdown:
1. We will connect via `ssh` and create a new `_tmp` folder
1. We will connect via `scp` and upload the `build` folder (which was generated by a `npm` script) to our previously created `_tmp` folder
1. We will connect again via `ssh` and move the `live` folder to an `_old` folder, then move `_tmp` to `live`.
-1. We connect to ssh and remove the `_old` folder
+1. We connect to SSH and remove the `_old` folder
What's the deal with the artifacts? We just tell GitLab CI to keep the `build` directory (later on, you can download that as needed).
diff --git a/doc/ci/examples/end_to_end_testing_webdriverio/index.md b/doc/ci/examples/end_to_end_testing_webdriverio/index.md
index 38d0d86ffa2..a8ce3010655 100644
--- a/doc/ci/examples/end_to_end_testing_webdriverio/index.md
+++ b/doc/ci/examples/end_to_end_testing_webdriverio/index.md
@@ -28,7 +28,7 @@ layers of your application, from the frontend to the database.
In this article, we will discuss how
to write such end-to-end tests, and how to set up GitLab CI/CD to automatically run these tests
against your new code, on a branch-by-branch basis. For the scope of this article, we will walk you
-through the process of setting up GitLab CI/CD for end-to-end testing Javascript-based applications
+through the process of setting up GitLab CI/CD for end-to-end testing JavaScript-based applications
with WebdriverIO, but the general strategy should carry over to other languages.
We assume you are familiar with GitLab, [GitLab CI/CD](../../README.md), [Review Apps](../../review_apps/index.md), and running your app locally, e.g., on `localhost:8000`.
@@ -47,7 +47,7 @@ infrastructure is up and running, and that your units of code work well together
[Selenium](http://www.seleniumhq.org/) is a piece of software that can control web browsers, e.g., to make them
visit a specific URL or interact with elements on the page. It can be programmatically controlled
from a variety of programming languages. In this article we're going to be using the
-[WebdriverIO](http://webdriver.io/) Javascript bindings, but the general concept should carry over
+[WebdriverIO](http://webdriver.io/) JavaScript bindings, but the general concept should carry over
pretty well to
[other programming languages supported by Selenium](http://docs.seleniumhq.org/about/platforms.jsp#programming-languages).
diff --git a/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md b/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
index d79821ff258..ae17e9bf549 100644
--- a/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
+++ b/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
@@ -82,7 +82,7 @@ git push -u origin master
## Configure the production server
Before we begin setting up Envoy and GitLab CI/CD, let's quickly make sure the production server is ready for deployment.
-We have installed LEMP stack which stands for Linux, Nginx, MySQL and PHP on our Ubuntu 16.04.
+We have installed LEMP stack which stands for Linux, NGINX, MySQL and PHP on our Ubuntu 16.04.
### Create a new user
@@ -151,11 +151,11 @@ git clone git@gitlab.example.com:<USERNAME>/laravel-sample.git
Answer **yes** if asked `Are you sure you want to continue connecting (yes/no)?`.
It adds GitLab.com to the known hosts.
-### Configuring Nginx
+### Configuring NGINX
Now, let's make sure our web server configuration points to the `current/public` rather than `public`.
-Open the default Nginx server block configuration file by typing:
+Open the default NGINX server block configuration file by typing:
```bash
sudo nano /etc/nginx/sites-available/default
diff --git a/doc/ci/examples/test-and-deploy-python-application-to-heroku.md b/doc/ci/examples/test-and-deploy-python-application-to-heroku.md
index f9d185f187c..56941730d0a 100644
--- a/doc/ci/examples/test-and-deploy-python-application-to-heroku.md
+++ b/doc/ci/examples/test-and-deploy-python-application-to-heroku.md
@@ -86,6 +86,6 @@ gitlab-runner register \
--docker-postgres latest
```
-With the command above, you create a runner that uses the [python:3.5](https://hub.docker.com/r/_/python/) image and uses a [postgres](https://hub.docker.com/r/_/postgres/) database.
+With the command above, you create a runner that uses the [`python:3.5`](https://hub.docker.com/r/_/python/) image and uses a [PostgreSQL](https://hub.docker.com/r/_/postgres/) database.
To access the PostgreSQL database, connect to `host: postgres` as user `postgres` with no password.
diff --git a/doc/ci/examples/test_phoenix_app_with_gitlab_ci_cd/index.md b/doc/ci/examples/test_phoenix_app_with_gitlab_ci_cd/index.md
index 0e595e1a0be..ded5dcbf5a2 100644
--- a/doc/ci/examples/test_phoenix_app_with_gitlab_ci_cd/index.md
+++ b/doc/ci/examples/test_phoenix_app_with_gitlab_ci_cd/index.md
@@ -205,7 +205,7 @@ when running our Phoenix in our `localhost`.
As our project is still fresh, we don't have any data on our database, so, the `migrations`
directory will be empty.
- Without `.gitkeep`, git will not upload this empty directory and we'll got an error when running our
+ Without `.gitkeep`, Git will not upload this empty directory and we'll got an error when running our
test on GitLab.
> **Note:** If we add a folder via the GitLab UI, GitLab itself will add the `.gitkeep` to that new dir.
diff --git a/doc/ci/interactive_web_terminal/index.md b/doc/ci/interactive_web_terminal/index.md
index c1d4f784ddd..361e526ed96 100644
--- a/doc/ci/interactive_web_terminal/index.md
+++ b/doc/ci/interactive_web_terminal/index.md
@@ -30,7 +30,7 @@ Two things need to be configured for the interactive web terminal to work:
NOTE: **Note:**
Interactive web terminals are not yet supported by
-[`gitlab-runner` helm chart](https://docs.gitlab.com/charts/charts/gitlab/gitlab-runner/index.html),
+[`gitlab-runner` Helm chart](https://docs.gitlab.com/charts/charts/gitlab/gitlab-runner/index.html),
but support [is planned](https://gitlab.com/gitlab-org/charts/gitlab-runner/issues/79).
## Debugging a running job
diff --git a/doc/ci/jenkins/index.md b/doc/ci/jenkins/index.md
index 2c3bdcf30d6..321d0d2778f 100644
--- a/doc/ci/jenkins/index.md
+++ b/doc/ci/jenkins/index.md
@@ -202,7 +202,7 @@ can provide any variables they like.
#### `triggers` / `cron`
-Because GitLab is integrated tightly with git, SCM polling options for triggers are not needed. We support an easy to use
+Because GitLab is integrated tightly with Git, SCM polling options for triggers are not needed. We support an easy to use
[syntax for scheduling pipelines](../../user/project/pipelines/schedules.md).
#### `tools`
diff --git a/doc/ci/large_repositories/index.md b/doc/ci/large_repositories/index.md
index b1359537fca..ce998502b69 100644
--- a/doc/ci/large_repositories/index.md
+++ b/doc/ci/large_repositories/index.md
@@ -111,7 +111,7 @@ machines, and have an existing worktree that you can re-use for builds.
For exact parameters accepted by
[`GIT_CLEAN_FLAGS`](../yaml/README.md#git-clean-flags), see the documentation
-for [git clean](https://git-scm.com/docs/git-clean). The available parameters
+for [`git clean`](https://git-scm.com/docs/git-clean). The available parameters
are dependent on Git version.
## Fork-based workflow
diff --git a/doc/ci/quick_start/README.md b/doc/ci/quick_start/README.md
index 0822b01d553..f12597abf43 100644
--- a/doc/ci/quick_start/README.md
+++ b/doc/ci/quick_start/README.md
@@ -22,7 +22,7 @@ GitLab offers a [continuous integration][ci] service. If you
and configure your GitLab project to use a [Runner], then each commit or
push triggers your CI [pipeline].
-The `.gitlab-ci.yml` file tells the GitLab runner what to do. By default it runs
+The `.gitlab-ci.yml` file tells the GitLab Runner what to do. By default it runs
a pipeline with three [stages]: `build`, `test`, and `deploy`. You don't need to
use all three stages; stages with no jobs are simply ignored.
@@ -126,7 +126,7 @@ a "CI Lint" button to go to this page under **CI/CD ➔ Pipelines** and
**Pipelines ➔ Jobs** in your project.
For more information and a complete `.gitlab-ci.yml` syntax, please read
-[the reference documentation on .gitlab-ci.yml](../yaml/README.md).
+[the reference documentation on `.gitlab-ci.yml`](../yaml/README.md).
### Push `.gitlab-ci.yml` to GitLab
diff --git a/doc/ci/ssh_keys/README.md b/doc/ci/ssh_keys/README.md
index b6aebd3bd78..5f0f74cd998 100644
--- a/doc/ci/ssh_keys/README.md
+++ b/doc/ci/ssh_keys/README.md
@@ -25,10 +25,10 @@ with any type of [executor](https://docs.gitlab.com/runner/executors/)
## How it works
-1. Create a new SSH key pair locally with [ssh-keygen](http://linux.die.net/man/1/ssh-keygen)
+1. Create a new SSH key pair locally with [`ssh-keygen`](http://linux.die.net/man/1/ssh-keygen)
1. Add the private key as a [variable](../variables/README.md) to
your project
-1. Run the [ssh-agent](http://linux.die.net/man/1/ssh-agent) during job to load
+1. Run the [`ssh-agent`](http://linux.die.net/man/1/ssh-agent) during job to load
the private key.
1. Copy the public key to the servers you want to have access to (usually in
`~/.ssh/authorized_keys`) or add it as a [deploy key](../../ssh/README.md#deploy-keys)
diff --git a/doc/ci/variables/predefined_variables.md b/doc/ci/variables/predefined_variables.md
index e3ff3385f97..300a0925490 100644
--- a/doc/ci/variables/predefined_variables.md
+++ b/doc/ci/variables/predefined_variables.md
@@ -108,7 +108,7 @@ future GitLab releases.**
| `CI_RUNNER_VERSION` | all | 10.6 | GitLab Runner version that is executing the current job |
| `CI_RUNNER_SHORT_TOKEN` | all | 12.3 | First eight characters of GitLab Runner's token used to authenticate new job requests. Used as Runner's unique ID |
| `CI_SERVER` | all | all | Mark that job is executed in CI environment |
-| `CI_SERVER_HOST` | 12.1 | all | Host component of the GitLab instance URL, without protocol and port (like gitlab.example.com) |
+| `CI_SERVER_HOST` | 12.1 | all | Host component of the GitLab instance URL, without protocol and port (like `gitlab.example.com`) |
| `CI_SERVER_NAME` | all | all | The name of CI server that is used to coordinate jobs |
| `CI_SERVER_REVISION` | all | all | GitLab revision that is used to schedule jobs |
| `CI_SERVER_VERSION` | all | all | GitLab version that is used to schedule jobs |
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 4d0bdf40b28..d74f80b3b33 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -56,7 +56,7 @@ Jobs are picked up by [Runners](../runners/README.md) and executed within the
environment of the Runner. What is important, is that each job is run
independently from each other.
-### Validate the .gitlab-ci.yml
+### Validate the `.gitlab-ci.yml`
Each instance of GitLab CI has an embedded debug tool called Lint, which validates the
content of your `.gitlab-ci.yml` files. You can find the Lint under the page `ci/lint` of your
@@ -187,7 +187,7 @@ Used to specify [a Docker image](../docker/using_docker_images.md#what-is-an-ima
For:
-- Simple definition examples, see [Define `image` and `services` from .gitlab-ci.yml](../docker/using_docker_images.md#define-image-and-services-from-gitlab-ciyml).
+- Simple definition examples, see [Define `image` and `services` from `.gitlab-ci.yml`](../docker/using_docker_images.md#define-image-and-services-from-gitlab-ciyml).
- Detailed usage information, refer to [Docker integration](../docker/README.md) documentation.
#### `image:name`
@@ -208,7 +208,7 @@ Used to specify a [service Docker image](../docker/using_docker_images.md#what-i
For:
-- Simple definition examples, see [Define `image` and `services` from .gitlab-ci.yml](../docker/using_docker_images.md#define-image-and-services-from-gitlab-ciyml).
+- Simple definition examples, see [Define `image` and `services` from `.gitlab-ci.yml`](../docker/using_docker_images.md#define-image-and-services-from-gitlab-ciyml).
- Detailed usage information, refer to [Docker integration](../docker/README.md) documentation.
- For example services, see [GitLab CI Services](../services/README.md).
@@ -379,8 +379,8 @@ In addition, `only` and `except` allow the use of special keywords:
| **Value** | **Description** |
| --------- | ---------------- |
-| `branches` | When a git reference of a pipeline is a branch. |
-| `tags` | When a git reference of a pipeline is a tag. |
+| `branches` | When a Git reference of a pipeline is a branch. |
+| `tags` | When a Git reference of a pipeline is a tag. |
| `api` | When pipeline has been triggered by a second pipelines API (not triggers API). |
| `external` | When using CI services other than GitLab. |
| `pipelines` | For multi-project triggers, created using the API with `CI_JOB_TOKEN`. |
@@ -530,15 +530,15 @@ single conjoined expression. That is:
With `only`, individual keys are logically joined by an AND:
-> (any of refs) AND (any of variables) AND (any of changes) AND (if kubernetes is active)
+> (any of refs) AND (any of variables) AND (any of changes) AND (if Kubernetes is active)
`except` is implemented as a negation of this complete expression:
-> NOT((any of refs) AND (any of variables) AND (any of changes) AND (if kubernetes is active))
+> NOT((any of refs) AND (any of variables) AND (any of changes) AND (if Kubernetes is active))
This, more intuitively, means the keys join by an OR. A functionally equivalent expression:
-> (any of refs) OR (any of variables) OR (any of changes) OR (if kubernetes is active)
+> (any of refs) OR (any of variables) OR (any of changes) OR (if Kubernetes is active)
#### `only:refs`/`except:refs`
@@ -612,7 +612,7 @@ Learn more about [variables expressions](../variables/README.md#environment-vari
> `changes` policy [introduced][ce-19232] in GitLab 11.4.
Using the `changes` keyword with `only` or `except` makes it possible to define if
-a job should be created based on files modified by a git push event.
+a job should be created based on files modified by a Git push event.
For example:
@@ -1047,7 +1047,7 @@ You can stop the active timer of a delayed job by clicking the **Unschedule** bu
This job will never be executed in the future unless you execute the job manually.
You can start a delayed job immediately by clicking the **Play** button.
-GitLab runner will pick your job soon and start the job.
+GitLab Runner will pick your job soon and start the job.
### `environment`
@@ -1894,12 +1894,12 @@ This example creates three paths of execution:
- 50 if the `ci_dag_limit_needs` feature flag is disabled.
- It is impossible for now to have `needs: []` (empty needs),
the job always needs to depend on something, unless this is the job
- in the first stage (see [gitlab-foss#65504](https://gitlab.com/gitlab-org/gitlab-foss/issues/65504)).
+ in the first stage (see [issue #65504](https://gitlab.com/gitlab-org/gitlab-foss/issues/65504)).
- If `needs:` refers to a job that is marked as `parallel:`.
the current job will depend on all parallel jobs created.
- `needs:` is similar to `dependencies:` in that it needs to use jobs from
prior stages, meaning it is impossible to create circular
- dependencies or depend on jobs in the current stage (see [gitlab-foss#65505](https://gitlab.com/gitlab-org/gitlab-foss/issues/65505)).
+ dependencies or depend on jobs in the current stage (see [issue #65505](https://gitlab.com/gitlab-org/gitlab-foss/issues/65505)).
- Related to the above, stages must be explicitly defined for all jobs
that have the keyword `needs:` or are referred to by one.
@@ -2831,7 +2831,7 @@ The `GIT_CLEAN_FLAGS` variable is used to control the default behavior of
`git clean` after checking out the sources. You can set it globally or per-job in the
[`variables`](#variables) section.
-`GIT_CLEAN_FLAGS` accepts all possible options of the [git clean](https://git-scm.com/docs/git-clean)
+`GIT_CLEAN_FLAGS` accepts all possible options of the [`git clean`](https://git-scm.com/docs/git-clean)
command.
`git clean` is disabled if `GIT_CHECKOUT: "false"` is specified.
@@ -2946,7 +2946,7 @@ default:
## Custom build directories
-> [Introduced](https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/1267) in Gitlab Runner 11.10
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/1267) in GitLab Runner 11.10
NOTE: **Note:**
This can only be used when `custom_build_dir` is enabled in the [Runner's
diff --git a/doc/topics/git/migrate_to_git_lfs/index.md b/doc/topics/git/migrate_to_git_lfs/index.md
index c879e404997..6152b5a2e94 100644
--- a/doc/topics/git/migrate_to_git_lfs/index.md
+++ b/doc/topics/git/migrate_to_git_lfs/index.md
@@ -133,7 +133,7 @@ Consider an example upstream project, `git@gitlab.com:gitlab-tests/test-git-lfs-
# You may need to reset your local copy with upstream's `master` after force-pushing from the mirror:
git reset --hard origin/master
# Track the files with LFS:
- git lfs track "*.gif" "*.png" "*.jpg" "*.psd" "*.mp4" ".gitattributes" "img/"
+ git lfs track "*.gif" "*.png" "*.jpg" "*.psd" "*.mp4" "img/"
```
Now all existing the files you converted, as well as the new
diff --git a/doc/user/group/index.md b/doc/user/group/index.md
index 036730ba700..bef0505027c 100644
--- a/doc/user/group/index.md
+++ b/doc/user/group/index.md
@@ -334,10 +334,10 @@ This will disable the option for all users who previously had permissions to
operate project memberships, so no new users can be added. Furthermore, any
request to add a new user to a project through API will not be possible.
-#### IP access restriction **(ULTIMATE ONLY)**
+#### IP access restriction **(ULTIMATE)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/1985) in
-[GitLab Ultimate](https://about.gitlab.com/pricing/) 12.0.
+[GitLab Ultimate and Gold](https://about.gitlab.com/pricing/) 12.0.
To make sure only people from within your organization can access particular
resources, you have the option to restrict access to groups and their
@@ -353,10 +353,10 @@ Restriction currently applies to UI and API access, Git actions via ssh are not
To avoid accidental lock-out, admins and group owners are are able to access
the group regardless of the IP restriction.
-#### Allowed domain restriction **(PREMIUM ONLY)**
+#### Allowed domain restriction **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/7297) in
-[GitLab Premium](https://about.gitlab.com/pricing/) 12.2.
+[GitLab Premium and Silver](https://about.gitlab.com/pricing/) 12.2.
You can restrict access to groups and their underlying projects by
allowing only users with email addresses in particular domains to be added to the group.
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index c9e40aca796..f41f0dad321 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -1782,6 +1782,9 @@ msgstr ""
msgid "Are you sure you want to cancel editing this comment?"
msgstr ""
+msgid "Are you sure you want to delete these artifacts?"
+msgstr ""
+
msgid "Are you sure you want to delete this %{typeOfComment}?"
msgstr ""
@@ -2377,6 +2380,9 @@ msgstr ""
msgid "Boards|View scope"
msgstr ""
+msgid "Branch"
+msgstr ""
+
msgid "Branch %{branchName} was not found in this project's repository."
msgstr ""
@@ -2539,6 +2545,9 @@ msgstr ""
msgid "Browse Files"
msgstr ""
+msgid "Browse artifacts"
+msgstr ""
+
msgid "Browse files"
msgstr ""
@@ -4487,6 +4496,9 @@ msgstr ""
msgid "Creating graphs uses the data from the Prometheus server. If this takes a long time, ensure that data is available."
msgstr ""
+msgid "Creation date"
+msgstr ""
+
msgid "Cron Timezone"
msgstr ""
@@ -4770,6 +4782,9 @@ msgstr ""
msgid "Delete Snippet"
msgstr ""
+msgid "Delete artifacts"
+msgstr ""
+
msgid "Delete board"
msgstr ""
@@ -10325,6 +10340,9 @@ msgstr ""
msgid "No job trace"
msgstr ""
+msgid "No jobs to show"
+msgstr ""
+
msgid "No labels with such name or description"
msgstr ""
@@ -16437,6 +16455,9 @@ msgstr ""
msgid "Total Time"
msgstr ""
+msgid "Total artifacts size: %{total_size}"
+msgstr ""
+
msgid "Total test time for all commits/merges"
msgstr ""
diff --git a/spec/frontend/vue_shared/plugins/global_toast_spec.js b/spec/frontend/vue_shared/plugins/global_toast_spec.js
index 551abe3cb41..89f43a5e556 100644
--- a/spec/frontend/vue_shared/plugins/global_toast_spec.js
+++ b/spec/frontend/vue_shared/plugins/global_toast_spec.js
@@ -1,24 +1,24 @@
-import toast from '~/vue_shared/plugins/global_toast';
import Vue from 'vue';
+import toast from '~/vue_shared/plugins/global_toast';
describe('Global toast', () => {
let spyFunc;
beforeEach(() => {
- spyFunc = jest.spyOn(Vue.toasted, 'show').mockImplementation(() => {});
+ spyFunc = jest.spyOn(Vue.prototype.$toast, 'show').mockImplementation(() => {});
});
afterEach(() => {
spyFunc.mockRestore();
});
- it('should pass all args to Vue toasted', () => {
+ it("should call GitLab UI's toast method", () => {
const arg1 = 'TestMessage';
const arg2 = { className: 'foo' };
toast(arg1, arg2);
- expect(Vue.toasted.show).toHaveBeenCalledTimes(1);
- expect(Vue.toasted.show).toHaveBeenCalledWith(arg1, arg2);
+ expect(Vue.prototype.$toast.show).toHaveBeenCalledTimes(1);
+ expect(Vue.prototype.$toast.show).toHaveBeenCalledWith(arg1, arg2);
});
});
diff --git a/spec/views/projects/artifacts/_artifact.html.haml_spec.rb b/spec/views/projects/artifacts/_artifact.html.haml_spec.rb
new file mode 100644
index 00000000000..460b63efa2f
--- /dev/null
+++ b/spec/views/projects/artifacts/_artifact.html.haml_spec.rb
@@ -0,0 +1,74 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe "projects/artifacts/_artifact.html.haml" do
+ let(:project) { create(:project) }
+
+ describe 'delete button' do
+ before do
+ create(:ci_build, :artifacts, project: project)
+
+ allow(view).to receive(:current_user).and_return(user)
+ assign(:project, project)
+ end
+
+ context 'with admin' do
+ let(:user) { build(:admin) }
+
+ it 'has a delete button' do
+ render_partial
+
+ expect(rendered).to have_link('Delete artifacts', href: project_artifact_path(project, project.job_artifacts.first))
+ end
+ end
+
+ context 'with owner' do
+ let(:user) { create(:user) }
+ let(:project) { build(:project, namespace: user.namespace) }
+
+ it 'has a delete button' do
+ render_partial
+
+ expect(rendered).to have_link('Delete artifacts', href: project_artifact_path(project, project.job_artifacts.first))
+ end
+ end
+
+ context 'with master' do
+ let(:user) { create(:user) }
+
+ it 'has a delete button' do
+ allow_any_instance_of(ProjectTeam).to receive(:max_member_access).and_return(Gitlab::Access::MASTER)
+ render_partial
+
+ expect(rendered).to have_link('Delete artifacts', href: project_artifact_path(project, project.job_artifacts.first))
+ end
+ end
+
+ context 'with developer' do
+ let(:user) { build(:user) }
+
+ it 'has no delete button' do
+ project.add_developer(user)
+ render_partial
+
+ expect(rendered).not_to have_link('Delete artifacts')
+ end
+ end
+
+ context 'with reporter' do
+ let(:user) { build(:user) }
+
+ it 'has no delete button' do
+ project.add_reporter(user)
+ render_partial
+
+ expect(rendered).not_to have_link('Delete artifacts')
+ end
+ end
+ end
+
+ def render_partial
+ render partial: 'projects/artifacts/artifact', collection: project.job_artifacts, as: :artifact
+ end
+end