Commit 251d14c2 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'ce-to-ee-2018-09-13' into 'master'

CE upstream - 2018-09-13 12:21 UTC

Closes gitlab-ce#49621, gitlab-ce#50186, and charts/auto-deploy-app#6

See merge request gitlab-org/gitlab-ee!7359
parents 745eebda 123f0ccc
......@@ -220,6 +220,7 @@ class ApplicationSetting < ActiveRecord::Base
validate :terms_exist, if: :enforce_terms?
before_validation :ensure_uuid!
before_validation :strip_sentry_values
before_save :ensure_runners_registration_token
before_save :ensure_health_check_access_token
......@@ -383,6 +384,11 @@ class ApplicationSetting < ActiveRecord::Base
super(levels.map { |level| Gitlab::VisibilityLevel.level_value(level) })
end
def strip_sentry_values
sentry_dsn.strip! if sentry_dsn.present?
clientside_sentry_dsn.strip! if clientside_sentry_dsn.present?
end
def performance_bar_allowed_group
Group.find_by_id(performance_bar_allowed_group_id)
end
......
......@@ -5,4 +5,4 @@
.project-fields-form
= render 'projects/project_templates/project_fields_form'
= render 'projects/new_project_fields', f: f, project_name_id: "template-project-name"
= render 'projects/new_project_fields', f: f, project_name_id: "template-project-name", hide_init_with_readme: true
---
title: Move including external files in .gitlab-ci.yml from Starter to Libre
merge_request: 21603
author:
type: changed
---
title: 'create from template: hide checkbox for initializing repository with readme'
merge_request: 21646
author:
type: other
---
title: Vendor Auto-DevOps.gitlab-ci.yml to refactor registry_login
merge_request: 21714
author: Laurent Goderre @LaurentGoderre
type: changed
---
title: Vendor Auto-DevOps.gitlab-ci.yml to fix bug where the deploy job does not wait
for Deployment to complete
merge_request: 21713
author:
type: fixed
......@@ -66,12 +66,34 @@ describe 'New project' do
end
context 'Readme selector' do
it 'shows the initialize with Readme checkbox' do
it 'shows the initialize with Readme checkbox on "Blank project" tab' do
visit new_project_path
expect(page).to have_css('input#project_initialize_with_readme')
expect(page).to have_content('Initialize repository with a README')
end
it 'does not show the initialize with Readme checkbox on "Create from template" tab' do
visit new_project_path
find('#create-from-template-pane').click
first('.choose-template').click
page.within '.project-fields-form' do
expect(page).not_to have_css('input#project_initialize_with_readme')
expect(page).not_to have_content('Initialize repository with a README')
end
end
it 'does not show the initialize with Readme checkbox on "Import project" tab' do
visit new_project_path
find('#import-project-tab').click
first('.js-import-git-toggle-button').click
page.within '.toggle-import-form' do
expect(page).not_to have_css('input#project_initialize_with_readme')
expect(page).not_to have_content('Initialize repository with a README')
end
end
end
context 'Namespace selector' do
......
......@@ -305,6 +305,36 @@ describe ApplicationSetting do
end
end
describe 'setting Sentry DSNs' do
context 'server DSN' do
it 'strips leading and trailing whitespace' do
subject.update(sentry_dsn: ' http://test ')
expect(subject.sentry_dsn).to eq('http://test')
end
it 'handles nil values' do
subject.update(sentry_dsn: nil)
expect(subject.sentry_dsn).to be_nil
end
end
context 'client-side DSN' do
it 'strips leading and trailing whitespace' do
subject.update(clientside_sentry_dsn: ' http://test ')
expect(subject.clientside_sentry_dsn).to eq('http://test')
end
it 'handles nil values' do
subject.update(clientside_sentry_dsn: nil)
expect(subject.clientside_sentry_dsn).to be_nil
end
end
end
describe '#disabled_oauth_sign_in_sources=' do
before do
allow(Devise).to receive(:omniauth_providers).and_return([:github])
......
......@@ -451,12 +451,16 @@ rollout 100%:
# Extract "MAJOR.MINOR" from CI_SERVER_VERSION and generate "MAJOR-MINOR-stable" for Security Products
export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
function container_scanning() {
function registry_login() {
if [[ -n "$CI_REGISTRY_USER" ]]; then
echo "Logging to GitLab Container Registry with CI credentials..."
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
echo ""
fi
}
function container_scanning() {
registry_login
docker run -d --name db arminc/clair-db:latest
docker run -p 6060:6060 --link db:postgres -d --name clair --restart on-failure arminc/clair-local-scan:v2.0.1
......@@ -604,6 +608,8 @@ rollout 100%:
--version="$CI_PIPELINE_ID-$CI_JOB_ID" \
"$name" \
chart/
kubectl rollout status -n "$KUBE_NAMESPACE" -w "deployment/$name"
}
function scale() {
......@@ -700,11 +706,7 @@ rollout 100%:
}
function build() {
if [[ -n "$CI_REGISTRY_USER" ]]; then
echo "Logging to GitLab Container Registry with CI credentials..."
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
echo ""
fi
registry_login
if [[ -f Dockerfile ]]; then
echo "Building Dockerfile-based application..."
......
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