提交 82f5f248 编写于 作者: G GitLab Bot

Add latest changes from gitlab-org/gitlab@master

上级 6f2dc439
......@@ -36,7 +36,7 @@ After your merge request has been approved according to our [approval guidelines
## Documentation and final details
- [ ] Ensure the [Links section](#links) is completed.
- [ ] Find out the [versions affected](https://gitlab.com/gitlab-org/release/docs/-/blob/master/general/security/developer.md#versions-affected) and add them to the [details section](#details)
- [ ] Add the GitLab [versions](https://gitlab.com/gitlab-org/release/docs/-/blob/master/general/security/developer.md#versions-affected) and editions affected to the [details section](#details)
* The Git history of the files affected may help you associate the issue with a [release](https://about.gitlab.com/releases/)
- [ ] Fill in any upgrade notes that users may need to take into account in the [details section](#details)
- [ ] Add Yes/No and further details if needed to the migration and settings columns in the [details section](#details)
......@@ -57,6 +57,7 @@ After your merge request has been approved according to our [approval guidelines
| Description | Details | Further details|
| -------- | -------- | -------- |
| Versions affected | X.Y | |
| GitLab EE only | Yes/No | |
| Upgrade notes | | |
| GitLab Settings updated | Yes/No| |
| Migration required | Yes/No | |
......
......@@ -28,12 +28,12 @@ export default {
<div class="file-header-content d-flex align-items-center lh-100">
<slot name="filepathPrepend"></slot>
<file-icon :file-name="blob.path" :size="18" aria-hidden="true" css-classes="mr-2" />
<strong
v-if="blob.name"
class="file-title-name qa-file-title-name mr-1 js-blob-header-filepath"
>{{ blob.name }}</strong
>
<template v-if="blob.path">
<file-icon :file-name="blob.path" :size="18" aria-hidden="true" css-classes="mr-2" />
<strong class="file-title-name qa-file-title-name mr-1 js-blob-header-filepath">{{
blob.path
}}</strong>
</template>
<small class="mr-2">{{ blobSize }}</small>
......
......@@ -33,8 +33,7 @@ module Ci
file_type: params['artifact_type'],
file_format: params['artifact_format'],
file_sha256: artifacts_file.sha256,
expire_in: expire_in,
locked: true)
expire_in: expire_in)
artifact_metadata = if metadata_file
Ci::JobArtifact.new(
......@@ -44,10 +43,14 @@ module Ci
file_type: :metadata,
file_format: :gzip,
file_sha256: metadata_file.sha256,
expire_in: expire_in,
locked: true)
expire_in: expire_in)
end
if Feature.enabled?(:keep_latest_artifact_for_ref, job.project)
artifact.locked = true
artifact_metadata&.locked = true
end
[artifact, artifact_metadata]
end
......@@ -85,6 +88,8 @@ module Ci
end
def unlock_previous_artifacts!(artifact)
return unless Feature.enabled?(:keep_latest_artifact_for_ref, artifact.job.project)
Ci::JobArtifact.for_ref(artifact.job.ref, artifact.project_id).locked.update_all(locked: false)
end
......
......@@ -28,7 +28,13 @@ module Ci
private
def destroy_batch
artifacts = Ci::JobArtifact.expired(BATCH_SIZE).unlocked.to_a
artifact_batch = if Feature.enabled?(:keep_latest_artifact_for_ref)
Ci::JobArtifact.expired(BATCH_SIZE).unlocked
else
Ci::JobArtifact.expired(BATCH_SIZE)
end
artifacts = artifact_batch.to_a
return false if artifacts.empty?
......
---
title: Updated snippet view to show path instead of name for a blob
merge_request: 30550
author:
type: changed
......@@ -2,7 +2,7 @@
disqus_identifier: 'https://docs.gitlab.com/ee/workflow/lfs/lfs_administration.html'
---
# GitLab Git LFS Administration
# GitLab Git Large File Storage (LFS) Administration
Documentation on how to use Git LFS are under [Managing large binary files with Git LFS doc](../../topics/git/lfs/index.md).
......
......@@ -224,5 +224,5 @@ Complementary reads:
## Other GitLab Development Kit (GDK) guides
- [Run full Auto DevOps cycle in a GDK instance](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/auto_devops.md)
- [Using GitLab Runner with GDK](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/runner.md)
- [Using the Web IDE terminal with GDK](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/howto/web_ide_terminal_gdk_setup.md)
- [Using GitLab Runner with the GDK](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/runner.md)
- [Using the Web IDE terminal with the GDK](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/howto/web_ide_terminal_gdk_setup.md)
......@@ -2,7 +2,7 @@
disqus_identifier: 'https://docs.gitlab.com/ee/workflow/lfs/lfs/index.html'
---
# Git LFS
# Git Large File Storage (LFS)
Managing large files such as audio, video and graphics files has always been one
of the shortcomings of Git. The general recommendation is to not have Git repositories
......
......@@ -44,7 +44,7 @@ For instance, consider the following workflow:
1. Your team develops apps which require large files to be stored in
the application repository.
1. Although you have enabled [Git LFS](../../../topics/git/lfs/index.md#git-lfs)
1. Although you have enabled [Git LFS](../../../topics/git/lfs/index.md#git-large-file-storage-lfs)
to your project, your storage has grown significantly.
1. Before you exceed available storage, you set up a limit of 10 GB
per repository.
......
......@@ -56,7 +56,7 @@ Use the switches to enable or disable the following features:
| **Forks** | ✓ | Enables [forking](../index.md#fork-a-project) functionality |
| **Pipelines** | ✓ | Enables [CI/CD](../../../ci/README.md) functionality |
| **Container Registry** | | Activates a [registry](../../packages/container_registry/) for your docker images |
| **Git Large File Storage** | | Enables the use of [large files](../../../topics/git/lfs/index.md#git-lfs) |
| **Git Large File Storage** | | Enables the use of [large files](../../../topics/git/lfs/index.md#git-large-file-storage-lfs) |
| **Packages** | | Supports configuration of a [package registry](../../../administration/packages/index.md#gitlab-package-registry-administration-premium-only) functionality |
| **Wiki** | ✓ | Enables a separate system for [documentation](../wiki/) |
| **Snippets** | ✓ | Enables [sharing of code and text](../../snippets.md) |
......
......@@ -8,14 +8,14 @@ exports[`Blob Header Filepath rendering matches the snapshot 1`] = `
<file-icon-stub
aria-hidden="true"
cssclasses="mr-2"
filename="dummy.md"
filename="foo/bar/dummy.md"
size="18"
/>
<strong
class="file-title-name qa-file-title-name mr-1 js-blob-header-filepath"
>
dummy.md
foo/bar/dummy.md
</strong>
<small
......@@ -26,8 +26,8 @@ exports[`Blob Header Filepath rendering matches the snapshot 1`] = `
<clipboard-button-stub
cssclass="btn-clipboard btn-transparent lh-100 position-static"
gfm="\`dummy.md\`"
text="dummy.md"
gfm="\`foo/bar/dummy.md\`"
text="foo/bar/dummy.md"
title="Copy file path"
tooltipplacement="top"
/>
......
......@@ -38,12 +38,12 @@ describe('Blob Header Filepath', () => {
.find('.js-blob-header-filepath')
.text()
.trim(),
).toBe(MockBlob.name);
).toBe(MockBlob.path);
});
it('does not fail if the name is empty', () => {
const emptyName = '';
createComponent({ name: emptyName });
const emptyPath = '';
createComponent({ path: emptyPath });
expect(wrapper.find('.js-blob-header-filepath').exists()).toBe(false);
});
......@@ -84,7 +84,7 @@ describe('Blob Header Filepath', () => {
describe('functionality', () => {
it('sets gfm value correctly on the clipboard-button', () => {
createComponent();
expect(wrapper.vm.gfmCopyText).toBe('`dummy.md`');
expect(wrapper.vm.gfmCopyText).toBe(`\`${MockBlob.path}\``);
});
});
});
......@@ -21,7 +21,7 @@ export const RichViewerMock = {
export const Blob = {
binary: false,
name: 'dummy.md',
path: 'dummy.md',
path: 'foo/bar/dummy.md',
rawPath: '/flightjs/flight/snippets/51/raw',
size: 75,
simpleViewer: {
......
......@@ -786,10 +786,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.121.0.tgz#77083a68f72e9aa0e294da7715f378eef13b839e"
integrity sha512-scz/6Y/eED7RMFLAlhT6PwXwe0Wj8ivnRsyulk9NXKoqUmAqZliNmBmzYsHy5bFf9NB6xVV/rOk1/92nbi/Yaw==
"@gitlab/ui@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-13.5.0.tgz#bb8d90baea80066e5360457386d8153724998043"
integrity sha512-f4k6zKcJWRNV5ho7SXz0gL4VU4n+ljB52VrUrfJ1WTrESGpIFlTU17/Ac4ZMYySZuUXzmLulf9BXEN5HWCetTQ==
"@gitlab/ui@13.6.1":
version "13.6.1"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-13.6.1.tgz#dbf1941ed762381e83f557c5ee6cc860dacee03b"
integrity sha512-r8R5O8xPQUxi0yrzT5svbFhtHiZkdaf+GcXALF5oRgDTut6qOqWZ7RllHPo7RNBlyBbP30FiFvXjZlvN3PZaWQ==
dependencies:
"@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册