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
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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`
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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.
 
Loading
Loading
@@ -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
 
Loading
Loading
Loading
Loading
@@ -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)
Loading
Loading
Loading
Loading
@@ -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 |
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
@@ -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`
Loading
Loading
@@ -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).
 
Loading
Loading
@@ -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`. |
Loading
Loading
@@ -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`
 
Loading
Loading
@@ -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:
 
Loading
Loading
@@ -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`
 
Loading
Loading
@@ -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.
 
Loading
Loading
@@ -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.
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
@@ -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.
Loading
Loading
Loading
Loading
@@ -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 ""
 
Loading
Loading
@@ -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 ""
 
Loading
Loading
@@ -2539,6 +2545,9 @@ msgstr ""
msgid "Browse Files"
msgstr ""
 
msgid "Browse artifacts"
msgstr ""
msgid "Browse files"
msgstr ""
 
Loading
Loading
@@ -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 ""
 
Loading
Loading
@@ -4770,6 +4782,9 @@ msgstr ""
msgid "Delete Snippet"
msgstr ""
 
msgid "Delete artifacts"
msgstr ""
msgid "Delete board"
msgstr ""
 
Loading
Loading
@@ -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 ""
 
Loading
Loading
@@ -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 ""
 
Loading
Loading
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);
});
});
# 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
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