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

Add latest changes from gitlab-org/gitlab@master

parent 7d19df2d
No related branches found
No related tags found
No related merge requests found
Showing
with 103 additions and 20 deletions
# frozen_string_literal: true
 
module Storage
class HashedProject
class Hashed
attr_accessor :project
delegate :gitlab_shell, :repository_storage, to: :project
 
Loading
Loading
Loading
Loading
@@ -36,7 +36,7 @@ class FileUploader < GitlabUploader
 
def self.base_dir(model, store = Store::LOCAL)
decorated_model = model
decorated_model = Storage::HashedProject.new(model) if store == Store::REMOTE
decorated_model = Storage::Hashed.new(model) if store == Store::REMOTE
 
model_path_segment(decorated_model)
end
Loading
Loading
@@ -57,7 +57,7 @@ class FileUploader < GitlabUploader
# Returns a String without a trailing slash
def self.model_path_segment(model)
case model
when Storage::HashedProject then model.disk_path
when Storage::Hashed then model.disk_path
else
model.hashed_storage?(:attachments) ? model.disk_path : model.full_path
end
Loading
Loading
- provider = local_assigns.fetch(:provider)
- is_current_provider = provider == params[:provider]
- logo_path = local_assigns.fetch(:logo_path)
- label = local_assigns.fetch(:label)
- last = local_assigns.fetch(:last, false)
- classes = ['btn btn-light btn-outline flex-fill d-inline-flex flex-column justify-content-center align-items-center', ('mr-3' unless last)]
- classes = ["btn btn-light btn-outline flex-fill d-inline-flex flex-column justify-content-center align-items-center w-50 js-create-#{provider}-cluster-button"]
- conditional_classes = [('mr-3' unless last), ('active' if is_current_provider)]
 
= link_to clusterable.new_path(provider: provider), class: classes do
= link_to clusterable.new_path(provider: provider), class: classes + conditional_classes do
.svg-content.p-2= image_tag logo_path, alt: label, class: 'gl-w-64 gl-h-64'
%span
= label
- gke_label = s_('ClusterIntegration|Google GKE')
- eks_label = s_('ClusterIntegration|Amazon EKS')
- create_cluster_label = s_('ClusterIntegration|Create cluster on')
.d-flex.flex-column
%h5.mb-3
.d-flex.flex-column.p-3
%h4.mb-3
= create_cluster_label
.d-flex
= render partial: 'clusters/clusters/cloud_providers/cloud_provider_button',
Loading
Loading
- breadcrumb_title _('Kubernetes')
- page_title _('Kubernetes Cluster')
- active_tab = local_assigns.fetch(:active_tab, 'create')
- provider = params[:provider]
= javascript_include_tag 'https://apis.google.com/js/api.js'
 
= render_gcp_signup_offer
Loading
Loading
@@ -19,8 +20,12 @@
%span Add existing cluster
 
.tab-content.gitlab-tab-content
.tab-pane{ id: 'create-cluster-pane', class: active_when(active_tab == 'create'), role: 'tabpanel' }
= render new_cluster_partial(provider: params[:provider])
.tab-pane.p-0{ id: 'create-cluster-pane', class: active_when(active_tab == 'create'), role: 'tabpanel' }
= render 'clusters/clusters/cloud_providers/cloud_provider_selector'
- if ['aws', 'gcp'].include?(provider)
.p-3.border-top
= render "clusters/clusters/#{provider}/new"
 
.tab-pane{ id: 'add-cluster-pane', class: active_when(active_tab == 'add'), role: 'tabpanel' }
= render 'clusters/clusters/user/header'
Loading
Loading
---
title: Improve message UI on Microsoft Teams notification
merge_request: 23385
author: Takuya Noguchi
type: fixed
---
title: Resolve Design discussion note preview is broken
merge_request: 24288
author:
type: fixed
---
title: Allow to switch between cloud providers in cluster creation screen
merge_request: 23362
author:
type: changed
---
title: Enable recaptcha check on sign up
merge_request: 24274
author:
type: fixed
---
title: Admin mode support in sidekiq jobs
merge_request: 21792
author: Diego Louzán
type: changed
---
title: Optimize issue search when sorting by due date and position
merge_request: 24217
author:
type: performance
# frozen_string_literal: true
class AddSortingIndexToPackages < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :packages_packages, [:project_id, :created_at]
add_concurrent_index :packages_packages, [:project_id, :version]
add_concurrent_index :packages_packages, [:project_id, :package_type]
end
def down
remove_concurrent_index :packages_packages, [:project_id, :created_at]
remove_concurrent_index :packages_packages, [:project_id, :version]
remove_concurrent_index :packages_packages, [:project_id, :package_type]
end
end
# frozen_string_literal: true
class RemoveProjectIdIndexFromPackages < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
remove_concurrent_index :packages_packages, [:project_id]
end
def down
add_concurrent_index :packages_packages, [:project_id]
end
end
Loading
Loading
@@ -2977,8 +2977,10 @@ ActiveRecord::Schema.define(version: 2020_01_30_161817) do
t.string "version"
t.integer "package_type", limit: 2, null: false
t.index ["name"], name: "index_packages_packages_on_name_trigram", opclass: :gin_trgm_ops, using: :gin
t.index ["project_id", "created_at"], name: "index_packages_packages_on_project_id_and_created_at"
t.index ["project_id", "name", "version", "package_type"], name: "idx_packages_packages_on_project_id_name_version_package_type"
t.index ["project_id"], name: "index_packages_packages_on_project_id"
t.index ["project_id", "package_type"], name: "index_packages_packages_on_project_id_and_package_type"
t.index ["project_id", "version"], name: "index_packages_packages_on_project_id_and_version"
end
 
create_table "packages_tags", force: :cascade do |t|
Loading
Loading
Loading
Loading
@@ -609,7 +609,7 @@ of removing unused tags. Currently, this is exposed using the API, but in the fu
these controls will be migrated to the GitLab interface.
 
Project maintainers can
[delete Container Registry tags in bulk](../../api/container_registry.md#delete-repository-tags-in-bulk)
[delete Container Registry tags in bulk](../../api/container_registry.md#delete-registry-repository-tags-in-bulk)
periodically based on their own criteria, however, this alone does not recycle data,
it only unlinks tags from manifests and image blobs. To recycle the Container
Registry data in the whole GitLab instance, you can use the built-in command
Loading
Loading
Loading
Loading
@@ -129,7 +129,7 @@ DELETE /projects/:id/registry/repositories/:repository_id
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/registry/repositories/2"
```
 
## List repository tags
## List registry repository tags
 
### Within a project
 
Loading
Loading
@@ -165,7 +165,7 @@ Example response:
]
```
 
## Get details of a repository tag
## Get details of a registry repository tag
 
Get details of a registry repository tag.
 
Loading
Loading
@@ -198,7 +198,7 @@ Example response:
}
```
 
## Delete a repository tag
## Delete a registry repository tag
 
Delete a registry repository tag.
 
Loading
Loading
@@ -219,9 +219,9 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://git
This action does not delete blobs. In order to delete them and recycle disk space,
[run the garbage collection](https://docs.gitlab.com/omnibus/maintenance/README.html#removing-unused-layers-not-referenced-by-manifests).
 
## Delete repository tags in bulk
## Delete registry repository tags in bulk
 
Delete repository tags in bulk based on given criteria.
Delete registry repository tags in bulk based on given criteria.
 
```
DELETE /projects/:id/registry/repositories/:repository_id/tags
Loading
Loading
@@ -231,7 +231,7 @@ DELETE /projects/:id/registry/repositories/:repository_id/tags
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. |
| `repository_id` | integer | yes | The ID of registry repository. |
| `name_regex` | string | yes | The regex of the name to delete. To delete all tags specify `.*`. |
| `name_regex` | string | yes | The [re2](https://github.com/google/re2/wiki/Syntax) regex of the name to delete. To delete all tags specify `.*`.|
| `keep_n` | integer | no | The amount of latest tags of given name to keep. |
| `older_than` | string | no | Tags to delete that are older than the given time, written in human readable form `1h`, `1d`, `1month`. |
 
Loading
Loading
Loading
Loading
@@ -18,6 +18,11 @@ RuboCop (and other checks) offenses on every modified file.
This saves you time as you don't have to wait for the same errors to be detected
by the CI.
 
Overcommit relies on a pre-commit hook to prevent commits that violate its ruleset.
If you wish to override this behavior, it can be done by passing the ENV variable
`OVERCOMMIT_DISABLE`; i.e. `OVERCOMMIT_DISABLE=1 git rebase master` to rebase while
disabling the Git hook.
## Ruby, Rails, RSpec
 
Our codebase style is defined and enforced by [RuboCop](https://github.com/rubocop-hq/rubocop).
Loading
Loading
Loading
Loading
@@ -4,6 +4,8 @@ type: howto
 
# Installing GitLab HA on Amazon Web Services (AWS)
 
DANGER: **Danger:** This guide is under review and the steps below will be revised and updated in due time. For more detail, please see [this epic](https://gitlab.com/groups/gitlab-org/-/epics/912).
This page offers a walkthrough of a common HA (Highly Available) configuration
for GitLab on AWS. You should customize it to accommodate your needs.
 
Loading
Loading
Loading
Loading
@@ -48,8 +48,6 @@ However, DAST can be [configured](#full-scan)
to also perform a so-called "active scan". That is, attack your application and produce a more extensive security report.
It can be very useful combined with [Review Apps](../../../ci/review_apps/index.md).
 
The [`dast`](https://gitlab.com/gitlab-org/security-products/dast/container_registry) Docker image in GitLab container registry is updated on a weekly basis to have all [`owasp2docker-weekly`](https://hub.docker.com/r/owasp/zap2docker-weekly/) updates in it.
## Use cases
 
It helps you automatically find security vulnerabilities in your running web
Loading
Loading
Loading
Loading
@@ -240,7 +240,8 @@ build:
- target/
 
spotbugs-sast:
dependencies: build
dependencies:
- build
script:
- /analyzer run -compile=false
variables:
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