Commit 94611567 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent 42572f63
......@@ -58,6 +58,7 @@ export default {
<div class="btn-group">
<resolve-discussion-button
v-if="discussion.resolvable"
data-qa-selector="resolve_discussion_button"
:is-resolving="isResolving"
:button-title="resolveButtonTitle"
@onClick="$emit('resolve')"
......
......@@ -306,7 +306,11 @@ export default {
<template>
<timeline-entry-item class="note note-discussion">
<div class="timeline-content">
<div :data-discussion-id="discussion.id" class="discussion js-discussion-container">
<div
:data-discussion-id="discussion.id"
class="discussion js-discussion-container"
data-qa-selector="discussion_content"
>
<div v-if="shouldRenderDiffs" class="discussion-header note-wrapper">
<div v-once class="timeline-icon align-self-start flex-shrink-0">
<user-avatar-link
......
---
title: Fix pipelines for merge requests in project exports
merge_request: 17844
author:
type: fixed
......@@ -542,7 +542,7 @@ To indicate the steps of navigation through the UI:
a valid name for an illustration is `devops_diagram_v11_1.png`.
- Keep all file names in lower case.
- Consider using PNG images instead of JPEG.
- Compress all images with <https://tinypng.com/> or similar tool.
- Compress all images with <https://pngquant.org/> or similar tool.
- Compress gifs with <https://ezgif.com/optimize> or similar tool.
- Images should be used (only when necessary) to _illustrate_ the description
of a process, not to _replace_ it.
......
......@@ -41,6 +41,13 @@ In Google's side:
- Cloud Resource Manager API
- Cloud Billing API
To do so you need to:
1. Go to the [Google API Console](https://console.developers.google.com/apis/dashboard).
1. Click on **ENABLE APIS AND SERVICES** button at the top of the page.
1. Find each of the above APIs. On the page for the API, press the **ENABLE** button.
It may take a few minutes for the API to be fully functional.
On your GitLab server:
1. Open the configuration file.
......
......@@ -734,14 +734,16 @@ Avoid passing secrets as Docker build arguments if possible, as they may be
persisted in your image. See
[this discussion](https://github.com/moby/moby/issues/13490) for details.
### Passing secrets to `docker build` (beta)
### Passing secrets to `docker build`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/25514) in GitLab 12.3, but available in versions 11.9 and above.
CI environment variables can be passed as [build
secrets](https://docs.docker.com/develop/develop-images/build_enhancements/#new-docker-build-secret-information) to the `docker build` command by listing them comma separated by name in the
`AUTO_DEVOPS_BUILD_IMAGE_FORWARDED_CI_VARIABLES` variable. For example, in order to forward the variables `CI_COMMIT_SHA` and `CI_ENVIRONMENT_NAME`, one would set `AUTO_DEVOPS_BUILD_IMAGE_FORWARDED_CI_VARIABLES` to `CI_COMMIT_SHA,CI_ENVIRONMENT_NAME`.
Unlike build arguments, these are not persisted by Docker in the final image
(though you can still persist them yourself, so be careful).
(though you can still persist them yourself, so **be careful**).
In projects:
......@@ -861,7 +863,7 @@ applications.
| `ADDITIONAL_HOSTS` | Fully qualified domain names specified as a comma-separated list that are added to the ingress hosts. |
| `<ENVIRONMENT>_ADDITIONAL_HOSTS` | For a specific environment, the fully qualified domain names specified as a comma-separated list that are added to the ingress hosts. This takes precedence over `ADDITIONAL_HOSTS`. |
| `AUTO_DEVOPS_BUILD_IMAGE_EXTRA_ARGS` | Extra arguments to be passed to the `docker build` command. Note that using quotes will not prevent word splitting. [More details](#passing-arguments-to-docker-build). |
| `AUTO_DEVOPS_BUILD_IMAGE_FORWARDED_CI_VARIABLES` | A [comma-separated list of CI variable names](#passing-secrets-to-docker-build-beta) to be passed to the `docker build` command as secrets. |
| `AUTO_DEVOPS_BUILD_IMAGE_FORWARDED_CI_VARIABLES` | A [comma-separated list of CI variable names](#passing-secrets-to-docker-build) to be passed to the `docker build` command as secrets. |
| `AUTO_DEVOPS_CHART` | Helm Chart used to deploy your apps. Defaults to the one [provided by GitLab](https://gitlab.com/gitlab-org/charts/auto-deploy-app). |
| `AUTO_DEVOPS_CHART_REPOSITORY` | Helm Chart repository used to search for charts. Defaults to `https://charts.gitlab.io`. |
| `AUTO_DEVOPS_CHART_REPOSITORY_NAME` | From Gitlab 11.11, used to set the name of the helm repository. Defaults to `gitlab`. |
......
......@@ -66,6 +66,7 @@ tree:
- stages:
- :statuses
- :external_pull_request
- :merge_request
- :external_pull_requests
- :auto_devops
- :triggers
......@@ -168,6 +169,12 @@ excluded_attributes:
- :external_diff_size
issues:
- :milestone_id
merge_request:
- :milestone_id
- :ref_fetched
- :merge_jid
- :rebase_jid
- :latest_merge_request_diff_id
merge_requests:
- :milestone_id
- :ref_fetched
......
......@@ -38,7 +38,7 @@ module Gitlab
IMPORTED_OBJECT_MAX_RETRIES = 5.freeze
EXISTING_OBJECT_CHECK = %i[milestone milestones label labels project_label project_labels group_label group_labels project_feature].freeze
EXISTING_OBJECT_CHECK = %i[milestone milestones label labels project_label project_labels group_label group_labels project_feature merge_request].freeze
TOKEN_RESET_MODELS = %i[Project Namespace Ci::Trigger Ci::Build Ci::Runner ProjectHook].freeze
......@@ -293,6 +293,7 @@ module Gitlab
def find_or_create_object!
return relation_class.find_or_create_by(project_id: @project.id) if @relation_name == :project_feature
return find_or_create_merge_request! if @relation_name == :merge_request
# Can't use IDs as validation exists calling `group` or `project` attributes
finder_hash = parsed_relation_hash.tap do |hash|
......@@ -303,6 +304,11 @@ module Gitlab
GroupProjectObjectBuilder.build(relation_class, finder_hash)
end
def find_or_create_merge_request!
@project.merge_requests.find_by(iid: parsed_relation_hash['iid']) ||
relation_class.new(parsed_relation_hash)
end
end
end
end
......@@ -435,6 +435,10 @@ module QA
autoload :Login, 'qa/vendor/github/page/login'
end
end
module OnePassword
autoload :CLI, 'qa/vendor/one_password/cli'
end
end
# Classes that provide support to other parts of the framework.
......
......@@ -151,6 +151,11 @@ module QA
end
def within_element_by_index(name, index)
# Finding all elements can be flaky if the elements don't all load
# immediately. So we wait for any to appear before trying to find a
# specific one.
has_element?(name)
page.within all_elements(name)[index] do
yield
end
......
......@@ -10,6 +10,10 @@ module QA
element :discussion_option
end
base.view 'app/assets/javascripts/notes/components/noteable_discussion.vue' do
element :discussion_content
end
base.view 'app/assets/javascripts/notes/components/note_actions.vue' do
element :note_edit_button
end
......@@ -21,6 +25,7 @@ module QA
base.view 'app/assets/javascripts/notes/components/discussion_actions.vue' do
element :discussion_reply_tab
element :resolve_discussion_button
end
base.view 'app/assets/javascripts/notes/components/toggle_replies_widget.vue' do
......@@ -54,6 +59,12 @@ module QA
click_element :reply_comment_button
end
def resolve_discussion_at_index(index)
within_element_by_index(:discussion_content, index) do
click_element :resolve_discussion_button
end
end
def collapse_replies
click_element :collapse_replies
end
......
......@@ -21,14 +21,16 @@ module QA
@commit_message = 'QA Test - Commit message'
end
def files=(files)
if !files.is_a?(Array) ||
files.empty? ||
files.any? { |file| !file.has_key?(:file_path) || !file.has_key?(:content) }
raise ArgumentError, "Please provide an array of hashes e.g.: [{file_path: 'file1', content: 'foo'}]"
end
def add_files(files)
validate_files!(files)
@add_files = files
end
def update_files(files)
validate_files!(files)
@files = files
@update_files = files
end
def resource_web_url(resource)
......@@ -56,8 +58,17 @@ module QA
end
def actions
@files.map do |file|
file.merge({ action: "create" })
@add_files.map { |file| file.merge({ action: "create" }) } if @add_files
@update_files.map { |file| file.merge({ action: "update" }) } if @update_files
end
private
def validate_files!(files)
if !files.is_a?(Array) ||
files.empty? ||
files.any? { |file| !file.has_key?(:file_path) || !file.has_key?(:content) }
raise ArgumentError, "Please provide an array of hashes e.g.: [{file_path: 'file1', content: 'foo'}]"
end
end
end
......
......@@ -177,6 +177,22 @@ module QA
ENV['GITLAB_QA_PASSWORD_6']
end
def gitlab_qa_1p_email
ENV['GITLAB_QA_1P_EMAIL']
end
def gitlab_qa_1p_password
ENV['GITLAB_QA_1P_PASSWORD']
end
def gitlab_qa_1p_secret
ENV['GITLAB_QA_1P_SECRET']
end
def gitlab_qa_1p_github_uuid
ENV['GITLAB_QA_1P_GITHUB_UUID']
end
def knapsack?
!!(ENV['KNAPSACK_GENERATE_REPORT'] || ENV['KNAPSACK_REPORT_PATH'] || ENV['KNAPSACK_TEST_FILE_PATTERN'])
end
......
# frozen_string_literal: true
module QA
# Failure issue: https://gitlab.com/gitlab-org/quality/nightly/issues/121
context 'Manage', :orchestrated, :oauth, :quarantine do
context 'Manage', :orchestrated, :oauth do
describe 'OAuth login' do
it 'User logs in to GitLab with GitHub OAuth' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
......
......@@ -12,6 +12,12 @@ module QA
fill_in 'password', with: QA::Runtime::Env.github_password
click_on 'Sign in'
otp = OnePassword::CLI.new.otp
fill_in 'otp', with: otp
click_on 'Verify'
click_on 'Authorize gitlab-qa' if has_button?('Authorize gitlab-qa')
end
end
......
# frozen_string_literal: true
module QA
module Vendor
module OnePassword
class CLI
def initialize
@email = QA::Runtime::Env.gitlab_qa_1p_email
@password = QA::Runtime::Env.gitlab_qa_1p_password
@secret = QA::Runtime::Env.gitlab_qa_1p_secret
@github_uuid = QA::Runtime::Env.gitlab_qa_1p_github_uuid
end
def otp
`#{op_path} get totp #{@github_uuid} --session=#{session_token}`.to_i
end
private
def session_token
`echo '#{@password}' | #{op_path} signin gitlab.1password.com #{@email} #{@secret} --output=raw --shorthand=gitlab_qa`
end
def op_path
File.expand_path(File.join(%W[qa vendor one_password #{os} op]))
end
def os
RUBY_PLATFORM.include?("darwin") ? "darwin" : "linux"
end
end
end
end
end
......@@ -63,6 +63,8 @@ function rspec_paralellized_job() {
export KNAPSACK_LOG_LEVEL="debug"
export KNAPSACK_REPORT_PATH="knapsack/${test_tool}_${test_level}_${database}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json"
cp "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" "${KNAPSACK_REPORT_PATH}"
if [[ -z "${KNAPSACK_TEST_FILE_PATTERN}" ]]; then
pattern=$(ruby -r./lib/quality/test_level.rb -e "puts Quality::TestLevel.new(%(${spec_folder_prefix})).pattern(:${test_level})")
export KNAPSACK_TEST_FILE_PATTERN="${pattern}"
......@@ -77,8 +79,6 @@ function rspec_paralellized_job() {
export FLAKY_RSPEC_REPORT_PATH="rspec_flaky/all_${test_tool}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json"
export NEW_FLAKY_RSPEC_REPORT_PATH="rspec_flaky/new_${test_tool}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json"
cp "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" "${KNAPSACK_REPORT_PATH}"
if [[ ! -f $FLAKY_RSPEC_REPORT_PATH ]]; then
echo "{}" > "${FLAKY_RSPEC_REPORT_PATH}"
fi
......
......@@ -6161,7 +6161,7 @@
{
"id": 36,
"project_id": 5,
"ref": "master",
"ref": null,
"sha": "sha-notes",
"before_sha": null,
"push_data": null,
......@@ -6289,19 +6289,21 @@
{
"id": 37,
"project_id": 5,
"ref": null,
"ref": "master",
"sha": "048721d90c449b244b7b4c53a9186b04330174ec",
"before_sha": null,
"push_data": null,
"created_at": "2016-03-22T15:20:35.757Z",
"updated_at": "2016-03-22T15:20:35.757Z",
"tag": null,
"tag": false,
"yaml_errors": null,
"committed_at": null,
"status": "failed",
"started_at": null,
"finished_at": null,
"duration": null,
"source": "merge_request_event",
"merge_request_id": 27,
"stages": [
{
"id": 21,
......@@ -6372,7 +6374,32 @@
}
]
}
]
],
"merge_request": {
"id": 27,
"target_branch": "feature",
"source_branch": "feature_conflict",
"source_project_id": 999,
"author_id": 1,
"assignee_id": null,
"title": "MR1",
"created_at": "2016-06-14T15:02:36.568Z",
"updated_at": "2016-06-14T15:02:56.815Z",
"state": "opened",
"merge_status": "unchecked",
"target_project_id": 5,
"iid": 9,
"description": null,
"position": 0,
"updated_by_id": null,
"merge_error": null,
"diff_head_sha": "HEAD",
"source_branch_sha": "ABCD",
"target_branch_sha": "DCBA",
"merge_params": {
"force_remove_source_branch": null
}
}
},
{
"id": 38,
......
......@@ -12,9 +12,9 @@ describe 'Import/Export model configuration' do
# Remove duplicated or add missing models
# - project is not part of the tree, so it has to be added manually.
# - milestone, labels have both singular and plural versions in the tree, so remove the duplicates.
# - milestone, labels, merge_request have both singular and plural versions in the tree, so remove the duplicates.
# - User, Author... Models we do not care about for checking models
names.flatten.uniq - %w(milestones labels user author) + ['project']
names.flatten.uniq - %w(milestones labels user author merge_request) + ['project']
end
let(:all_models_yml) { 'spec/lib/gitlab/import_export/all_models.yml' }
let(:all_models_hash) { YAML.load_file(all_models_yml) }
......
# frozen_string_literal: true
require 'spec_helper'
describe AnalyticsBuildEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe AnalyticsBuildSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe AnalyticsIssueEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe AnalyticsIssueSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe AnalyticsMergeRequestSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe AnalyticsStageSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe AnalyticsSummarySerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe BlobEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe BuildActionEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe BuildArtifactEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe BuildDetailsEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe BuildSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe ClusterApplicationEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe ClusterBasicEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe ClusterEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe ClusterSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe CommitEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe ContainerRepositoryEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe ContainerTagEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe DeployKeyEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe DeploymentEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe DetailedStatusEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe DiffFileEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe DiffLineSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe DiffViewerEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe DiffsEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe DiscussionEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe EntityDateHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe EntityRequest do
......
# frozen_string_literal: true
require 'spec_helper'
describe EnvironmentEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe EnvironmentSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe EnvironmentStatusEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe GroupChildEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe GroupChildSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe GroupVariableEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe IssueEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe IssueSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe JobEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe LabelSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe LfsFileLockEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe MergeRequestDiffEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe MergeRequestForPipelineEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe MergeRequestSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe MergeRequestUserEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe MergeRequestWidgetEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe NoteEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe PipelineDetailsEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe PipelineEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe PipelineSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe ProjectMirrorEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe ProjectMirrorSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe ProjectNoteEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe RemoteMirrorEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe RequestAwareEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe RunnerEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe StageEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe TestCaseEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe TestReportsComparerEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe TestReportsComparerSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe TestSuiteComparerEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe TriggerVariableEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe UserEntity do
......
# frozen_string_literal: true
require 'spec_helper'
describe VariableEntity do
......
......@@ -990,15 +990,15 @@
dependencies:
vue-eslint-parser "^6.0.4"
"@gitlab/svgs@^1.74.0":
version "1.74.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.74.0.tgz#2883c47c476a08e8c9c3621117a544204f4c13a3"
integrity sha512-L/Jga3EzGgOWF1rdQrH8wNm4dBFXcAVPZnFOEvBoe5OoWZgR3Ac/5Bgz4fYXYyPEKYUSorO7eyE6OVSvjKoM7g==
"@gitlab/ui@5.26.0":
version "5.26.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-5.26.0.tgz#303dcb339947b04bd04378828bd6b6ee1509ea9e"
integrity sha512-F8zjN6oiXUy787/4xD+vApuqRxiNe5ZhWg96gT23cUk5SL1Oj4NyMETpAh0v9R9J/i70ETmBYW011EGogjlAVA==
"@gitlab/svgs@^1.75.0":
version "1.75.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.75.0.tgz#93f9e6bdef78dd84ac88d8273711dc1f25e4e5ac"
integrity sha512-hOCfF73++yG+KTYxaQNMkbDUg0XKije41g6XR2dgj7466rzZmebG/nt6pUXonmlqy/NLGaRUPBKs0zuM7tcLhA==
"@gitlab/ui@5.26.1":
version "5.26.1"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-5.26.1.tgz#1662af9be444239bcf9570ea9a4c31aef4639a00"
integrity sha512-PtOuAQWkShA5O78Gy16BtBsic1O9jl7dc07jusgYL5rmIYw/cRZiI92/RZwkelJahdbJpaD9YulsjgsejDIp8g==
dependencies:
"@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.2.1"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment