Commit f06748b9 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'ce-to-ee-2018-05-21' into 'master'

CE upstream - 2018-05-21 12:28 UTC

Closes gitlab-qa#247

See merge request gitlab-org/gitlab-ee!5788
parents d86e27ee acd8fef8
...@@ -156,6 +156,23 @@ stages: ...@@ -156,6 +156,23 @@ stages:
<<: *dedicated-no-docs-pull-cache-job <<: *dedicated-no-docs-pull-cache-job
<<: *except-docs-and-qa <<: *except-docs-and-qa
.single-script-job: &single-script-job
image: ruby:2.4-alpine
before_script: []
stage: build
cache: {}
dependencies: []
variables: &single-script-job-variables
GIT_STRATEGY: none
before_script:
# We need to download the script rather than clone the repo since the
# package-and-qa job will not be able to run when the branch gets
# deleted (when merging the MR).
- export SCRIPT_NAME="${SCRIPT_NAME:-$CI_JOB_NAME}"
- apk add --update openssl
- wget $CI_PROJECT_URL/raw/$CI_COMMIT_SHA/scripts/$SCRIPT_NAME
- chmod 755 $SCRIPT_NAME
.rake-exec: &rake-exec .rake-exec: &rake-exec
<<: *dedicated-no-docs-no-db-pull-cache-job <<: *dedicated-no-docs-no-db-pull-cache-job
script: script:
...@@ -295,19 +312,10 @@ stages: ...@@ -295,19 +312,10 @@ stages:
.review-docs: &review-docs .review-docs: &review-docs
<<: *dedicated-runner <<: *dedicated-runner
<<: *except-qa <<: *except-qa
image: ruby:2.4-alpine <<: *single-script-job
before_script:
- gem install gitlab --no-doc
# We need to download the script rather than clone the repo since the
# review-docs-cleanup job will not be able to run when the branch gets
# deleted (when merging the MR).
- apk add --update openssl
- wget https://gitlab.com/gitlab-org/gitlab-ce/raw/master/scripts/trigger-build-docs
- chmod 755 trigger-build-docs
cache: {}
dependencies: []
variables: variables:
GIT_STRATEGY: none <<: *single-script-job-variables
SCRIPT_NAME: trigger-build-docs
when: manual when: manual
only: only:
- branches - branches
...@@ -359,23 +367,14 @@ stages: ...@@ -359,23 +367,14 @@ stages:
# Trigger a package build in omnibus-gitlab repository # Trigger a package build in omnibus-gitlab repository
# #
package-and-qa: package-and-qa:
image: ruby:2.4-alpine <<: *single-script-job
before_script: []
stage: build
cache: {}
when: manual
variables: variables:
GIT_STRATEGY: none <<: *single-script-job-variables
SCRIPT_NAME: trigger-build-omnibus
retry: 0 retry: 0
before_script:
# We need to download the script rather than clone the repo since the
# package-and-qa job will not be able to run when the branch gets
# deleted (when merging the MR).
- apk add --update openssl
- wget https://gitlab.com/$CI_PROJECT_PATH/raw/$CI_COMMIT_SHA/scripts/trigger-build-omnibus
- chmod 755 trigger-build-omnibus
script: script:
- ./trigger-build-omnibus - ./$SCRIPT_NAME
when: manual
only: only:
- //@gitlab-org/gitlab-ce - //@gitlab-org/gitlab-ce
- //@gitlab-org/gitlab-ee - //@gitlab-org/gitlab-ee
...@@ -392,7 +391,8 @@ review-docs-deploy: ...@@ -392,7 +391,8 @@ review-docs-deploy:
url: http://$DOCS_GITLAB_REPO_SUFFIX-$CI_COMMIT_REF_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX url: http://$DOCS_GITLAB_REPO_SUFFIX-$CI_COMMIT_REF_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX
on_stop: review-docs-cleanup on_stop: review-docs-cleanup
script: script:
- ./trigger-build-docs deploy - gem install gitlab --no-ri --no-rdoc
- ./$SCRIPT_NAME deploy
# Cleanup remote environment of gitlab-docs # Cleanup remote environment of gitlab-docs
review-docs-cleanup: review-docs-cleanup:
...@@ -402,7 +402,26 @@ review-docs-cleanup: ...@@ -402,7 +402,26 @@ review-docs-cleanup:
name: review-docs/$CI_COMMIT_REF_NAME name: review-docs/$CI_COMMIT_REF_NAME
action: stop action: stop
script: script:
- ./trigger-build-docs cleanup - gem install gitlab --no-ri --no-rdoc
- ./SCRIPT_NAME cleanup
##
# Trigger a docker image build in CNG (Cloud Native GitLab) repository
#
cloud-native-image:
image: ruby:2.4-alpine
before_script: []
stage: build
allow_failure: true
cache: {}
before_script:
- gem install gitlab --no-rdoc --no-ri
- chmod 755 ./scripts/trigger-build-cloud-native
script:
- ./scripts/trigger-build-cloud-native
only:
- tags@gitlab-org/gitlab-ce
- tags@gitlab-org/gitlab-ee
# Retrieve knapsack and rspec_flaky reports # Retrieve knapsack and rspec_flaky reports
retrieve-tests-metadata: retrieve-tests-metadata:
...@@ -458,7 +477,7 @@ update-tests-metadata: ...@@ -458,7 +477,7 @@ update-tests-metadata:
- rspec_flaky/ - rspec_flaky/
policy: push policy: push
script: script:
- retry gem install fog-aws mime-types activesupport - retry gem install fog-aws mime-types activesupport --no-ri --no-rdoc
- scripts/merge-reports ${KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg_node_*.json - scripts/merge-reports ${KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg_node_*.json
- scripts/merge-reports ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg-ee_node_*.json - scripts/merge-reports ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg-ee_node_*.json
- scripts/merge-reports ${FLAKY_RSPEC_SUITE_REPORT_PATH} rspec_flaky/all_*_*.json - scripts/merge-reports ${FLAKY_RSPEC_SUITE_REPORT_PATH} rspec_flaky/all_*_*.json
......
...@@ -665,7 +665,7 @@ module Ci ...@@ -665,7 +665,7 @@ module Ci
Gitlab::Ci::Variables::Collection.new.tap do |variables| Gitlab::Ci::Variables::Collection.new.tap do |variables|
break variables unless gitlab_deploy_token break variables unless gitlab_deploy_token
variables.append(key: 'CI_DEPLOY_USER', value: gitlab_deploy_token.name) variables.append(key: 'CI_DEPLOY_USER', value: gitlab_deploy_token.username)
variables.append(key: 'CI_DEPLOY_PASSWORD', value: gitlab_deploy_token.token, public: false) variables.append(key: 'CI_DEPLOY_PASSWORD', value: gitlab_deploy_token.token, public: false)
end end
end end
......
...@@ -231,6 +231,17 @@ ...@@ -231,6 +231,17 @@
%td.shortcut %td.shortcut
.key y .key y
%td Go to file permalink %td Go to file permalink
%tbody
%tr
%th
%th Web IDE
%tr
%td.shortcut
- if browser.platform.mac?
.key &#8984; p
- else
.key ctrl p
%td Go to file
.col-lg-4 .col-lg-4
%table.shortcut-mappings %table.shortcut-mappings
%tbody.hidden-shortcut.network{ style: 'display:none' } %tbody.hidden-shortcut.network{ style: 'display:none' }
......
---
title: Fixes deploy token variables on Ci::Build
merge_request: 19047
author:
type: fixed
---
title: Add shortcuts to Web IDE docs and modal
merge_request: 19044
author:
type: changed
# GitLab Prometheus metrics # GitLab Prometheus metrics
>**Note:** >**Note:**
Available since [Omnibus GitLab 9.3][29118]. Currently experimental. For Available since [Omnibus GitLab 9.3][29118]. For
installations from source you'll have to configure it yourself. installations from source you'll have to configure it yourself.
To enable the GitLab Prometheus metrics: To enable the GitLab Prometheus metrics:
...@@ -24,7 +24,7 @@ server, because the embedded server configuration is overwritten once every ...@@ -24,7 +24,7 @@ server, because the embedded server configuration is overwritten once every
## Unicorn Metrics available ## Unicorn Metrics available
In this experimental phase, only a few metrics are available: The following metrics are available:
| Metric | Type | Since | Description | | Metric | Type | Since | Description |
|:--------------------------------- |:--------- |:----- |:----------- | |:--------------------------------- |:--------- |:----- |:----------- |
......
...@@ -120,7 +120,7 @@ To disable the monitoring of Kubernetes: ...@@ -120,7 +120,7 @@ To disable the monitoring of Kubernetes:
## GitLab Prometheus metrics ## GitLab Prometheus metrics
> Introduced as an experimental feature in GitLab 9.3. > Introduced in GitLab 9.3.
GitLab monitors its own internal service metrics, and makes them available at the `/-/metrics` endpoint. Unlike other exporters, this endpoint requires authentication as it is available on the same URL and port as user traffic. GitLab monitors its own internal service metrics, and makes them available at the `/-/metrics` endpoint. Unlike other exporters, this endpoint requires authentication as it is available on the same URL and port as user traffic.
......
...@@ -76,7 +76,7 @@ pull images from your Container Registry. ...@@ -76,7 +76,7 @@ pull images from your Container Registry.
> [Introduced][ce-18414] in GitLab 10.8. > [Introduced][ce-18414] in GitLab 10.8.
There's a special case when it comes to Deploy Tokens, if a user creates one There's a special case when it comes to Deploy Tokens, if a user creates one
named `gitlab-deploy-token`, the name and token of the Deploy Token will be named `gitlab-deploy-token`, the username and token of the Deploy Token will be
automatically exposed to the CI/CD jobs as environment variables: `CI_DEPLOY_USER` and automatically exposed to the CI/CD jobs as environment variables: `CI_DEPLOY_USER` and
`CI_DEPLOY_PASSWORD`, respectively. `CI_DEPLOY_PASSWORD`, respectively.
......
...@@ -88,3 +88,9 @@ You can see GitLab's keyboard shortcuts by using 'shift + ?' ...@@ -88,3 +88,9 @@ You can see GitLab's keyboard shortcuts by using 'shift + ?'
| Keyboard Shortcut | Description | | Keyboard Shortcut | Description |
| ----------------- | ----------- | | ----------------- | ----------- |
| <kbd>e</kbd> | Edit wiki page| | <kbd>e</kbd> | Edit wiki page|
## Web IDE
| Keyboard Shortcut | Description |
| ----------------- | ----------- |
| <kbd></kbd> + <kbd>p</kbd> | Go to file |
...@@ -33,13 +33,15 @@ module QA ...@@ -33,13 +33,15 @@ module QA
end end
keys = [ keys = [
Runtime::Key::RSA.new(8192), [Runtime::Key::RSA, 8192],
Runtime::Key::ECDSA.new(521), [Runtime::Key::ECDSA, 521],
Runtime::Key::ED25519.new [Runtime::Key::ED25519]
] ]
keys.each do |key| keys.each do |(key_class, bits)|
scenario "user sets up a deploy key with #{key.name}(#{key.bits}) to clone code using pipelines" do scenario "user sets up a deploy key with #{key_class}(#{bits}) to clone code using pipelines" do
key = key_class.new(*bits)
login login
Factory::Resource::DeployKey.fabricate! do |resource| Factory::Resource::DeployKey.fabricate! do |resource|
......
...@@ -11,7 +11,7 @@ fi ...@@ -11,7 +11,7 @@ fi
# Only install knapsack after bundle install! Otherwise oddly some native # Only install knapsack after bundle install! Otherwise oddly some native
# gems could not be found under some circumstance. No idea why, hours wasted. # gems could not be found under some circumstance. No idea why, hours wasted.
retry gem install knapsack retry gem install knapsack --no-ri --no-rdoc
cp config/gitlab.yml.example config/gitlab.yml cp config/gitlab.yml.example config/gitlab.yml
sed -i 's/bin_path: \/usr\/bin\/git/bin_path: \/usr\/local\/bin\/git/' config/gitlab.yml sed -i 's/bin_path: \/usr\/bin\/git/bin_path: \/usr\/local\/bin\/git/' config/gitlab.yml
......
#!/usr/bin/env ruby
require 'gitlab'
#
# Configure credentials to be used with gitlab gem
#
Gitlab.configure do |config|
config.endpoint = 'https://gitlab.com/api/v4'
end
#
# The remote project
#
GITLAB_CNG_REPO = 'gitlab-org/build/CNG'.freeze
def ee?
ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('CHANGELOG-EE.md')
end
def read_file_version(filename)
raw_version = File.read(filename).strip
# if the version matches semver format, treat it as a tag and prepend `v`
if raw_version =~ Regexp.compile(/^\d+\.\d+\.\d+(-rc\d+)?(-ee)?$/)
"v#{raw_version}"
else
raw_version
end
end
def params
params = {
'GITLAB_SHELL_VERSION' => read_file_version('GITLAB_SHELL_VERSION'),
'GITALY_VERSION' => read_file_version('GITALY_SERVER_VERSION'),
'TRIGGERED_USER' => ENV['GITLAB_USER_NAME'],
'TRIGGER_SOURCE' => "https://gitlab.com/gitlab-org/#{ENV['CI_PROJECT_NAME']}/-/jobs/#{ENV['CI_JOB_ID']}"
}
if ee?
params['EE_PIPELINE'] = 'true'
params['GITLAB_EE_VERSION'] = ENV['CI_COMMIT_REF_NAME']
else
params['CE_PIPELINE'] = 'true'
params['GITLAB_CE_VERSION'] = ENV['CI_COMMIT_REF_NAME']
end
params
end
#
# Trigger a pipeline
#
def trigger_pipeline
# Create the cross project pipeline using CI_JOB_TOKEN
pipeline = Gitlab.run_trigger(GITLAB_CNG_REPO, ENV['CI_JOB_TOKEN'], 'master', params)
puts "Triggered https://gitlab.com/#{GITLAB_CNG_REPO}/pipelines/#{pipeline.id}"
end
trigger_pipeline
...@@ -2104,7 +2104,7 @@ describe Ci::Build do ...@@ -2104,7 +2104,7 @@ describe Ci::Build do
let(:deploy_token_variables) do let(:deploy_token_variables) do
[ [
{ key: 'CI_DEPLOY_USER', value: deploy_token.name, public: true }, { key: 'CI_DEPLOY_USER', value: deploy_token.username, public: true },
{ key: 'CI_DEPLOY_PASSWORD', value: deploy_token.token, public: false } { key: 'CI_DEPLOY_PASSWORD', value: deploy_token.token, public: false }
] ]
end end
......
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