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

Add latest changes from gitlab-org/gitlab@master

parent 42572f63
No related branches found
No related tags found
No related merge requests found
Showing
with 139 additions and 21 deletions
Loading
Loading
@@ -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')"
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
---
title: Fix pipelines for merge requests in project exports
merge_request: 17844
author:
type: fixed
Loading
Loading
@@ -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.
Loading
Loading
Loading
Loading
@@ -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.
Loading
Loading
Loading
Loading
@@ -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:
 
Loading
Loading
@@ -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`. |
Loading
Loading
Loading
Loading
@@ -66,6 +66,7 @@ tree:
- stages:
- :statuses
- :external_pull_request
- :merge_request
- :external_pull_requests
- :auto_devops
- :triggers
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
 
Loading
Loading
@@ -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|
Loading
Loading
@@ -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
Loading
Loading
@@ -37,8 +37,8 @@
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-syntax-import-meta": "^7.2.0",
"@babel/preset-env": "^7.6.2",
"@gitlab/svgs": "^1.74.0",
"@gitlab/ui": "5.26.0",
"@gitlab/svgs": "^1.75.0",
"@gitlab/ui": "5.26.1",
"@gitlab/visual-review-tools": "1.0.3",
"apollo-cache-inmemory": "^1.5.1",
"apollo-client": "^2.5.1",
Loading
Loading
Loading
Loading
@@ -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.
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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)
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
# 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)
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
# 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
File added
File added
Loading
Loading
@@ -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}"
Loading
Loading
@@ -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
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