Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
8b24e02dec
commit
6eb3540d3d
|
@ -38,6 +38,10 @@ workflow:
|
|||
when: never
|
||||
# For merge requests, create a pipeline.
|
||||
- if: '$CI_MERGE_REQUEST_IID'
|
||||
# For the 2-hourly scheduled pipelines, we set specific variables
|
||||
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "2-hourly"'
|
||||
variables:
|
||||
CRYSTALBALL: "true"
|
||||
# For `$CI_DEFAULT_BRANCH` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
|
||||
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||
# For tags, create a pipeline.
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
variables:
|
||||
RUBY_GC_MALLOC_LIMIT: 67108864
|
||||
RUBY_GC_MALLOC_LIMIT_MAX: 134217728
|
||||
CRYSTALBALL: "true"
|
||||
RECORD_DEPRECATIONS: "true"
|
||||
needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets", "detect-tests"]
|
||||
script:
|
||||
|
|
|
@ -21,7 +21,7 @@ module Ci
|
|||
"empty-state-illustration-path" => image_path('illustrations/empty-state/empty-dag-md.svg'),
|
||||
"initial-branch-name" => initial_branch,
|
||||
"lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'),
|
||||
"needs-help-page-path" => help_page_path('ci/yaml/README', anchor: 'needs'),
|
||||
"needs-help-page-path" => help_page_path('ci/yaml/index', anchor: 'needs'),
|
||||
"new-merge-request-path" => namespace_project_new_merge_request_path,
|
||||
"pipeline_etag" => latest_commit ? graphql_etag_pipeline_sha_path(commit_sha) : '',
|
||||
"pipeline-page-path" => project_pipelines_path(project),
|
||||
|
@ -30,7 +30,7 @@ module Ci
|
|||
"project-namespace" => project.namespace.full_path,
|
||||
"runner-help-page-path" => help_page_path('ci/runners/index'),
|
||||
"total-branches" => project.repository.branches.length,
|
||||
"yml-help-page-path" => help_page_path('ci/yaml/README')
|
||||
"yml-help-page-path" => help_page_path('ci/yaml/index')
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module IdeHelper
|
|||
'committed-state-svg-path' => image_path('illustrations/multi-editor_all_changes_committed_empty.svg'),
|
||||
'pipelines-empty-state-svg-path': image_path('illustrations/pipelines_empty.svg'),
|
||||
'promotion-svg-path': image_path('illustrations/web-ide_promotion.svg'),
|
||||
'ci-help-page-path' => help_page_path('ci/quick_start/README'),
|
||||
'ci-help-page-path' => help_page_path('ci/quick_start/index'),
|
||||
'web-ide-help-page-path' => help_page_path('user/project/web_ide/index.md'),
|
||||
'clientside-preview-enabled': Gitlab::CurrentSettings.web_ide_clientside_preview_enabled?.to_s,
|
||||
'render-whitespace-in-code': current_user.render_whitespace_in_code.to_s,
|
||||
|
|
|
@ -189,7 +189,7 @@ module SearchHelper
|
|||
{ category: "Help", label: _("Markdown Help"), url: help_page_path("user/markdown") },
|
||||
{ category: "Help", label: _("Permissions Help"), url: help_page_path("user/permissions") },
|
||||
{ category: "Help", label: _("Public Access Help"), url: help_page_path("public_access/public_access") },
|
||||
{ category: "Help", label: _("Rake Tasks Help"), url: help_page_path("raketasks/README") },
|
||||
{ category: "Help", label: _("Rake Tasks Help"), url: help_page_path("raketasks/index") },
|
||||
{ category: "Help", label: _("SSH Keys Help"), url: help_page_path("ssh/index") },
|
||||
{ category: "Help", label: _("System Hooks Help"), url: help_page_path("system_hooks/system_hooks") },
|
||||
{ category: "Help", label: _("Webhooks Help"), url: help_page_path("user/project/integrations/webhooks") }
|
||||
|
|
|
@ -133,7 +133,7 @@ class BuildDetailsEntity < JobEntity
|
|||
def callout_message
|
||||
return super unless build.failure_reason.to_sym == :missing_dependency_failure
|
||||
|
||||
docs_url = "https://docs.gitlab.com/ee/ci/yaml/README.html#dependencies"
|
||||
docs_url = "https://docs.gitlab.com/ee/ci/yaml/index.html#dependencies"
|
||||
|
||||
[
|
||||
failure_message,
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
= s_('Pipelines|This GitLab CI configuration is invalid:')
|
||||
= viewer.validation_message(project: @project, sha: @commit.sha, user: @current_user)
|
||||
|
||||
= link_to _('Learn more'), help_page_path('ci/yaml/README')
|
||||
= link_to _('Learn more'), help_page_path('ci/yaml/index')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= loading_icon(css_class: "gl-vertical-align-text-bottom mr-1")
|
||||
= s_('Pipelines|Validating GitLab CI configuration…')
|
||||
|
||||
= link_to _('Learn more'), help_page_path('ci/yaml/README')
|
||||
= link_to _('Learn more'), help_page_path('ci/yaml/index')
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
self-managed: true
|
||||
gitlab-com: true
|
||||
packages: [Free, Premium, Ultimate]
|
||||
url: https://docs.gitlab.com/ee/ci/yaml/README.html#reference-tags
|
||||
url: https://docs.gitlab.com/ee/ci/yaml/index.html#reference-tags
|
||||
image_url: https://about.gitlab.com/images/13_9/reference.png
|
||||
published_at: 2021-02-22
|
||||
release: 13.9
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
self-managed: true
|
||||
gitlab-com: true
|
||||
packages: [Free, Premium, Ultimate]
|
||||
url: https://docs.gitlab.com/ee/ci/yaml/README.html#multiple-caches
|
||||
url: https://docs.gitlab.com/ee/ci/yaml/index.html#multiple-caches
|
||||
image_url: https://about.gitlab.com/images/13_11/cache.png
|
||||
published_at: 2021-04-22
|
||||
release: 13.11
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
self-managed: true
|
||||
gitlab-com: true
|
||||
packages: [Free, Premium, Ultimate]
|
||||
url: https://docs.gitlab.com/ee/ci/yaml/README.html#artifactsexpire_in
|
||||
url: https://docs.gitlab.com/ee/ci/yaml/index.html#artifactsexpire_in
|
||||
image_url: https://about.gitlab.com/images/growth/verify.png
|
||||
published_at: 2021-05-22
|
||||
release: 13.12
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# This specific template is located at:
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Bash.gitlab-ci.yml
|
||||
|
||||
# See https://docs.gitlab.com/ee/ci/yaml/README.html for all available options
|
||||
# See https://docs.gitlab.com/ee/ci/yaml/index.html for all available options
|
||||
|
||||
# you can delete this line if you're not using Docker
|
||||
image: busybox:latest
|
||||
|
|
|
@ -18,7 +18,7 @@ variables:
|
|||
POSTGRES_DB: database_name
|
||||
|
||||
# This folder is cached between builds
|
||||
# http://docs.gitlab.com/ee/ci/yaml/README.html#cache
|
||||
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
|
||||
cache:
|
||||
paths:
|
||||
- ~/.cache/pip/
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
|
||||
# Stages run in sequential order, but jobs within stages run in parallel.
|
||||
#
|
||||
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/README.html#stages
|
||||
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
|
||||
|
||||
stages: # List of stages for jobs, and their order of execution
|
||||
- build
|
||||
|
|
|
@ -18,7 +18,7 @@ variables:
|
|||
MYSQL_ROOT_PASSWORD: secret
|
||||
|
||||
# This folder is cached between builds
|
||||
# http://docs.gitlab.com/ee/ci/yaml/README.html#cache
|
||||
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
|
||||
cache:
|
||||
paths:
|
||||
- vendor/
|
||||
|
|
|
@ -16,7 +16,7 @@ services:
|
|||
- postgres:latest
|
||||
|
||||
# This folder is cached between builds
|
||||
# http://docs.gitlab.com/ee/ci/yaml/README.html#cache
|
||||
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
image: node:latest
|
||||
|
||||
# This folder is cached between builds
|
||||
# http://docs.gitlab.com/ee/ci/yaml/README.html#cache
|
||||
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# - A `test` stage to be present in the pipeline.
|
||||
# - You must define the `CIS_KUBECONFIG` variable to allow analyzer to connect to your Kubernetes cluster and fetch found vulnerabilities.
|
||||
#
|
||||
# Configure container scanning with CI/CD variables (https://docs.gitlab.com/ee/ci/variables/README.html).
|
||||
# Configure container scanning with CI/CD variables (https://docs.gitlab.com/ee/ci/variables/index.html).
|
||||
# List of available variables: https://docs.gitlab.com/ee/user/application_security/cluster_image_scanning/#available-variables
|
||||
|
||||
variables:
|
||||
|
|
|
@ -84,7 +84,7 @@ module Gitlab
|
|||
end
|
||||
|
||||
def basics_link
|
||||
link(s_('InProductMarketing|Git basics'), help_page_url('gitlab-basics/README'))
|
||||
link(s_('InProductMarketing|Git basics'), help_page_url('gitlab-basics/index'))
|
||||
end
|
||||
|
||||
def import_link
|
||||
|
|
|
@ -72,7 +72,7 @@ module Gitlab
|
|||
end
|
||||
|
||||
def quick_start_link
|
||||
link(s_('InProductMarketing|quick start guide'), help_page_url('ci/quick_start/README'))
|
||||
link(s_('InProductMarketing|quick start guide'), help_page_url('ci/quick_start/index'))
|
||||
end
|
||||
|
||||
def performance_link
|
||||
|
|
|
@ -48,7 +48,7 @@ module Gitlab
|
|||
*Documentation*
|
||||
|
||||
For more information about GitLab chatops, refer to its
|
||||
documentation: https://docs.gitlab.com/ee/ci/chatops/README.html.
|
||||
documentation: https://docs.gitlab.com/ee/ci/chatops/index.html.
|
||||
MESSAGE
|
||||
|
||||
message
|
||||
|
|
|
@ -40,18 +40,20 @@ module QA
|
|||
click_element :invite_a_group_button
|
||||
end
|
||||
|
||||
def add_member(username, access_level = Resource::Members::AccessLevel::DEVELOPER)
|
||||
def add_member(username, access_level = 'Developer')
|
||||
open_invite_members_modal
|
||||
|
||||
within_element(:invite_members_modal_content) do
|
||||
fill_element :access_level_dropdown, with: access_level
|
||||
|
||||
fill_element :members_token_select_input, username
|
||||
|
||||
Support::WaitForRequests.wait_for_requests
|
||||
|
||||
click_button username
|
||||
|
||||
# Guest option is selected by default, skipping these steps if desired option is 'Guest'
|
||||
unless access_level == 'Guest'
|
||||
click_element :access_level_dropdown
|
||||
click_button access_level
|
||||
end
|
||||
|
||||
click_element :invite_button
|
||||
end
|
||||
|
||||
|
|
|
@ -5,27 +5,31 @@ require 'digest/sha1'
|
|||
module QA
|
||||
RSpec.describe 'Release', :runner do
|
||||
describe 'Git clone using a deploy key' do
|
||||
before do
|
||||
Flow::Login.sign_in
|
||||
let(:runner_name) { "qa-runner-#{SecureRandom.hex(4)}" }
|
||||
let(:repository_location) { project.repository_ssh_location }
|
||||
|
||||
@runner_name = "qa-runner-#{Time.now.to_i}"
|
||||
|
||||
@project = Resource::Project.fabricate_via_api! do |project|
|
||||
let(:project) do
|
||||
Resource::Project.fabricate_via_api! do |project|
|
||||
project.name = 'deploy-key-clone-project'
|
||||
end
|
||||
end
|
||||
|
||||
@repository_location = @project.repository_ssh_location
|
||||
|
||||
@runner = Resource::Runner.fabricate_via_api! do |resource|
|
||||
resource.project = @project
|
||||
resource.name = @runner_name
|
||||
resource.tags = %w[qa docker]
|
||||
let!(:runner) do
|
||||
Resource::Runner.fabricate_via_api! do |resource|
|
||||
resource.project = project
|
||||
resource.name = runner_name
|
||||
resource.tags = [runner_name]
|
||||
resource.image = 'gitlab/gitlab-runner:alpine'
|
||||
end
|
||||
end
|
||||
|
||||
before do
|
||||
Flow::Login.sign_in
|
||||
end
|
||||
|
||||
after do
|
||||
@runner.remove_via_api!
|
||||
runner.remove_via_api!
|
||||
project.remove_via_api!
|
||||
end
|
||||
|
||||
keys = [
|
||||
|
@ -39,7 +43,7 @@ module QA
|
|||
key = key_class.new(*bits)
|
||||
|
||||
Resource::DeployKey.fabricate_via_browser_ui! do |resource|
|
||||
resource.project = @project
|
||||
resource.project = project
|
||||
resource.title = "deploy key #{key.name}(#{key.bits})"
|
||||
resource.key = key.public_key
|
||||
end
|
||||
|
@ -49,25 +53,23 @@ module QA
|
|||
make_ci_variable(deploy_key_name, key)
|
||||
|
||||
gitlab_ci = <<~YAML
|
||||
cat-config:
|
||||
script:
|
||||
- apk add --update --no-cache openssh-client
|
||||
- mkdir -p ~/.ssh
|
||||
- ssh-keyscan -p #{@repository_location.port} #{@repository_location.host} >> ~/.ssh/known_hosts
|
||||
- eval $(ssh-agent -s)
|
||||
- ssh-add -D
|
||||
- echo "$#{deploy_key_name}" | ssh-add -
|
||||
- git clone #{@repository_location.git_uri}
|
||||
- cd #{@project.name}
|
||||
- git checkout #{deploy_key_name}
|
||||
- sha1sum .gitlab-ci.yml
|
||||
tags:
|
||||
- qa
|
||||
- docker
|
||||
cat-config:
|
||||
script:
|
||||
- which ssh-agent || ( apk --update add openssh-client )
|
||||
- mkdir -p ~/.ssh
|
||||
- ssh-keyscan -p #{repository_location.port} #{repository_location.host} >> ~/.ssh/known_hosts
|
||||
- eval $(ssh-agent -s)
|
||||
- ssh-add -D
|
||||
- echo "$#{deploy_key_name}" | ssh-add -
|
||||
- git clone #{repository_location.git_uri}
|
||||
- cd #{project.name}
|
||||
- git checkout #{deploy_key_name}
|
||||
- sha1sum .gitlab-ci.yml
|
||||
tags: [#{runner_name}]
|
||||
YAML
|
||||
|
||||
Resource::Repository::ProjectPush.fabricate! do |resource|
|
||||
resource.project = @project
|
||||
resource.project = project
|
||||
resource.file_name = '.gitlab-ci.yml'
|
||||
resource.commit_message = 'Add .gitlab-ci.yml'
|
||||
resource.file_content = gitlab_ci
|
||||
|
@ -81,8 +83,10 @@ module QA
|
|||
Page::Project::Pipeline::Show.perform(&:click_on_first_job)
|
||||
|
||||
Page::Project::Job::Show.perform do |job|
|
||||
expect(job).to be_successful
|
||||
expect(job.output).to include(sha1sum)
|
||||
aggregate_failures 'job succeeds and has correct sha1sum' do
|
||||
expect(job).to be_successful
|
||||
expect(job.output).to include(sha1sum)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -90,7 +94,7 @@ module QA
|
|||
|
||||
def make_ci_variable(key_name, key)
|
||||
Resource::CiVariable.fabricate_via_api! do |resource|
|
||||
resource.project = @project
|
||||
resource.project = project
|
||||
resource.key = key_name
|
||||
resource.value = key.private_key
|
||||
resource.masked = false
|
||||
|
|
|
@ -6,7 +6,7 @@ module CrystalballEnv
|
|||
extend self
|
||||
|
||||
def start!
|
||||
return unless ENV['CRYSTALBALL'] && ENV['CI_PIPELINE_SOURCE'] == 'schedule' && ENV['FREQUENCY'] == '2-hourly'
|
||||
return unless ENV['CRYSTALBALL']
|
||||
|
||||
require 'crystalball'
|
||||
require_relative '../tooling/lib/tooling/crystalball/coverage_lines_execution_detector'
|
||||
|
|
|
@ -47,7 +47,7 @@ RSpec.describe Ci::PipelineEditorHelper do
|
|||
"empty-state-illustration-path" => 'foo',
|
||||
"initial-branch-name" => nil,
|
||||
"lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'),
|
||||
"needs-help-page-path" => help_page_path('ci/yaml/README', anchor: 'needs'),
|
||||
"needs-help-page-path" => help_page_path('ci/yaml/index', anchor: 'needs'),
|
||||
"new-merge-request-path" => '/mock/project/-/merge_requests/new',
|
||||
"pipeline_etag" => graphql_etag_pipeline_sha_path(project.commit.sha),
|
||||
"pipeline-page-path" => project_pipelines_path(project),
|
||||
|
@ -56,7 +56,7 @@ RSpec.describe Ci::PipelineEditorHelper do
|
|||
"project-namespace" => project.namespace.full_path,
|
||||
"runner-help-page-path" => help_page_path('ci/runners/index'),
|
||||
"total-branches" => project.repository.branches.length,
|
||||
"yml-help-page-path" => help_page_path('ci/yaml/README')
|
||||
"yml-help-page-path" => help_page_path('ci/yaml/index')
|
||||
})
|
||||
end
|
||||
end
|
||||
|
@ -74,7 +74,7 @@ RSpec.describe Ci::PipelineEditorHelper do
|
|||
"empty-state-illustration-path" => 'foo',
|
||||
"initial-branch-name" => nil,
|
||||
"lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'),
|
||||
"needs-help-page-path" => help_page_path('ci/yaml/README', anchor: 'needs'),
|
||||
"needs-help-page-path" => help_page_path('ci/yaml/index', anchor: 'needs'),
|
||||
"new-merge-request-path" => '/mock/project/-/merge_requests/new',
|
||||
"pipeline_etag" => '',
|
||||
"pipeline-page-path" => project_pipelines_path(project),
|
||||
|
@ -83,7 +83,7 @@ RSpec.describe Ci::PipelineEditorHelper do
|
|||
"project-namespace" => project.namespace.full_path,
|
||||
"runner-help-page-path" => help_page_path('ci/runners/index'),
|
||||
"total-branches" => 0,
|
||||
"yml-help-page-path" => help_page_path('ci/yaml/README')
|
||||
"yml-help-page-path" => help_page_path('ci/yaml/index')
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue