Commit af080d19 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'master' into 11595-use-elasticsearch-bulk-indexing-api-for-database-index-operations

parents d154a4eb d8d13020
...@@ -18,3 +18,4 @@ db/ @abrandl @NikolayS ...@@ -18,3 +18,4 @@ db/ @abrandl @NikolayS
/lib/gitlab/auth/ldap/ @dblessing @mkozono /lib/gitlab/auth/ldap/ @dblessing @mkozono
/lib/gitlab/ci/templates/ @nolith @zj /lib/gitlab/ci/templates/ @nolith @zj
/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml @DylanGriffith @mayra-cabrera @tkuah /lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml @DylanGriffith @mayra-cabrera @tkuah
/lib/gitlab/ci/templates/Security/ @plafoucriere @gonzoyumo @twoodham
...@@ -221,24 +221,6 @@ entry. ...@@ -221,24 +221,6 @@ entry.
- Fix input group height. - Fix input group height.
## 11.10.6 (2019-06-04)
### Fixed (7 changes, 1 of them is from the community)
- Allow a member to have an access level equal to parent group. !27913
- Fix uploading of LFS tracked file through UI. !28052
- Use 3-way merge for squashing commits. !28078
- Use a path for the related merge requests endpoint. !28171
- Fix project visibility level validation. !28305 (Peter Marko)
- Fix Rugged get_tree_entries recursive flag not working. !28494
- Use source ref in pipeline webhook. !28772
### Other (1 change)
- Fix input group height.
## 11.10.4 (2019-05-01) ## 11.10.4 (2019-05-01)
### Fixed (12 changes) ### Fixed (12 changes)
......
...@@ -444,7 +444,7 @@ group :ed25519 do ...@@ -444,7 +444,7 @@ group :ed25519 do
end end
# Gitaly GRPC client # Gitaly GRPC client
gem 'gitaly-proto', '~> 1.27.0', require: 'gitaly' gem 'gitaly-proto', '~> 1.32.0', require: 'gitaly'
gem 'grpc', '~> 1.19.0' gem 'grpc', '~> 1.19.0'
......
...@@ -323,7 +323,7 @@ GEM ...@@ -323,7 +323,7 @@ GEM
gettext_i18n_rails (>= 0.7.1) gettext_i18n_rails (>= 0.7.1)
po_to_json (>= 1.0.0) po_to_json (>= 1.0.0)
rails (>= 3.2.0) rails (>= 3.2.0)
gitaly-proto (1.27.0) gitaly-proto (1.32.0)
grpc (~> 1.0) grpc (~> 1.0)
github-markup (1.7.0) github-markup (1.7.0)
gitlab-default_value_for (3.1.1) gitlab-default_value_for (3.1.1)
...@@ -1125,7 +1125,7 @@ DEPENDENCIES ...@@ -1125,7 +1125,7 @@ DEPENDENCIES
gettext (~> 3.2.2) gettext (~> 3.2.2)
gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.3) gettext_i18n_rails_js (~> 1.3)
gitaly-proto (~> 1.27.0) gitaly-proto (~> 1.32.0)
github-markup (~> 1.7.0) github-markup (~> 1.7.0)
gitlab-default_value_for (~> 3.1.1) gitlab-default_value_for (~> 3.1.1)
gitlab-labkit (~> 0.2.0) gitlab-labkit (~> 0.2.0)
......
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
eventHub.$emit('clearDetailIssue'); eventHub.$emit('clearDetailIssue');
} else { } else {
eventHub.$emit('newDetailIssue', this.issue); eventHub.$emit('newDetailIssue', this.issue);
boardsStore.detail.list = this.list; boardsStore.setListDetail(this.list);
} }
} }
}, },
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
$(this.$refs.submitButton).enable(); $(this.$refs.submitButton).enable();
boardsStore.setIssueDetail(issue); boardsStore.setIssueDetail(issue);
boardsStore.detail.list = this.list; boardsStore.setListDetail(this.list);
}) })
.catch(() => { .catch(() => {
// Need this because our jQuery very kindly disables buttons on ALL form submissions // Need this because our jQuery very kindly disables buttons on ALL form submissions
......
...@@ -207,6 +207,10 @@ const boardsStore = { ...@@ -207,6 +207,10 @@ const boardsStore = {
eventHub.$emit('updateTokens'); eventHub.$emit('updateTokens');
}, },
setListDetail(newList) {
this.detail.list = newList;
},
updateFiltersUrl() { updateFiltersUrl() {
window.history.pushState(null, null, `?${this.filter.path}`); window.history.pushState(null, null, `?${this.filter.path}`);
}, },
......
...@@ -211,11 +211,12 @@ export const scrollToLineIfNeededParallel = (_, line) => { ...@@ -211,11 +211,12 @@ export const scrollToLineIfNeededParallel = (_, line) => {
} }
}; };
export const loadCollapsedDiff = ({ commit, getters }, file) => export const loadCollapsedDiff = ({ commit, getters, state }, file) =>
axios axios
.get(file.load_collapsed_diff_url, { .get(file.load_collapsed_diff_url, {
params: { params: {
commit_id: getters.commitId, commit_id: getters.commitId,
w: state.showWhitespace ? '0' : '1',
}, },
}) })
.then(res => { .then(res => {
......
...@@ -565,6 +565,11 @@ GitLabDropdown = (function() { ...@@ -565,6 +565,11 @@ GitLabDropdown = (function() {
!$target.data('isLink') !$target.data('isLink')
) { ) {
e.stopPropagation(); e.stopPropagation();
// This prevents automatic scrolling to the top
if ($target.is('a')) {
return false;
}
} }
return true; return true;
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
data-container="body" data-container="body"
data-placement="right" data-placement="right"
type="button" type="button"
class="ide-sidebar-link js-ide-commit-mode" class="ide-sidebar-link js-ide-commit-mode qa-commit-mode-tab"
@click.prevent="changedActivityView($event, $options.activityBarViews.commit)" @click.prevent="changedActivityView($event, $options.activityBarViews.commit)"
> >
<icon name="commit" /> <icon name="commit" />
......
...@@ -134,6 +134,7 @@ export default { ...@@ -134,6 +134,7 @@ export default {
<template> <template>
<gl-modal <gl-modal
id="ide-new-entry" id="ide-new-entry"
class="qa-new-file-modal"
:header-title-text="modalTitle" :header-title-text="modalTitle"
:footer-primary-button-text="buttonLabel" :footer-primary-button-text="buttonLabel"
footer-primary-button-variant="success" footer-primary-button-variant="success"
......
...@@ -152,7 +152,7 @@ export function isSafeURL(url) { ...@@ -152,7 +152,7 @@ export function isSafeURL(url) {
try { try {
const parsedUrl = new URL(url, getBaseURL()); const parsedUrl = new URL(url, getBaseURL());
return ['http:', 'https:'].includes(parsedUrl.protocol); return ['http:', 'https:'].includes(parsedUrl.protocol);
} catch { } catch (e) {
return false; return false;
} }
} }
......
<script>
import { GlSingleStat } from '@gitlab/ui/dist/charts';
export default {
components: {
GlSingleStat,
},
inheritAttrs: false,
props: {
title: {
type: String,
required: true,
},
value: {
type: Number,
required: true,
},
unit: {
type: String,
required: true,
},
},
computed: {
valueWithUnit() {
return `${this.value}${this.unit}`;
},
},
};
</script>
<template>
<div class="prometheus-graph col-12 col-lg-6">
<div class="prometheus-graph-header">
<h5 ref="graphTitle" class="prometheus-graph-title">{{ title }}</h5>
</div>
<gl-single-stat :value="valueWithUnit" :title="title" variant="success" />
</div>
</template>
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
GlModalDirective, GlModalDirective,
}, },
props: { props: {
externalDashboardPath: { externalDashboardUrl: {
type: String, type: String,
required: false, required: false,
default: '', default: '',
...@@ -299,10 +299,11 @@ export default { ...@@ -299,10 +299,11 @@ export default {
</gl-modal> </gl-modal>
</div> </div>
<gl-button <gl-button
v-if="externalDashboardPath.length" v-if="externalDashboardUrl.length"
class="js-external-dashboard-link prepend-left-8" class="js-external-dashboard-link prepend-left-8"
variant="primary" variant="primary"
:href="externalDashboardPath" :href="externalDashboardUrl"
target="_blank"
> >
{{ __('View full dashboard') }} {{ __('View full dashboard') }}
<icon name="external-link" /> <icon name="external-link" />
......
<script> <script>
import { mapState, mapActions } from 'vuex';
import { GlButton, GlFormGroup, GlFormInput, GlLink } from '@gitlab/ui'; import { GlButton, GlFormGroup, GlFormInput, GlLink } from '@gitlab/ui';
export default { export default {
...@@ -8,17 +9,24 @@ export default { ...@@ -8,17 +9,24 @@ export default {
GlFormInput, GlFormInput,
GlLink, GlLink,
}, },
props: { computed: {
externalDashboardPath: { ...mapState([
type: String, 'externalDashboardHelpPagePath',
required: false, 'externalDashboardUrl',
default: '', 'operationsSettingsEndpoint',
}, ]),
externalDashboardHelpPagePath: { userDashboardUrl: {
type: String, get() {
required: true, return this.externalDashboardUrl;
},
set(url) {
this.setExternalDashboardUrl(url);
},
}, },
}, },
methods: {
...mapActions(['setExternalDashboardUrl', 'updateExternalDashboardUrl']),
},
}; };
</script> </script>
...@@ -45,11 +53,12 @@ export default { ...@@ -45,11 +53,12 @@ export default {
:description="s__('ExternalMetrics|Enter the URL of the dashboard you want to link to')" :description="s__('ExternalMetrics|Enter the URL of the dashboard you want to link to')"
> >
<gl-form-input <gl-form-input
:value="externalDashboardPath" v-model="userDashboardUrl"
placeholder="https://my-org.gitlab.io/my-dashboards" placeholder="https://my-org.gitlab.io/my-dashboards"
@keydown.enter.native.prevent="updateExternalDashboardUrl"
/> />
</gl-form-group> </gl-form-group>
<gl-button variant="success"> <gl-button variant="success" @click="updateExternalDashboardUrl">
{{ __('Save Changes') }} {{ __('Save Changes') }}
</gl-button> </gl-button>
</form> </form>
......
import Vue from 'vue'; import Vue from 'vue';
import store from './store';
import ExternalDashboardForm from './components/external_dashboard.vue'; import ExternalDashboardForm from './components/external_dashboard.vue';
export default () => { export default () => {
...@@ -14,13 +15,9 @@ export default () => { ...@@ -14,13 +15,9 @@ export default () => {
return new Vue({ return new Vue({
el, el,
store: store(el.dataset),
render(createElement) { render(createElement) {
return createElement(ExternalDashboardForm, { return createElement(ExternalDashboardForm);
props: {
...el.dataset,
expanded: false,
},
});
}, },
}); });
}; };
import axios from '~/lib/utils/axios_utils';
import { __ } from '~/locale';
import createFlash from '~/flash';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import * as mutationTypes from './mutation_types';
export const setExternalDashboardUrl = ({ commit }, url) =>
commit(mutationTypes.SET_EXTERNAL_DASHBOARD_URL, url);
export const updateExternalDashboardUrl = ({ state, dispatch }) =>
axios
.patch(state.operationsSettingsEndpoint, {
project: {
metrics_setting_attributes: {
external_dashboard_url: state.externalDashboardUrl,
},
},
})
.then(() => dispatch('receiveExternalDashboardUpdateSuccess'))
.catch(error => dispatch('receiveExternalDashboardUpdateError', error));
export const receiveExternalDashboardUpdateSuccess = () => {
/**
* The operations_controller currently handles successful requests
* by creating a flash banner messsage to notify the user.
*/
refreshCurrentPage();
};
export const receiveExternalDashboardUpdateError = (_, error) => {
const { response } = error;
const message = response.data && response.data.message ? response.data.message : '';
createFlash(`${__('There was an error saving your changes.')} ${message}`, 'alert');
};
// prevent babel-plugin-rewire from generating an invalid default during karma tests
export default () => {};
import Vue from 'vue';
import Vuex from 'vuex';
import createState from './state';
import * as actions from './actions';
import mutations from './mutations';
Vue.use(Vuex);
export const createStore = initialState =>
new Vuex.Store({
state: createState(initialState),
actions,
mutations,
});
export default createStore;
/* eslint-disable import/prefer-default-export */
export const SET_EXTERNAL_DASHBOARD_URL = 'SET_EXTERNAL_DASHBOARD_URL';
import * as types from './mutation_types';
export default {
[types.SET_EXTERNAL_DASHBOARD_URL](state, url) {
state.externalDashboardUrl = url;
},
};
export default (initialState = {}) => ({
externalDashboardUrl: initialState.externalDashboardUrl || '',
operationsSettingsEndpoint: initialState.operationsSettingsEndpoint,
externalDashboardHelpPagePath: initialState.externalDashboardHelpPagePath,
});
import initForm from '~/pages/projects/pages_domains/form';
document.addEventListener('DOMContentLoaded', initForm);
import setupToggleButtons from '~/toggle_buttons';
export default () => {
const toggleContainer = document.querySelector('.js-auto-ssl-toggle-container');
if (toggleContainer) {
const onToggleButtonClicked = isAutoSslEnabled => {
Array.from(document.querySelectorAll('.js-shown-if-auto-ssl')).forEach(el => {
if (isAutoSslEnabled) {
el.classList.remove('d-none');
} else {
el.classList.add('d-none');
}
});
Array.from(document.querySelectorAll('.js-shown-unless-auto-ssl')).forEach(el => {
if (isAutoSslEnabled) {
el.classList.add('d-none');
} else {
el.classList.remove('d-none');
}
});
Array.from(document.querySelectorAll('.js-enabled-if-auto-ssl')).forEach(el => {
if (isAutoSslEnabled) {
el.removeAttribute('disabled');
} else {
el.setAttribute('disabled', 'disabled');
}
});
Array.from(document.querySelectorAll('.js-enabled-unless-auto-ssl')).forEach(el => {
if (isAutoSslEnabled) {
el.setAttribute('disabled', 'disabled');
} else {
el.removeAttribute('disabled');
}
});
};
setupToggleButtons(toggleContainer, onToggleButtonClicked);
}
};
import initForm from '~/pages/projects/pages_domains/form';
document.addEventListener('DOMContentLoaded', initForm);
...@@ -381,6 +381,7 @@ $breadcrumb-min-height: 48px; ...@@ -381,6 +381,7 @@ $breadcrumb-min-height: 48px;
$home-panel-title-row-height: 64px; $home-panel-title-row-height: 64px;
$home-panel-avatar-mobile-size: 24px; $home-panel-avatar-mobile-size: 24px;
$gl-line-height: 16px; $gl-line-height: 16px;
$gl-line-height-20: 20px;
$gl-line-height-24: 24px; $gl-line-height-24: 24px;
$gl-line-height-14: 14px; $gl-line-height-14: 14px;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
border-bottom: 1px solid $white-normal; border-bottom: 1px solid $white-normal;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
position: relative; position: relative;
line-height: $gl-line-height; line-height: $gl-line-height-20;
.system-note-image { .system-note-image {
position: absolute; position: absolute;
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
} }
.event-user-info { .event-user-info {
margin-bottom: $gl-padding-8; margin-bottom: $gl-padding-4;
.author_name { .author_name {
a { a {
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
} }
.event-body { .event-body {
margin-top: $gl-padding-8; margin-top: $gl-padding-4;
margin-right: 174px; margin-right: 174px;
color: $gl-text-color; color: $gl-text-color;
......
...@@ -6,18 +6,14 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController ...@@ -6,18 +6,14 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
prepend_before_action(only: [:index]) { authenticate_sessionless_user!(:rss) } prepend_before_action(only: [:index]) { authenticate_sessionless_user!(:rss) }
before_action :set_non_archived_param before_action :set_non_archived_param
before_action :projects, only: [:index]
before_action :default_sorting before_action :default_sorting
skip_cross_project_access_check :index, :starred skip_cross_project_access_check :index, :starred
def index def index
@projects = load_projects(params.merge(non_public: true))
respond_to do |format| respond_to do |format|
format.html do format.html do
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/40260 render_projects
Gitlab::GitalyClient.allow_n_plus_1_calls do
render
end
end end
format.atom do format.atom do
load_events load_events
...@@ -51,6 +47,17 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController ...@@ -51,6 +47,17 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
private private
def projects
@projects ||= load_projects(params.merge(non_public: true))
end
def render_projects
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/40260
Gitlab::GitalyClient.allow_n_plus_1_calls do
render
end
end
def default_sorting def default_sorting
params[:sort] ||= 'latest_activity_desc' params[:sort] ||= 'latest_activity_desc'
@sort = params[:sort] @sort = params[:sort]
...@@ -81,3 +88,5 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController ...@@ -81,3 +88,5 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
Events::RenderService.new(current_user).execute(@events, atom_request: request.format.atom?) Events::RenderService.new(current_user).execute(@events, atom_request: request.format.atom?)
end end
end end
Dashboard::ProjectsController.prepend(EE::Dashboard::ProjectsController)
...@@ -65,11 +65,11 @@ class Projects::PagesDomainsController < Projects::ApplicationController ...@@ -65,11 +65,11 @@ class Projects::PagesDomainsController < Projects::ApplicationController
private private
def create_params def create_params
params.require(:pages_domain).permit(:key, :certificate, :domain) params.require(:pages_domain).permit(:key, :certificate, :domain, :auto_ssl_enabled)
end end
def update_params def update_params
params.require(:pages_domain).permit(:key, :certificate) params.require(:pages_domain).permit(:key, :certificate, :auto_ssl_enabled)
end end
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
......
...@@ -45,6 +45,31 @@ class GitlabSchema < GraphQL::Schema ...@@ -45,6 +45,31 @@ class GitlabSchema < GraphQL::Schema
super(query_str, **kwargs) super(query_str, **kwargs)
end end
def id_from_object(object)
unless object.respond_to?(:to_global_id)
# This is an error in our schema and needs to be solved. So raise a
# more meaningfull error message
raise "#{object} does not implement `to_global_id`. "\
"Include `GlobalID::Identification` into `#{object.class}"
end
object.to_global_id
end
def object_from_id(global_id)
gid = GlobalID.parse(global_id)
unless gid
raise Gitlab::Graphql::Errors::ArgumentError, "#{global_id} is not a valid GitLab id."
end
if gid.model_class < ApplicationRecord
Gitlab::Graphql::Loaders::BatchModelLoader.new(gid.model_class, gid.model_id).find
else
gid.find
end
end
private private
def max_query_complexity(ctx) def max_query_complexity(ctx)
......
...@@ -10,7 +10,7 @@ module Mutations ...@@ -10,7 +10,7 @@ module Mutations
required: true, required: true,
description: "The project the merge request to mutate is in" description: "The project the merge request to mutate is in"
argument :iid, GraphQL::ID_TYPE, argument :iid, GraphQL::STRING_TYPE,
required: true, required: true,
description: "The iid of the merge request to mutate" description: "The iid of the merge request to mutate"
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
module Resolvers module Resolvers
class IssuesResolver < BaseResolver class IssuesResolver < BaseResolver
argument :iid, GraphQL::ID_TYPE, argument :iid, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The IID of the issue, e.g., "1"' description: 'The IID of the issue, e.g., "1"'
argument :iids, [GraphQL::ID_TYPE], argument :iids, [GraphQL::STRING_TYPE],
required: false, required: false,
description: 'The list of IIDs of issues, e.g., [1, 2]' description: 'The list of IIDs of issues, e.g., [1, 2]'
argument :state, Types::IssuableStateEnum, argument :state, Types::IssuableStateEnum,
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
module Resolvers module Resolvers
class MergeRequestsResolver < BaseResolver class MergeRequestsResolver < BaseResolver
argument :iid, GraphQL::ID_TYPE, argument :iid, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The IID of the merge request, e.g., "1"' description: 'The IID of the merge request, e.g., "1"'
argument :iids, [GraphQL::ID_TYPE], argument :iids, [GraphQL::STRING_TYPE],
required: false, required: false,
description: 'The list of IIDs of issues, e.g., [1, 2]' description: 'The list of IIDs of issues, e.g., [1, 2]'
......
...@@ -6,5 +6,10 @@ module Types ...@@ -6,5 +6,10 @@ module Types
prepend Gitlab::Graphql::ExposePermissions prepend Gitlab::Graphql::ExposePermissions
field_class Types::BaseField field_class Types::BaseField
# All graphql fields exposing an id, should expose a global id.
def id
GitlabSchema.id_from_object(object)
end
end end
end end
...@@ -10,7 +10,7 @@ module Types ...@@ -10,7 +10,7 @@ module Types
expose_permissions Types::PermissionTypes::Ci::Pipeline expose_permissions Types::PermissionTypes::Ci::Pipeline
field :id, GraphQL::ID_TYPE, null: false field :id, GraphQL::ID_TYPE, null: false
field :iid, GraphQL::ID_TYPE, null: false field :iid, GraphQL::STRING_TYPE, null: false
field :sha, GraphQL::STRING_TYPE, null: false field :sha, GraphQL::STRING_TYPE, null: false
field :before_sha, GraphQL::STRING_TYPE, null: true field :before_sha, GraphQL::STRING_TYPE, null: true
......
...@@ -11,7 +11,7 @@ module Types ...@@ -11,7 +11,7 @@ module Types
present_using MergeRequestPresenter present_using MergeRequestPresenter
field :id, GraphQL::ID_TYPE, null: false field :id, GraphQL::ID_TYPE, null: false
field :iid, GraphQL::ID_TYPE, null: false field :iid, GraphQL::STRING_TYPE, null: false
field :title, GraphQL::STRING_TYPE, null: false field :title, GraphQL::STRING_TYPE, null: false
field :description, GraphQL::STRING_TYPE, null: true field :description, GraphQL::STRING_TYPE, null: true
field :state, MergeRequestStateEnum, null: false field :state, MergeRequestStateEnum, null: false
......
...@@ -243,6 +243,7 @@ module ProjectsHelper ...@@ -243,6 +243,7 @@ module ProjectsHelper
# TODO: Remove this method when removing the feature flag # TODO: Remove this method when removing the feature flag
# https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/11209#note_162234863 # https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/11209#note_162234863
# make sure to remove from the EE specific controller as well: ee/app/controllers/ee/dashboard/projects_controller.rb
def show_projects?(projects, params) def show_projects?(projects, params)
Feature.enabled?(:project_list_filter_bar) || !!(params[:personal] || params[:name] || any_projects?(projects)) Feature.enabled?(:project_list_filter_bar) || !!(params[:personal] || params[:name] || any_projects?(projects))
end end
......
# frozen_string_literal: true # frozen_string_literal: true
module Milestoneish module Milestoneish
def closed_items_count(user)
memoize_per_user(user, :closed_items_count) do
(count_issues_by_state(user)['closed'] || 0) + merge_requests.closed_and_merged.size
end
end
def total_items_count(user)
memoize_per_user(user, :total_items_count) do
total_issues_count(user) + merge_requests.size
end
end
def total_issues_count(user) def total_issues_count(user)
count_issues_by_state(user).values.sum count_issues_by_state(user).values.sum
end end
def closed_issues_count(user)
count_issues_by_state(user)['closed'].to_i
end
def complete?(user) def complete?(user)
total_items_count(user) > 0 && total_items_count(user) == closed_items_count(user) total_issues_count(user) > 0 && total_issues_count(user) == closed_issues_count(user)
end end
def percent_complete(user) def percent_complete(user)
((closed_items_count(user) * 100) / total_items_count(user)).abs closed_issues_count(user) * 100 / total_issues_count(user)
rescue ZeroDivisionError rescue ZeroDivisionError
0 0
end end
......
...@@ -77,7 +77,7 @@ class DiffNote < Note ...@@ -77,7 +77,7 @@ class DiffNote < Note
end end
def supports_suggestion? def supports_suggestion?
return false unless noteable.supports_suggestion? && on_text? return false unless noteable&.supports_suggestion? && on_text?
# We don't want to trigger side-effects of `diff_file` call. # We don't want to trigger side-effects of `diff_file` call.
return false unless file = latest_diff_file return false unless file = latest_diff_file
return false unless line = file.line_for_position(self.position) return false unless line = file.line_for_position(self.position)
......
...@@ -4,7 +4,6 @@ module Ci ...@@ -4,7 +4,6 @@ module Ci
class BuildRunnerPresenter < SimpleDelegator class BuildRunnerPresenter < SimpleDelegator
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
DEFAULT_GIT_DEPTH_MERGE_REQUEST = 10
RUNNER_REMOTE_TAG_PREFIX = 'refs/tags/'.freeze RUNNER_REMOTE_TAG_PREFIX = 'refs/tags/'.freeze
RUNNER_REMOTE_BRANCH_PREFIX = 'refs/remotes/origin/'.freeze RUNNER_REMOTE_BRANCH_PREFIX = 'refs/remotes/origin/'.freeze
...@@ -28,7 +27,6 @@ module Ci ...@@ -28,7 +27,6 @@ module Ci
def git_depth def git_depth
strong_memoize(:git_depth) do strong_memoize(:git_depth) do
git_depth = variables&.find { |variable| variable[:key] == 'GIT_DEPTH' }&.dig(:value) git_depth = variables&.find { |variable| variable[:key] == 'GIT_DEPTH' }&.dig(:value)
git_depth ||= DEFAULT_GIT_DEPTH_MERGE_REQUEST if merge_request_ref?
git_depth.to_i git_depth.to_i
end end
end end
...@@ -39,12 +37,13 @@ module Ci ...@@ -39,12 +37,13 @@ module Ci
if git_depth > 0 if git_depth > 0
specs << refspec_for_branch(ref) if branch? || legacy_detached_merge_request_pipeline? specs << refspec_for_branch(ref) if branch? || legacy_detached_merge_request_pipeline?
specs << refspec_for_tag(ref) if tag? specs << refspec_for_tag(ref) if tag?
specs << refspec_for_merge_request_ref if merge_request_ref?
else else
specs << refspec_for_branch specs << refspec_for_branch
specs << refspec_for_tag specs << refspec_for_tag
end end
specs << refspec_for_merge_request_ref if merge_request_ref?
specs specs
end end
......
...@@ -10,4 +10,6 @@ ...@@ -10,4 +10,6 @@
= render 'layouts/page', sidebar: sidebar, nav: nav = render 'layouts/page', sidebar: sidebar, nav: nav
= footer_message = footer_message
= render_if_exists "shared/onboarding_guide"
= yield :scripts_body = yield :scripts_body
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
.form-group.row.initialize-with-readme-setting .form-group.row.initialize-with-readme-setting
%div{ :class => "col-sm-12" } %div{ :class => "col-sm-12" }
.form-check .form-check
= check_box_tag 'project[initialize_with_readme]', '1', false, class: 'form-check-input', data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "init_with_readme" } = check_box_tag 'project[initialize_with_readme]', '1', false, class: 'form-check-input qa-initialize-with-readme-checkbox', data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "init_with_readme" }
= label_tag 'project[initialize_with_readme]', class: 'form-check-label' do = label_tag 'project[initialize_with_readme]', class: 'form-check-label' do
.option-title .option-title
%strong Initialize repository with a README %strong Initialize repository with a README
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
= render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project = render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project
- if can?(current_user, :read_issue, @project) && @milestone.total_items_count(current_user).zero? - if can?(current_user, :read_issue, @project) && @milestone.total_issues_count(current_user).zero?
.alert.alert-success.prepend-top-default .alert.alert-success.prepend-top-default
%span= _('Assign some issues to this milestone.') %span= _('Assign some issues to this milestone.')
- elsif @milestone.complete?(current_user) && @milestone.active? - elsif @milestone.complete?(current_user) && @milestone.active?
......
- if @domain.errors.any? - if @domain.errors.any?
#error_explanation .alert.alert-danger
.alert.alert-danger - @domain.errors.full_messages.each do |msg|
- @domain.errors.full_messages.each do |msg| = msg
%p= msg
.form-group.row .form-group.row
.col-sm-2.col-form-label .col-sm-2.col-form-label
= f.label :domain, _("Domain") = f.label :domain, _("Domain")
.col-sm-10 .col-sm-10
= f.text_field :domain, required: true, autocomplete: 'off', class: 'form-control', disabled: @domain.persisted? = f.text_field :domain, required: true, autocomplete: "off", class: "form-control", disabled: @domain.persisted?
- if Gitlab.config.pages.external_https - if Gitlab.config.pages.external_https
.form-group.row
.col-sm-2.col-form-label - auto_ssl_available = Feature.enabled?(:pages_auto_ssl)
= f.label :certificate, _("Certificate (PEM)") - auto_ssl_enabled = @domain.auto_ssl_enabled?
.col-sm-10 - auto_ssl_available_and_enabled = auto_ssl_available && auto_ssl_enabled
= f.text_area :certificate, rows: 5, class: 'form-control'
%span.help-inline= _("Upload a certificate for your domain with all intermediates") - if auto_ssl_available
.form-group.row
.form-group.row .col-sm-2.col-form-label
.col-sm-2.col-form-label %label{ for: "pages_domain_auto_ssl_enabled_button" }
= f.label :key, _("Key (PEM)") - lets_encrypt_link_url = "https://letsencrypt.org/"
.col-sm-10 - lets_encrypt_link_start = "<a href=\"%{lets_encrypt_link_url}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-nowrap\">".html_safe % { lets_encrypt_link_url: lets_encrypt_link_url }
= f.text_area :key, rows: 5, class: 'form-control' - lets_encrypt_link_end = "</a>".html_safe
%span.help-inline= _("Upload a private key for your certificate") = _("Automatic certificate management using %{lets_encrypt_link_start}Let's Encrypt%{lets_encrypt_link_end}").html_safe % { lets_encrypt_link_start: lets_encrypt_link_start, lets_encrypt_link_end: lets_encrypt_link_end }
.col-sm-10.js-auto-ssl-toggle-container
%button{ type: "button", id: "pages_domain_auto_ssl_enabled_button",
class: "js-project-feature-toggle project-feature-toggle mt-2 #{"is-checked" if auto_ssl_available_and_enabled}",
"aria-label": _("Automatic certificate management using Let's Encrypt") }
= f.hidden_field :auto_ssl_enabled?, class: "js-project-feature-toggle-input"
%span.toggle-icon
= sprite_icon("status_success_borderless", size: 16, css_class: "toggle-icon-svg toggle-status-checked")
= sprite_icon("status_failed_borderless", size: 16, css_class: "toggle-icon-svg toggle-status-unchecked")
%p.text-secondary.mt-3
- docs_link_url = help_page_path("user/project/pages/lets_encrypt_for_gitlab_pages.md", anchor: "lets-encrypt-for-gitlab-pages")
- docs_link_start = "<a href=\"%{docs_link_url}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-nowrap\">".html_safe % { docs_link_url: docs_link_url }
- docs_link_end = "</a>".html_safe
= _("Let's Encrypt is a free, automated, and open certificate authority (CA) that gives digital certificates in order to enable HTTPS (SSL/TLS) for websites. Learn more about Let's Encrypt configuration by following the %{docs_link_start}documentation on GitLab Pages%{docs_link_end}.").html_safe % { docs_link_url: docs_link_url, docs_link_start: docs_link_start, docs_link_end: docs_link_end }
.js-shown-if-auto-ssl{ class: ("d-none" unless auto_ssl_available_and_enabled) }
.form-group.row
.col-sm-2.col-form-label
= f.label :certificate, _("Certificate (PEM)")
.col-sm-10
- if auto_ssl_available_and_enabled && !@domain.certificate.empty?
= f.text_area :certificate,
rows: 5,
class: "form-control",
disabled: true
%span.help-inline.text-muted= _("This certificate is automatically managed by Let's Encrypt")
- else
%p.text-secondary.form-control-plaintext= _("The certificate will be shown here once it has been obtained from Let's Encrypt. This process may take up to an hour to complete.")
.js-shown-unless-auto-ssl{ class: ("d-none" if auto_ssl_available_and_enabled) }
.form-group.row
.col-sm-2.col-form-label
= f.label :certificate, _("Certificate (PEM)")
.col-sm-10
= f.text_area :certificate,
rows: 5,
class: "form-control js-enabled-unless-auto-ssl",
value: (@domain.certificate unless auto_ssl_available_and_enabled),
disabled: auto_ssl_available_and_enabled
%span.help-inline.text-muted= _("Upload a certificate for your domain with all intermediates")
.form-group.row
.col-sm-2.col-form-label
= f.label :key, _("Key (PEM)")
.col-sm-10
= f.text_area :key,
rows: 5,
class: "form-control js-enabled-unless-auto-ssl",
value: (@domain.key unless auto_ssl_available_and_enabled),
disabled: auto_ssl_available_and_enabled
%span.help-inline.text-muted= _("Upload a private key for your certificate")
- else - else
.nothing-here-block .nothing-here-block
= _("Support for custom certificates is disabled. Ask your system's administrator to enable it.") = _("Support for custom certificates is disabled. Ask your system's administrator to enable it.")
- docs_link_url = help_page_path("user/project/pages/getting_started_part_three.md", anchor: "adding-certificates-to-your-project")
- docs_link_start = "<a href=\"%{docs_link_url}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-nowrap\">".html_safe % { docs_link_url: docs_link_url }
- docs_link_end = "</a>".html_safe
-# Hiding behind a feature flag to avoid any changes to this feature's implemention
-# when the :pages_auto_ssl feature flag is disabled. This check should be removed
-# once the :pages_auto_ssl feature flag is removed.
- if Feature.enabled?(:pages_auto_ssl)
%p= _("Learn more about adding certificates to your project by following the %{docs_link_start}documentation on GitLab Pages%{docs_link_end}.").html_safe % { docs_link_url: docs_link_url, docs_link_start: docs_link_start, docs_link_end: docs_link_end }
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
- page_title @domain.domain - page_title @domain.domain
%h3.page-title %h3.page-title
= @domain.domain = @domain.domain
= render 'projects/pages_domains/helper_text'
%hr.clearfix %hr.clearfix
%div %div
= form_for [@project.namespace.becomes(Namespace), @project, @domain], html: { class: 'fieldset-form' } do |f| = form_for [@project.namespace.becomes(Namespace), @project, @domain], html: { class: 'fieldset-form' } do |f|
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
- page_title _('New Pages Domain') - page_title _('New Pages Domain')
%h3.page-title %h3.page-title
= _("New Pages Domain") = _("New Pages Domain")
= render 'projects/pages_domains/helper_text'
%hr.clearfix %hr.clearfix
%div %div
= form_for [@project.namespace.becomes(Namespace), @project, @domain], html: { class: 'fieldset-form' } do |f| = form_for [@project.namespace.becomes(Namespace), @project, @domain], html: { class: 'fieldset-form' } do |f|
......
.js-operation-settings{ data: { external_dashboard: { path: metrics_external_dashboard_url, .js-operation-settings{ data: { operations_settings_endpoint: project_settings_operations_path(@project),
external_dashboard: { url: metrics_external_dashboard_url,
help_page_path: help_page_path('user/project/operations/link_to_external_dashboard') } } } help_page_path: help_page_path('user/project/operations/link_to_external_dashboard') } } }
...@@ -7,11 +7,4 @@ ...@@ -7,11 +7,4 @@
%p %p
= _("You are receiving this message because you are a GitLab administrator for %{url}.") % { url: Gitlab.config.gitlab.url } = _("You are receiving this message because you are a GitLab administrator for %{url}.") % { url: Gitlab.config.gitlab.url }
-# EE-specific start = render_if_exists 'repository_check_mailer/email_additional_text'
- if Gitlab::CurrentSettings.email_additional_text.present?
%p
&mdash;
%br
%br
= Gitlab::Utils.nlbr(Gitlab::CurrentSettings.email_additional_text)
-# EE-specific end
...@@ -5,6 +5,8 @@ class PagesDomainVerificationCronWorker ...@@ -5,6 +5,8 @@ class PagesDomainVerificationCronWorker
include CronjobQueue include CronjobQueue
def perform def perform
return if Gitlab::Database.read_only?
PagesDomain.needs_verification.find_each do |domain| PagesDomain.needs_verification.find_each do |domain|
PagesDomainVerificationWorker.perform_async(domain.id) PagesDomainVerificationWorker.perform_async(domain.id)
end end
......
...@@ -5,6 +5,8 @@ class PagesDomainVerificationWorker ...@@ -5,6 +5,8 @@ class PagesDomainVerificationWorker
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def perform(domain_id) def perform(domain_id)
return if Gitlab::Database.read_only?
domain = PagesDomain.find_by(id: domain_id) domain = PagesDomain.find_by(id: domain_id)
return unless domain return unless domain
......
---
title: Add auto SSL toggle option to Pages domain settings page
merge_request: 26438
author:
type: added
---
title: Fix whitespace changes visibility when the related file was initially collapsed
merge_request: 28950
author: Ondřej Budai
type: fixed
---
title: Add support for multiple job parents in GitLab CI YAML.
merge_request: 26801
author: Wolphin (Nikita)
type: added
---
title: Enhance line-height of Activity feed UI
merge_request: 28856
author: Jacopo Beschi @jacopo-beschi
type: changed
---
title: Eliminate color inconsistencies in metric graphs
merge_request: 29127
author:
type: fixed
---
title: Fix label click scrolling to top
merge_request: 29202
author:
type: fixed
---
title: Fix connection to Tiller error while uninstalling
merge_request: 29131
author:
type: fixed
---
title: Adjust milestone completion rate to be based on issues count.
merge_request: 28777
author:
type: changed
---
title: Bump Helm version in Auto-DevOps.gitlab-ci.yml to 2.14.0
merge_request: 28527
author:
type: other
---
title: Use global IDs when exposing GraphQL resources
merge_request: 29080
author:
type: added
---
title: Avoid 500 when rendering users ATOM data
merge_request: 25408
author:
type: fixed
---
title: Remove a default git depth in Pipelines for merge requests
merge_request: 28926
author:
type: fixed
...@@ -27,7 +27,7 @@ The steps below cover: ...@@ -27,7 +27,7 @@ The steps below cover:
'Entire domain (GitLab)' or 'Selected organizational units' for both 'Verify user 'Entire domain (GitLab)' or 'Selected organizational units' for both 'Verify user
credentials' and 'Read user information'. Select 'Add LDAP Client' credentials' and 'Read user information'. Select 'Add LDAP Client'
TIP: **Tip:** If you plan to use GitLab [LDAP Group Sync](https://docs.gitlab.com/ee/administration/auth/ldap-ee.html#group-sync) TIP: **Tip:** If you plan to use GitLab [LDAP Group Sync](ldap-ee.md#group-sync)
, turn on 'Read group information'. , turn on 'Read group information'.
![Add LDAP Client Step 2](img/google_secure_ldap_add_step_2.png) ![Add LDAP Client Step 2](img/google_secure_ldap_add_step_2.png)
......
...@@ -12,7 +12,7 @@ GitLab’s [security features](../security/README.md) may also help you meet rel ...@@ -12,7 +12,7 @@ GitLab’s [security features](../security/README.md) may also help you meet rel
|**[Email all users of a project, group, or entire server](../user/admin_area/settings/terms.md)**<br>An admin can email groups of users based on project or group membership, or email everyone using the GitLab instance. This is great for scheduled maintenance or upgrades.|Starter+|| |**[Email all users of a project, group, or entire server](../user/admin_area/settings/terms.md)**<br>An admin can email groups of users based on project or group membership, or email everyone using the GitLab instance. This is great for scheduled maintenance or upgrades.|Starter+||
|**[Omnibus package supports log forwarding](https://docs.gitlab.com/omnibus/settings/logs.html#udp-log-forwarding)**<br>Forward your logs to a central system.|Starter+|| |**[Omnibus package supports log forwarding](https://docs.gitlab.com/omnibus/settings/logs.html#udp-log-forwarding)**<br>Forward your logs to a central system.|Starter+||
|**[Lock project membership to group](../user/group/index.md#member-lock-starter)**<br>Group owners can prevent new members from being added to projects within a group.|Starter+|✓| |**[Lock project membership to group](../user/group/index.md#member-lock-starter)**<br>Group owners can prevent new members from being added to projects within a group.|Starter+|✓|
|**[LDAP group sync](https://docs.gitlab.com/ee/administration/auth/ldap-ee.html#group-sync)**<br>GitLab Enterprise Edition gives admins the ability to automatically sync groups and manage SSH keys, permissions, and authentication, so you can focus on building your product, not configuring your tools.|Starter+|| |**[LDAP group sync](auth/ldap-ee.md#group-sync)**<br>GitLab Enterprise Edition gives admins the ability to automatically sync groups and manage SSH keys, permissions, and authentication, so you can focus on building your product, not configuring your tools.|Starter+||
|**[LDAP group sync filters](https://docs.gitlab.com/ee/administration/auth/ldap-ee.html#group-sync)**<br>GitLab Enterprise Edition Premium gives more flexibility to synchronize with LDAP based on filters, meaning you can leverage LDAP attributes to map GitLab permissions.|Premium+|| |**[LDAP group sync filters](auth/ldap-ee.md#group-sync)**<br>GitLab Enterprise Edition Premium gives more flexibility to synchronize with LDAP based on filters, meaning you can leverage LDAP attributes to map GitLab permissions.|Premium+||
|**[Audit logs](audit_events.md)**<br>To maintain the integrity of your code, GitLab Enterprise Edition Premium gives admins the ability to view any modifications made within the GitLab server in an advanced audit log system, so you can control, analyze and track every change.|Premium+|| |**[Audit logs](audit_events.md)**<br>To maintain the integrity of your code, GitLab Enterprise Edition Premium gives admins the ability to view any modifications made within the GitLab server in an advanced audit log system, so you can control, analyze and track every change.|Premium+||
|**[Auditor users](auditor_users.md)**<br>Auditor users are users who are given read-only access to all projects, groups, and other resources on the GitLab instance.|Premium+|| |**[Auditor users](auditor_users.md)**<br>Auditor users are users who are given read-only access to all projects, groups, and other resources on the GitLab instance.|Premium+||
...@@ -5,11 +5,11 @@ Custom Git hooks must be configured on the filesystem of the GitLab ...@@ -5,11 +5,11 @@ Custom Git hooks must be configured on the filesystem of the GitLab
server. Only GitLab server administrators will be able to complete these tasks. server. Only GitLab server administrators will be able to complete these tasks.
Please explore [webhooks] and [CI] as an option if you do not Please explore [webhooks] and [CI] as an option if you do not
have filesystem access. For a user configurable Git hook interface, see have filesystem access. For a user configurable Git hook interface, see
[Push Rules](https://docs.gitlab.com/ee/push_rules/push_rules.html), [Push Rules](../push_rules/push_rules.md),
available in GitLab Enterprise Edition. available in GitLab Enterprise Edition.
NOTE: **Note:** NOTE: **Note:**
Custom Git hooks won't be replicated to secondary nodes if you use [GitLab Geo][gitlab-geo] Custom Git hooks won't be replicated to secondary nodes if you use [GitLab Geo](geo/replication/index.md)
Git natively supports hooks that are executed on different actions. Git natively supports hooks that are executed on different actions.
Examples of server-side git hooks include pre-receive, post-receive, and update. Examples of server-side git hooks include pre-receive, post-receive, and update.
...@@ -123,6 +123,5 @@ exit 1 ...@@ -123,6 +123,5 @@ exit 1
[CI]: ../ci/README.md [CI]: ../ci/README.md
[hooks]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#Server-Side-Hooks [hooks]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#Server-Side-Hooks
[webhooks]: ../user/project/integrations/webhooks.md [webhooks]: ../user/project/integrations/webhooks.md
[gitlab-geo]: https://docs.gitlab.com/ee/administration/geo/replication/index.html
[5073]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5073 [5073]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5073
[93]: https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/93 [93]: https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/93
...@@ -113,7 +113,7 @@ If any objects are failing to replicate, this should be investigated before ...@@ -113,7 +113,7 @@ If any objects are failing to replicate, this should be investigated before
scheduling the maintenance window. Following a planned failover, anything that scheduling the maintenance window. Following a planned failover, anything that
failed to replicate will be **lost**. failed to replicate will be **lost**.
You can use the [Geo status API](https://docs.gitlab.com/ee/api/geo_nodes.html#retrieve-project-sync-or-verification-failures-that-occurred-on-the-current-node) to review failed objects and You can use the [Geo status API](../../../api/geo_nodes.md#retrieve-project-sync-or-verification-failures-that-occurred-on-the-current-node) to review failed objects and
the reasons for failure. the reasons for failure.
A common cause of replication failures is the data being missing on the A common cause of replication failures is the data being missing on the
......
...@@ -445,7 +445,7 @@ The replication process is now complete. ...@@ -445,7 +445,7 @@ The replication process is now complete.
PostgreSQL connections. We recommend using PGBouncer if you use GitLab in a PostgreSQL connections. We recommend using PGBouncer if you use GitLab in a
high-availability configuration with a cluster of nodes supporting a Geo high-availability configuration with a cluster of nodes supporting a Geo
**primary** node and another cluster of nodes supporting a Geo **secondary** node. For more **primary** node and another cluster of nodes supporting a Geo **secondary** node. For more
information, see the [Omnibus HA](https://docs.gitlab.com/ee/administration/high_availability/database.html#configure-using-omnibus-for-high-availability) information, see the [Omnibus HA](../../high_availability/database.md#configure-using-omnibus)
documentation. documentation.
For a Geo **secondary** node to work properly with PGBouncer in front of the database, For a Geo **secondary** node to work properly with PGBouncer in front of the database,
......
...@@ -129,7 +129,7 @@ To configure the connection to the external read-replica database and enable Log ...@@ -129,7 +129,7 @@ To configure the connection to the external read-replica database and enable Log
database to keep track of replication status and automatically recover from database to keep track of replication status and automatically recover from
potential replication issues. Omnibus automatically configures a tracking database potential replication issues. Omnibus automatically configures a tracking database
when `roles ['geo_secondary_role']` is set. For high availability, when `roles ['geo_secondary_role']` is set. For high availability,
refer to [Geo High Availability](https://docs.gitlab.com/ee/administration/high_availability). refer to [Geo High Availability](../../high_availability/README.md).
If you want to run this database external to Omnibus, please follow the instructions below. If you want to run this database external to Omnibus, please follow the instructions below.
The tracking database requires an [FDW](https://www.postgresql.org/docs/9.6/static/postgres-fdw.html) The tracking database requires an [FDW](https://www.postgresql.org/docs/9.6/static/postgres-fdw.html)
......
...@@ -6,7 +6,7 @@ described, it is possible to adapt these instructions to your needs. ...@@ -6,7 +6,7 @@ described, it is possible to adapt these instructions to your needs.
## Architecture overview ## Architecture overview
![Geo HA Diagram](https://docs.gitlab.com/ee/administration/img/high_availability/geo-ha-diagram.png) ![Geo HA Diagram](../../high_availability/img/geo-ha-diagram.png)
_[diagram source - gitlab employees only][diagram-source]_ _[diagram source - gitlab employees only][diagram-source]_
...@@ -68,7 +68,7 @@ NOTE: **Note:** PostgreSQL and Redis should have already been disabled on the ...@@ -68,7 +68,7 @@ NOTE: **Note:** PostgreSQL and Redis should have already been disabled on the
application servers, and connections from the application servers to those application servers, and connections from the application servers to those
services on the backend servers configured, during normal GitLab HA set up. See services on the backend servers configured, during normal GitLab HA set up. See
high availability configuration documentation for high availability configuration documentation for
[PostgreSQL](https://docs.gitlab.com/ee/administration/high_availability/database.html#configuring-the-application-nodes) [PostgreSQL](../../high_availability/database.md#configuring-the-application-nodes)
and [Redis](../../high_availability/redis.md#example-configuration-for-the-gitlab-application). and [Redis](../../high_availability/redis.md#example-configuration-for-the-gitlab-application).
The **primary** database will require modification later, as part of The **primary** database will require modification later, as part of
......
...@@ -179,7 +179,7 @@ The steps below should be followed in the order they appear. **Make sure the Git ...@@ -179,7 +179,7 @@ The steps below should be followed in the order they appear. **Make sure the Git
If you installed GitLab using the Omnibus packages (highly recommended): If you installed GitLab using the Omnibus packages (highly recommended):
1. [Install GitLab Enterprise Edition](https://about.gitlab.com/installation/) on the server that will serve as the **secondary** node. Do not create an account or log in to the new **secondary** node. 1. [Install GitLab Enterprise Edition](https://about.gitlab.com/installation/) on the server that will serve as the **secondary** node. Do not create an account or log in to the new **secondary** node.
1. [Upload the GitLab License](https://docs.gitlab.com/ee/user/admin_area/license.html) on the **primary** node to unlock Geo. The license must be for [GitLab Premium](https://about.gitlab.com/pricing/) or higher. 1. [Upload the GitLab License](../../../user/admin_area/license.md) on the **primary** node to unlock Geo. The license must be for [GitLab Premium](https://about.gitlab.com/pricing/) or higher.
1. [Set up the database replication](database.md) (`primary (read-write) <-> secondary (read-only)` topology). 1. [Set up the database replication](database.md) (`primary (read-write) <-> secondary (read-only)` topology).
1. [Configure fast lookup of authorized SSH keys in the database](../../operations/fast_ssh_key_lookup.md). This step is required and needs to be done on **both** the **primary** and **secondary** nodes. 1. [Configure fast lookup of authorized SSH keys in the database](../../operations/fast_ssh_key_lookup.md). This step is required and needs to be done on **both** the **primary** and **secondary** nodes.
1. [Configure GitLab](configuration.md) to set the **primary** and **secondary** nodes. 1. [Configure GitLab](configuration.md) to set the **primary** and **secondary** nodes.
...@@ -261,7 +261,7 @@ Take special note that these examples of GitLab features are both: ...@@ -261,7 +261,7 @@ Take special note that these examples of GitLab features are both:
Examples include: Examples include:
- [Elasticsearch integration](https://docs.gitlab.com/ee/integration/elasticsearch.html). - [Elasticsearch integration](../../../integration/elasticsearch.md).
- [Container Registry](../../container_registry.md). [Object Storage](object_storage.md) can mitigate this. - [Container Registry](../../container_registry.md). [Object Storage](object_storage.md) can mitigate this.
- [GitLab Pages](../../pages/index.md). - [GitLab Pages](../../pages/index.md).
- [Mattermost integration](https://docs.gitlab.com/omnibus/gitlab-mattermost/). - [Mattermost integration](https://docs.gitlab.com/omnibus/gitlab-mattermost/).
......
...@@ -13,5 +13,5 @@ However, this may not lead to more downloads in parallel unless the number of ...@@ -13,5 +13,5 @@ However, this may not lead to more downloads in parallel unless the number of
available Sidekiq threads is also increased. For example, if repository sync available Sidekiq threads is also increased. For example, if repository sync
capacity is increased from 25 to 50, you may also want to increase the number capacity is increased from 25 to 50, you may also want to increase the number
of Sidekiq threads from 25 to 50. See the of Sidekiq threads from 25 to 50. See the
[Sidekiq concurrency documentation](https://docs.gitlab.com/ee/administration/operations/extra_sidekiq_processes.html#number-of-threads) [Sidekiq concurrency documentation](../../operations/extra_sidekiq_processes.md#number-of-threads)
for more details. for more details.
...@@ -73,10 +73,10 @@ Complete the following installation steps in order. A link at the end of each ...@@ -73,10 +73,10 @@ Complete the following installation steps in order. A link at the end of each
section will bring you back to the Scalable Architecture Examples section so section will bring you back to the Scalable Architecture Examples section so
you can continue with the next step. you can continue with the next step.
1. [PostgreSQL](./database.md#postgresql-in-a-scaled-environment) 1. [PostgreSQL](database.md#postgresql-in-a-scaled-environment)
1. [Redis](./redis.md#redis-in-a-scaled-environment) 1. [Redis](redis.md#redis-in-a-scaled-environment)
1. [Gitaly](./gitaly.md) (recommended) or [NFS](./nfs.md) 1. [Gitaly](gitaly.md) (recommended) or [NFS](nfs.md)
1. [GitLab application nodes](./gitlab.md) 1. [GitLab application nodes](gitlab.md)
### Full Scaling ### Full Scaling
......
...@@ -17,9 +17,9 @@ If you use a cloud-managed service, or provide your own PostgreSQL: ...@@ -17,9 +17,9 @@ If you use a cloud-managed service, or provide your own PostgreSQL:
## PostgreSQL in a Scaled Environment ## PostgreSQL in a Scaled Environment
This section is relevant for [Scaled Architecture](./README.md#scalable-architecture-examples) This section is relevant for [Scaled Architecture](README.md#scalable-architecture-examples)
environments including [Basic Scaling](./README.md#basic-scaling) and environments including [Basic Scaling](README.md#basic-scaling) and
[Full Scaling](./README.md#full-scaling). [Full Scaling](README.md#full-scaling).
### Provide your own PostgreSQL instance **[CORE ONLY]** ### Provide your own PostgreSQL instance **[CORE ONLY]**
...@@ -87,14 +87,14 @@ Advanced configuration options are supported and can be added if ...@@ -87,14 +87,14 @@ Advanced configuration options are supported and can be added if
needed. needed.
Continue configuration of other components by going Continue configuration of other components by going
[back to Scaled Architectures](./README.md#scalable-architecture-examples) [back to Scaled Architectures](README.md#scalable-architecture-examples)
## PostgreSQL with High Availability ## PostgreSQL with High Availability
This section is relevant for [High Availability Architecture](./README.md#high-availability-architecture-examples) This section is relevant for [High Availability Architecture](README.md#high-availability-architecture-examples)
environments including [Horizontal](./README.md#horizontal), environments including [Horizontal](README.md#horizontal),
[Hybrid](./README.md#hybrid), and [Hybrid](README.md#hybrid), and
[Fully Distributed](./README.md#fully-distributed). [Fully Distributed](README.md#fully-distributed).
### Provide your own PostgreSQL instance **[CORE ONLY]** ### Provide your own PostgreSQL instance **[CORE ONLY]**
......
...@@ -7,8 +7,8 @@ should consider using Gitaly on a separate node. ...@@ -7,8 +7,8 @@ should consider using Gitaly on a separate node.
See the [Gitaly HA Epic](https://gitlab.com/groups/gitlab-org/-/epics/289) to See the [Gitaly HA Epic](https://gitlab.com/groups/gitlab-org/-/epics/289) to
track plans and progress toward high availability support. track plans and progress toward high availability support.
This document is relevant for [Scaled Architecture](./README.md#scalable-architecture-examples) This document is relevant for [Scaled Architecture](README.md#scalable-architecture-examples)
environments and [High Availability Architecture](./README.md#high-availability-architecture-examples). environments and [High Availability Architecture](README.md#high-availability-architecture-examples).
## Running Gitaly on its own server ## Running Gitaly on its own server
...@@ -17,5 +17,5 @@ in Gitaly documentation. ...@@ -17,5 +17,5 @@ in Gitaly documentation.
Continue configuration of other components by going back to: Continue configuration of other components by going back to:
- [Scaled Architectures](./README.md#scalable-architecture-examples) - [Scaled Architectures](README.md#scalable-architecture-examples)
- [High Availability Architectures](./README.md#high-availability-architecture-examples) - [High Availability Architectures](README.md#high-availability-architecture-examples)
...@@ -122,7 +122,7 @@ Additionally, this configuration is specifically warned against in the ...@@ -122,7 +122,7 @@ Additionally, this configuration is specifically warned against in the
>to the NFS server can cause data corruption problems. >to the NFS server can cause data corruption problems.
For supported database architecture, please see our documentation on For supported database architecture, please see our documentation on
[Configuring a Database for GitLab HA](https://docs.gitlab.com/ee/administration/high_availability/database.html). [Configuring a Database for GitLab HA](database.md).
## NFS Client mount options ## NFS Client mount options
......
...@@ -16,9 +16,9 @@ These will be necessary when configuring the GitLab application servers later. ...@@ -16,9 +16,9 @@ These will be necessary when configuring the GitLab application servers later.
## Redis in a Scaled Environment ## Redis in a Scaled Environment
This section is relevant for [Scaled Architecture](./README.md#scalable-architecture-examples) This section is relevant for [Scaled Architecture](README.md#scalable-architecture-examples)
environments including [Basic Scaling](./README.md#basic-scaling) and environments including [Basic Scaling](README.md#basic-scaling) and
[Full Scaling](./README.md#full-scaling). [Full Scaling](README.md#full-scaling).
### Provide your own Redis instance **[CORE ONLY]** ### Provide your own Redis instance **[CORE ONLY]**
...@@ -34,7 +34,7 @@ In this configuration Redis is not highly available, and represents a single ...@@ -34,7 +34,7 @@ In this configuration Redis is not highly available, and represents a single
point of failure. However, in a scaled environment the objective is to allow point of failure. However, in a scaled environment the objective is to allow
the environment to handle more users or to increase throughput. Redis itself the environment to handle more users or to increase throughput. Redis itself
is generally stable and can handle many requests so it is an acceptable is generally stable and can handle many requests so it is an acceptable
trade off to have only a single instance. See [Scaling and High Availability](./README.md) trade off to have only a single instance. See [Scaling and High Availability](README.md)
for an overview of GitLab scaling and high availability options. for an overview of GitLab scaling and high availability options.
The steps below are the minimum necessary to configure a Redis server with The steps below are the minimum necessary to configure a Redis server with
...@@ -79,14 +79,14 @@ Advanced configuration options are supported and can be added if ...@@ -79,14 +79,14 @@ Advanced configuration options are supported and can be added if
needed. needed.
Continue configuration of other components by going Continue configuration of other components by going
[back to Scaled Architectures](./README.md#scalable-architecture-examples) [back to Scaled Architectures](README.md#scalable-architecture-examples)
## Redis with High Availability ## Redis with High Availability
This section is relevant for [High Availability Architecture](./README.md#high-availability-architecture-examples) This section is relevant for [High Availability Architecture](README.md#high-availability-architecture-examples)
environments including [Horizontal](./README.md#horizontal), environments including [Horizontal](README.md#horizontal),
[Hybrid](./README.md#hybrid), and [Hybrid](README.md#hybrid), and
[Fully Distributed](./README.md#fully-distributed). [Fully Distributed](README.md#fully-distributed).
### Provide your own Redis instance **[CORE ONLY]** ### Provide your own Redis instance **[CORE ONLY]**
......
...@@ -10,7 +10,7 @@ GitLab has several features based on receiving incoming emails: ...@@ -10,7 +10,7 @@ GitLab has several features based on receiving incoming emails:
- [New merge request by email](../user/project/merge_requests/index.md#create-new-merge-requests-by-email): - [New merge request by email](../user/project/merge_requests/index.md#create-new-merge-requests-by-email):
allow GitLab users to create a new merge request by sending an email to a allow GitLab users to create a new merge request by sending an email to a
user-specific email address. user-specific email address.
- [Service Desk](https://docs.gitlab.com/ee/user/project/service_desk.html): provide e-mail support to - [Service Desk](../user/project/service_desk.md): provide e-mail support to
your customers through GitLab. **[PREMIUM]** your customers through GitLab. **[PREMIUM]**
## Requirements ## Requirements
......
This diff is collapsed.
...@@ -43,10 +43,11 @@ The following metrics are available: ...@@ -43,10 +43,11 @@ The following metrics are available:
| redis_ping_latency_seconds | Gauge | 9.4 | Round trip time of the redis ping | | redis_ping_latency_seconds | Gauge | 9.4 | Round trip time of the redis ping |
| user_session_logins_total | Counter | 9.4 | Counter of how many users have logged in | | user_session_logins_total | Counter | 9.4 | Counter of how many users have logged in |
| upload_file_does_not_exist | Counter | 10.7 in EE, 11.5 in CE | Number of times an upload record could not find its file | | upload_file_does_not_exist | Counter | 10.7 in EE, 11.5 in CE | Number of times an upload record could not find its file |
| failed_login_captcha_total | Gauge | 11.0 | Counter of failed CAPTCHA attempts during login | | failed_login_captcha_total | Gauge | 11.0 | Counter of failed CAPTCHA attempts during login |
| successful_login_captcha_total | Gauge | 11.0 | Counter of successful CAPTCHA attempts during login | | successful_login_captcha_total | Gauge | 11.0 | Counter of successful CAPTCHA attempts during login |
| unicorn_active_connections | Gauge | 11.0 | The number of active Unicorn connections (workers) | | unicorn_active_connections | Gauge | 11.0 | The number of active Unicorn connections (workers) |
| unicorn_queued_connections | Gauge | 11.0 | The number of queued Unicorn connections | | unicorn_queued_connections | Gauge | 11.0 | The number of queued Unicorn connections |
| unicorn_workers | Gauge | 12.0 | The number of Unicorn workers |
## Sidekiq Metrics available for Geo **[PREMIUM]** ## Sidekiq Metrics available for Geo **[PREMIUM]**
...@@ -86,8 +87,8 @@ the `monitoring.sidekiq_exporter` configuration option in `gitlab.yml`. ...@@ -86,8 +87,8 @@ the `monitoring.sidekiq_exporter` configuration option in `gitlab.yml`.
| geo_wikis_checksum_mismatch_count | Gauge | 10.7 | Number of wikis that checksum mismatch on secondary | url | geo_wikis_checksum_mismatch_count | Gauge | 10.7 | Number of wikis that checksum mismatch on secondary | url
| geo_repositories_checked_count | Gauge | 11.1 | Number of repositories that have been checked via `git fsck` | url | geo_repositories_checked_count | Gauge | 11.1 | Number of repositories that have been checked via `git fsck` | url
| geo_repositories_checked_failed_count | Gauge | 11.1 | Number of repositories that have a failure from `git fsck` | url | geo_repositories_checked_failed_count | Gauge | 11.1 | Number of repositories that have a failure from `git fsck` | url
| geo_repositories_retrying_verification_count | Gauge | 11.2 | Number of repositories verification failures that Geo is actively trying to correct on secondary | url | geo_repositories_retrying_verification_count | Gauge | 11.2 | Number of repositories verification failures that Geo is actively trying to correct on secondary | url
| geo_wikis_retrying_verification_count | Gauge | 11.2 | Number of wikis verification failures that Geo is actively trying to correct on secondary | url | geo_wikis_retrying_verification_count | Gauge | 11.2 | Number of wikis verification failures that Geo is actively trying to correct on secondary | url
### Ruby metrics ### Ruby metrics
...@@ -100,6 +101,10 @@ Some basic Ruby runtime metrics are available: ...@@ -100,6 +101,10 @@ Some basic Ruby runtime metrics are available:
| ruby_file_descriptors | Gauge | 11.1 | File descriptors per process | | ruby_file_descriptors | Gauge | 11.1 | File descriptors per process |
| ruby_memory_bytes | Gauge | 11.1 | Memory usage by process | | ruby_memory_bytes | Gauge | 11.1 | Memory usage by process |
| ruby_sampler_duration_seconds_total | Counter | 11.1 | Time spent collecting stats | | ruby_sampler_duration_seconds_total | Counter | 11.1 | Time spent collecting stats |
| ruby_process_cpu_seconds_total | Gauge | 12.0 | Total amount of CPU time per process |
| ruby_process_max_fds | Gauge | 12.0 | Maximum number of open file descriptors per process |
| ruby_process_resident_memory_bytes | Gauge | 12.0 | Memory usage by process, measured in bytes |
| ruby_process_start_time_seconds | Gauge | 12.0 | The elapsed time between system boot and the process started, measured in seconds |
[GC.stat]: https://ruby-doc.org/core-2.3.0/GC.html#method-c-stat [GC.stat]: https://ruby-doc.org/core-2.3.0/GC.html#method-c-stat
......
...@@ -34,10 +34,10 @@ feature for CentOS 6, follow [the instructions on how to build and install a cus ...@@ -34,10 +34,10 @@ feature for CentOS 6, follow [the instructions on how to build and install a cus
By default, GitLab manages an `authorized_keys` file, which contains all the By default, GitLab manages an `authorized_keys` file, which contains all the
public SSH keys for users allowed to access GitLab. However, to maintain a public SSH keys for users allowed to access GitLab. However, to maintain a
single source of truth, [Geo](https://docs.gitlab.com/ee/administration/geo/replication/index.html) needs to be configured to perform SSH fingerprint single source of truth, [Geo](../geo/replication/index.md) needs to be configured to perform SSH fingerprint
lookups via database lookup. lookups via database lookup.
As part of [setting up Geo](https://docs.gitlab.com/ee/administration/geo/replication/index.html#setup-instructions), As part of [setting up Geo](../geo/replication/index.md#setup-instructions),
you will be required to follow the steps outlined below for both the primary and you will be required to follow the steps outlined below for both the primary and
secondary nodes, but note that the `Write to "authorized keys" file` checkbox secondary nodes, but note that the `Write to "authorized keys" file` checkbox
only needs to be unchecked on the primary node since it will be reflected only needs to be unchecked on the primary node since it will be reflected
......
...@@ -8,12 +8,12 @@ The Packages feature allows GitLab to act as a repository for the following: ...@@ -8,12 +8,12 @@ The Packages feature allows GitLab to act as a repository for the following:
| Software repository | Description | Available in GitLab version | | Software repository | Description | Available in GitLab version |
| ------------------- | ----------- | --------------------------- | | ------------------- | ----------- | --------------------------- |
| [Maven Repository](https://docs.gitlab.com/ee/user/project/packages/maven_repository.html) | The GitLab Maven Repository enables every project in GitLab to have its own space to store [Maven](https://maven.apache.org/) packages. | 11.3+ | | [Maven Repository](../user/project/packages/maven_repository.md) | The GitLab Maven Repository enables every project in GitLab to have its own space to store [Maven](https://maven.apache.org/) packages. | 11.3+ |
| [NPM Registry](https://docs.gitlab.com/ee/user/project/packages/npm_registry.html) | The GitLab NPM Registry enables every project in GitLab to have its own space to store [NPM](https://www.npmjs.com/) packages. | 11.7+ | | [NPM Registry](../user/project/packages/npm_registry.md) | The GitLab NPM Registry enables every project in GitLab to have its own space to store [NPM](https://www.npmjs.com/) packages. | 11.7+ |
Don't you see your package management system supported yet? Don't you see your package management system supported yet?
Please consider contributing Please consider contributing
to GitLab. This [development documentation](https://docs.gitlab.com/ee/development/packages.html) will guide you through the process. to GitLab. This [development documentation](../development/packages.md) will guide you through the process.
## Enabling the Packages feature ## Enabling the Packages feature
......
...@@ -32,5 +32,4 @@ bundle exec rake gitlab:import_export:data RAILS_ENV=production ...@@ -32,5 +32,4 @@ bundle exec rake gitlab:import_export:data RAILS_ENV=production
``` ```
[ce-3050]: https://gitlab.com/gitlab-org/gitlab-ce/issues/3050 [ce-3050]: https://gitlab.com/gitlab-org/gitlab-ce/issues/3050
[feature-flags]: https://docs.gitlab.com/ee/api/features.html
[tmp]: ../../development/shared_files.md [tmp]: ../../development/shared_files.md
...@@ -62,7 +62,7 @@ files and add the full paths of the alternative repository storage paths. In ...@@ -62,7 +62,7 @@ files and add the full paths of the alternative repository storage paths. In
the example below, we add two more mountpoints that are named `nfs` and `cephfs` the example below, we add two more mountpoints that are named `nfs` and `cephfs`
respectively. respectively.
NOTE: **Note:** This example uses NFS and CephFS. We do not recommend using EFS for storage as it may impact GitLab's performance. See the [relevant documentation](./high_availability/nfs.md#avoid-using-awss-elastic-file-system-efs) for more details. NOTE: **Note:** This example uses NFS and CephFS. We do not recommend using EFS for storage as it may impact GitLab's performance. See the [relevant documentation](high_availability/nfs.md#avoid-using-awss-elastic-file-system-efs) for more details.
**For installations from source** **For installations from source**
......
--- ---
comments: false comments: false
description: "Learn how to use GitLab CI/CD, the GitLab built-in Continuous Integration, Continuous Deployment, and Continuous Delivery toolset to build, test, and deploy your application." description: "Learn how to use GitLab CI/CD, the GitLab built-in Continuous Integration, Continuous Deployment, and Continuous Delivery toolset to build, test, and deploy your application."
type: index
--- ---
# GitLab CI/CD # GitLab CI/CD
......
---
type: reference
---
# Environments and deployments # Environments and deployments
> Introduced in GitLab 8.9. > Introduced in GitLab 8.9.
...@@ -667,9 +671,24 @@ fetch = +refs/environments/*:refs/remotes/origin/environments/* ...@@ -667,9 +671,24 @@ fetch = +refs/environments/*:refs/remotes/origin/environments/*
### Scoping environments with specs **[PREMIUM]** ### Scoping environments with specs **[PREMIUM]**
Some GitLab [Enterprise Edition](https://about.gitlab.com/pricing/) features can > [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2112) in [GitLab Premium](https://about.gitlab.com/pricing/) 9.4.
behave differently for each environment. For example, you can
[create a secret variable to be injected only into a production environment](variables/README.md#limiting-environment-scopes-of-environment-variables-premium). You can limit the environment scope of a variable by
defining which environments it can be available for.
Wildcards can be used, and the default environment scope is `*`, which means
any jobs will have this variable, not matter if an environment is defined or
not.
For example, if the environment scope is `production`, then only the jobs
having the environment `production` defined would have this specific variable.
Wildcards (`*`) can be used along with the environment name, therefore if the
environment scope is `review/*` then any jobs with environment names starting
with `review/` would have that particular variable.
Some GitLab features can behave differently for each environment.
For example, you can
[create a secret variable to be injected only into a production environment](variables/README.md#limiting-environment-scopes-of-environment-variables-premium). **[PREMIUM]**
In most cases, these features use the _environment specs_ mechanism, which offers In most cases, these features use the _environment specs_ mechanism, which offers
an efficient way to implement scoping within each environment group. an efficient way to implement scoping within each environment group.
...@@ -693,7 +712,7 @@ Each environment can be matched with the following environment spec: ...@@ -693,7 +712,7 @@ Each environment can be matched with the following environment spec:
As you can see, you can use specific matching for selecting a particular environment, As you can see, you can use specific matching for selecting a particular environment,
and also use wildcard matching (`*`) for selecting a particular environment group, and also use wildcard matching (`*`) for selecting a particular environment group,
such as [Review apps](review_apps/index.md) (`review/*`). such as [Review Apps](review_apps/index.md) (`review/*`).
NOTE: **Note:** NOTE: **Note:**
The most _specific_ spec takes precedence over the other wildcard matching. The most _specific_ spec takes precedence over the other wildcard matching.
...@@ -712,3 +731,15 @@ Below are some links you may find interesting: ...@@ -712,3 +731,15 @@ Below are some links you may find interesting:
- [A blog post on Deployments & Environments](https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/) - [A blog post on Deployments & Environments](https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/)
- [Review Apps - Use dynamic environments to deploy your code for every branch](review_apps/index.md) - [Review Apps - Use dynamic environments to deploy your code for every branch](review_apps/index.md)
- [Deploy Boards for your applications running on Kubernetes](https://docs.gitlab.com/ee/user/project/deploy_boards.html) **[PREMIUM]** - [Deploy Boards for your applications running on Kubernetes](https://docs.gitlab.com/ee/user/project/deploy_boards.html) **[PREMIUM]**
<!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
one might have when setting this up, or when something is changed, or on upgrading, it's
important to describe those, too. Think of things that may go wrong and include them here.
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
Each scenario can be a third-level heading, e.g. `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
--- ---
description: "An overview of Continuous Integration, Continuous Delivery, and Continuous Deployment, as well as an introduction to GitLab CI/CD." description: "An overview of Continuous Integration, Continuous Delivery, and Continuous Deployment, as well as an introduction to GitLab CI/CD."
type: concepts
--- ---
# Introduction to CI/CD with GitLab # Introduction to CI/CD with GitLab
......
--- ---
table_display_block: true table_display_block: true
type: reference
--- ---
# GitLab CI/CD environment variables # GitLab CI/CD environment variables
...@@ -388,21 +389,9 @@ Once you set them, they will be available for all subsequent pipelines. ...@@ -388,21 +389,9 @@ Once you set them, they will be available for all subsequent pipelines.
### Limiting environment scopes of environment variables **[PREMIUM]** ### Limiting environment scopes of environment variables **[PREMIUM]**
> [Introduced][ee-2112] in [GitLab Premium](https://about.gitlab.com/pricing/) 9.4.
You can limit the environment scope of a variable by You can limit the environment scope of a variable by
[defining which environments][envs] it can be available for. [defining which environments][envs] it can be available for.
Wildcards can be used, and the default environment scope is `*` which means
any jobs will have this variable, not matter if an environment is defined or
not.
For example, if the environment scope is `production`, then only the jobs
having the environment `production` defined would have this specific variable.
Wildcards (`*`) can be used along with the environment name, therefore if the
environment scope is `review/*` then any jobs with environment names starting
with `review/` would have that particular variable.
To learn more about about scoping environments, see [Scoping environments with specs](../environments.md#scoping-environments-with-specs-premium). To learn more about about scoping environments, see [Scoping environments with specs](../environments.md#scoping-environments-with-specs-premium).
### Deployment environment variables ### Deployment environment variables
...@@ -716,7 +705,6 @@ MIIFQzCCBCugAwIBAgIRAL/ElDjuf15xwja1ZnCocWAwDQYJKoZIhvcNAQELBQAw' ...@@ -716,7 +705,6 @@ MIIFQzCCBCugAwIBAgIRAL/ElDjuf15xwja1ZnCocWAwDQYJKoZIhvcNAQELBQAw'
... ...
``` ```
[ee-2112]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2112
[ce-13784]: https://gitlab.com/gitlab-org/gitlab-ce/issues/13784 "Simple protection of CI variables" [ce-13784]: https://gitlab.com/gitlab-org/gitlab-ce/issues/13784 "Simple protection of CI variables"
[envs]: ../environments.md [envs]: ../environments.md
[protected branches]: ../../user/project/protected_branches.md [protected branches]: ../../user/project/protected_branches.md
......
---
type: reference
---
# Deprecated GitLab CI/CD variables # Deprecated GitLab CI/CD variables
Read through this document to learn what predefined variables
were deprecated and their new references.
## GitLab 9.0 renamed variables ## GitLab 9.0 renamed variables
To follow conventions of naming across GitLab, and to further move away from the To follow conventions of naming across GitLab, and to further move away from the
......
---
type: reference
---
# Predefined environment variables reference # Predefined environment variables reference
For an introduction on this subject, read through the For an introduction on this subject, read through the
......
---
type: reference
---
# Where variables can be used # Where variables can be used
As it's described in the [CI/CD variables](README.md) docs, you can As it's described in the [CI/CD variables](README.md) docs, you can
......
---
type: reference
---
# GitLab CI/CD Pipeline Configuration Reference # GitLab CI/CD Pipeline Configuration Reference
GitLab CI/CD [pipelines](../pipelines.md) are configured using a YAML file called `.gitlab-ci.yml` within each project. GitLab CI/CD [pipelines](../pipelines.md) are configured using a YAML file called `.gitlab-ci.yml` within each project.
...@@ -108,7 +112,7 @@ The following table lists available parameters for jobs: ...@@ -108,7 +112,7 @@ The following table lists available parameters for jobs:
| [`parallel`](#parallel) | How many instances of a job should be run in parallel. | | [`parallel`](#parallel) | How many instances of a job should be run in parallel. |
| [`trigger`](#trigger-premium) | Defines a downstream pipeline trigger. | | [`trigger`](#trigger-premium) | Defines a downstream pipeline trigger. |
| [`include`](#include) | Allows this job to include external YAML files. Also available: `include:local`, `include:file`, `include:template`, and `include:remote`. | | [`include`](#include) | Allows this job to include external YAML files. Also available: `include:local`, `include:file`, `include:template`, and `include:remote`. |
| [`extends`](#extends) | Configuration entry that this job is going to inherit from. | | [`extends`](#extends) | Configuration entries that this job is going to inherit from. |
| [`pages`](#pages) | Upload the result of a job to use with GitLab Pages. | | [`pages`](#pages) | Upload the result of a job to use with GitLab Pages. |
| [`variables`](#variables) | Define job variables on a job level. | | [`variables`](#variables) | Define job variables on a job level. |
...@@ -2117,7 +2121,7 @@ docker-test: ...@@ -2117,7 +2121,7 @@ docker-test:
> Introduced in GitLab 11.3. > Introduced in GitLab 11.3.
`extends` defines an entry name that a job that uses `extends` is going to `extends` defines entry names that a job that uses `extends` is going to
inherit from. inherit from.
It is an alternative to using [YAML anchors](#anchors) and is a little It is an alternative to using [YAML anchors](#anchors) and is a little
...@@ -2194,6 +2198,46 @@ spinach: ...@@ -2194,6 +2198,46 @@ spinach:
script: rake spinach script: rake spinach
``` ```
It's also possible to use multiple parents for `extends`.
The algorithm used for merge is "closest scope wins", so keys
from the last member will always shadow anything defined on other levels.
For example:
```yaml
.only-important:
only:
- master
- stable
tags:
- production
.in-docker:
tags:
- docker
image: alpine
rspec:
extends:
- .only-important
- .in-docker
script:
- rake rspec
```
This results in the following `rspec` job:
```yaml
rspec:
only:
- master
- stable
tags:
- docker
image: alpine
script:
- rake rspec
```
### Using `extends` and `include` together ### Using `extends` and `include` together
`extends` works across configuration files combined with `include`. `extends` works across configuration files combined with `include`.
...@@ -2747,6 +2791,18 @@ using Git 2.10 or newer: ...@@ -2747,6 +2791,18 @@ using Git 2.10 or newer:
git push -o ci.skip git push -o ci.skip
``` ```
<!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
one might have when setting this up, or when something is changed, or on upgrading, it's
important to describe those, too. Think of things that may go wrong and include them here.
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
Each scenario can be a third-level heading, e.g. `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
[ce-6323]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6323 [ce-6323]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6323
[ce-6669]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6669 [ce-6669]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6669
[ce-7983]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7983 [ce-7983]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7983
......
...@@ -32,6 +32,21 @@ a new presenter specifically for GraphQL. ...@@ -32,6 +32,21 @@ a new presenter specifically for GraphQL.
The presenter is initialized using the object resolved by a field, and The presenter is initialized using the object resolved by a field, and
the context. the context.
### Exposing Global ids
When exposing an `id` field on a type, we will by default try to
expose a global id by calling `to_global_id` on the resource being
rendered.
To override this behaviour, you can implement an `id` method on the
type for which you are exposing an id. Please make sure that when
exposing a `GraphQL::ID_TYPE` using a custom method that it is
globally unique.
The records that are exposing a `full_path` as an `ID_TYPE` are one of
these exceptions. Since the full path is a unique identifier for a
`Project` or `Namespace`.
### Connection Types ### Connection Types
GraphQL uses [cursor based GraphQL uses [cursor based
...@@ -79,14 +94,14 @@ look like this: ...@@ -79,14 +94,14 @@ look like this:
{ {
"cursor": "Nzc=", "cursor": "Nzc=",
"node": { "node": {
"id": "77", "id": "gid://gitlab/Pipeline/77",
"status": "FAILED" "status": "FAILED"
} }
}, },
{ {
"cursor": "Njc=", "cursor": "Njc=",
"node": { "node": {
"id": "67", "id": "gid://gitlab/Pipeline/67",
"status": "FAILED" "status": "FAILED"
} }
} }
...@@ -330,7 +345,7 @@ argument :project_path, GraphQL::ID_TYPE, ...@@ -330,7 +345,7 @@ argument :project_path, GraphQL::ID_TYPE,
required: true, required: true,
description: "The project the merge request to mutate is in" description: "The project the merge request to mutate is in"
argument :iid, GraphQL::ID_TYPE, argument :iid, GraphQL::STRING_TYPE,
required: true, required: true,
description: "The iid of the merge request to mutate" description: "The iid of the merge request to mutate"
......
...@@ -56,7 +56,7 @@ bundle exec rails db RAILS_ENV=development ...@@ -56,7 +56,7 @@ bundle exec rails db RAILS_ENV=development
### `ActiveRecord::PendingMigrationError` with Spring ### `ActiveRecord::PendingMigrationError` with Spring
When running specs with the [Spring preloader](./rake_tasks.md#speed-up-tests-rake-tasks-and-migrations), When running specs with the [Spring preloader](rake_tasks.md#speed-up-tests-rake-tasks-and-migrations),
the test database can get into a corrupted state. Trying to run the migration or the test database can get into a corrupted state. Trying to run the migration or
dropping/resetting the test database has no effect. dropping/resetting the test database has no effect.
......
...@@ -74,9 +74,14 @@ Here are some links to get you up to speed with the current effort: ...@@ -74,9 +74,14 @@ Here are some links to get you up to speed with the current effort:
After a given documentation path is aligned across CE and EE, all merge requests After a given documentation path is aligned across CE and EE, all merge requests
affecting that path must be submitted to CE, regardless of the content it has. affecting that path must be submitted to CE, regardless of the content it has.
This means that for EE-only features which are being added only to the EE codebase, This means that:
you have to submit a separate merge request in CE that contains the docs.
This might seem like a duplicate effort, but it's for the short term. * For **EE-only docs changes**, you only have to submit a CE MR.
* For **EE-only features** that touch both the code and the docs, you have to submit
an EE MR containing all changes, and a CE MR containing only the docs changes
and without a changelog entry.
This might seem like a duplicate effort, but it's only for the short term.
A list of the already aligned docs can be found in A list of the already aligned docs can be found in
[the epic description](https://gitlab.com/groups/gitlab-org/-/epics/199#ee-specific-lines-check). [the epic description](https://gitlab.com/groups/gitlab-org/-/epics/199#ee-specific-lines-check).
......
...@@ -906,7 +906,7 @@ import bundle from 'ee/protected_branches/protected_branches_bundle.js'; ...@@ -906,7 +906,7 @@ import bundle from 'ee/protected_branches/protected_branches_bundle.js';
import bundle from 'ee_else_ce/protected_branches/protected_branches_bundle.js'; import bundle from 'ee_else_ce/protected_branches/protected_branches_bundle.js';
``` ```
See the frontend guide [performance section](./fe_guide/performance.md) for See the frontend guide [performance section](fe_guide/performance.md) for
information on managing page-specific javascript within EE. information on managing page-specific javascript within EE.
......
...@@ -234,7 +234,7 @@ One should apply to be a Vue.js expert by opening an MR when the Merge Request's ...@@ -234,7 +234,7 @@ One should apply to be a Vue.js expert by opening an MR when the Merge Request's
- Deep understanding of Vue and Vuex reactivy - Deep understanding of Vue and Vuex reactivy
- Vue and Vuex code are structured according to both official and our guidelines - Vue and Vuex code are structured according to both official and our guidelines
- Full understanding of testing a Vue and Vuex application - Full understanding of testing a Vue and Vuex application
- Vuex code follows the [documented pattern](./vuex.md#actions-pattern-request-and-receive-namespaces) - Vuex code follows the [documented pattern](vuex.md#actions-pattern-request-and-receive-namespaces)
- Knowledge about the existing Vue and Vuex applications and existing reusable components - Knowledge about the existing Vue and Vuex applications and existing reusable components
[vue-docs]: http://vuejs.org/guide/index.html [vue-docs]: http://vuejs.org/guide/index.html
......
...@@ -212,7 +212,7 @@ Namespaces should be PascalCase. ...@@ -212,7 +212,7 @@ Namespaces should be PascalCase.
``` ```
Note: The namespace should be removed from the translation. See the [translation Note: The namespace should be removed from the translation. See the [translation
guidelines for more details](./translation.md#namespaced-strings). guidelines for more details](translation.md#namespaced-strings).
### Dates / times ### Dates / times
......
--- ---
comments: false comments: false
description: Read through the GitLab installation methods. description: Read through the GitLab installation methods.
type: index
--- ---
# Installation **[CORE ONLY]** # Installation **[CORE ONLY]**
...@@ -81,7 +82,7 @@ the above methods, provided the cloud provider supports it. ...@@ -81,7 +82,7 @@ the above methods, provided the cloud provider supports it.
- [Install on AWS](aws/index.md): Install Omnibus GitLab on AWS using the community AMIs that GitLab provides. - [Install on AWS](aws/index.md): Install Omnibus GitLab on AWS using the community AMIs that GitLab provides.
- [Install GitLab on Google Cloud Platform](google_cloud_platform/index.md): Install Omnibus GitLab on a VM in GCP. - [Install GitLab on Google Cloud Platform](google_cloud_platform/index.md): Install Omnibus GitLab on a VM in GCP.
- [Install GitLab on Azure](azure/index.md): Install Omnibus GitLab from Azure Marketplace. - [Install GitLab on Azure](azure/index.md): Install Omnibus GitLab from Azure Marketplace.
- [Install GitLab on OpenShift](openshift_and_gitlab/index.md): Install GitLab using the Docker image on OpenShift. - [Install GitLab on OpenShift](https://docs.gitlab.com/charts/installation/cloud/openshift.html): Install GitLab on OpenShift by using GitLab's Helm charts.
- [Install GitLab on DC/OS](https://mesosphere.com/blog/gitlab-dcos/): Install GitLab on Mesosphere DC/OS via the [GitLab-Mesosphere integration](https://about.gitlab.com/2016/09/16/announcing-gitlab-and-mesosphere/). - [Install GitLab on DC/OS](https://mesosphere.com/blog/gitlab-dcos/): Install GitLab on Mesosphere DC/OS via the [GitLab-Mesosphere integration](https://about.gitlab.com/2016/09/16/announcing-gitlab-and-mesosphere/).
- [Install GitLab on DigitalOcean](https://about.gitlab.com/2016/04/27/getting-started-with-gitlab-and-digitalocean/): Install Omnibus GitLab on DigitalOcean. - [Install GitLab on DigitalOcean](https://about.gitlab.com/2016/04/27/getting-started-with-gitlab-and-digitalocean/): Install Omnibus GitLab on DigitalOcean.
- _Testing only!_ [DigitalOcean and Docker Machine](digitaloceandocker.md): - _Testing only!_ [DigitalOcean and Docker Machine](digitaloceandocker.md):
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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