Skip to content
Snippets Groups Projects
Commit 1d89871c authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 89861e72
No related branches found
No related tags found
No related merge requests found
Showing
with 117 additions and 21 deletions
Loading
Loading
@@ -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'
Loading
Loading
Loading
Loading
@@ -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);
}
Loading
Loading
@@ -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
Loading
Loading
.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')
- 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
- @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
Loading
Loading
@@ -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 |
 
Loading
Loading
Loading
Loading
@@ -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. |
Loading
Loading
Loading
Loading
@@ -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:**
Loading
Loading
@@ -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:
 
Loading
Loading
Loading
Loading
@@ -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.
 
Loading
Loading
Loading
Loading
@@ -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).
Loading
Loading
@@ -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.
Loading
Loading
Loading
Loading
@@ -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.
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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).
 
Loading
Loading
Loading
Loading
@@ -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
 
Loading
Loading
@@ -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).
 
Loading
Loading
Loading
Loading
@@ -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`.
 
Loading
Loading
@@ -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).
 
Loading
Loading
Loading
Loading
@@ -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
 
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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.
Loading
Loading
@@ -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.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment