提交 74b0522e 编写于 作者: G GitLab Bot

Add latest changes from gitlab-org/gitlab@master

上级 050f8896
......@@ -16,6 +16,9 @@ To have:
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/10586) in GitLab 12.4.
CAUTION: **Caution:**
This is a [**beta** feature](https://about.gitlab.com/handbook/product/#beta) and is not ready yet for production use at any scale.
**Secondary** nodes can replicate files stored on the **primary** node regardless of
whether they are stored on the local filesystem or in object storage.
......
......@@ -318,6 +318,17 @@ There are also two edge cases worth mentioning:
`test` and `deploy` are allowed to be used as job's stage by default.
1. If a job doesn't specify a `stage`, the job is assigned the `test` stage.
#### `.pre` and `.post`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/31441) in GitLab 12.4.
The following stages are available to every pipeline:
- `.pre`, which is guaranteed to always be the first stage in a pipeline.
- `.post`, which is guaranteed to always be the last stage in a pipeline.
User-defined stages are executed after `.pre` and before `.post`.
### `stage`
`stage` is defined per-job and relies on [`stages`](#stages) which is defined
......@@ -330,6 +341,10 @@ stages:
- test
- deploy
job 0:
stage: .pre
script: make something useful before build stage
job 1:
stage: build
script: make build dependencies
......@@ -345,6 +360,10 @@ job 3:
job 4:
stage: deploy
script: make deploy
job 5:
stage: .post
script: make something useful at the end of pipeline
```
#### Using your own Runners
......
# Cluster Environments **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/13392) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/13392) for group-level clusters in [GitLab Premium](https://about.gitlab.com/pricing/) 12.3.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/14809) for instance-level clusters in [GitLab Premium](https://about.gitlab.com/pricing/) 12.4.
Cluster environments provide a consolidated view of which CI [environments](../../ci/environments.md) are
deployed to the Kubernetes cluster and it:
......
......@@ -407,6 +407,7 @@ module QA
module DockerRun
autoload :Base, 'qa/service/docker_run/base'
autoload :LDAP, 'qa/service/docker_run/ldap'
autoload :NodeJs, 'qa/service/docker_run/node_js'
autoload :GitlabRunner, 'qa/service/docker_run/gitlab_runner'
end
end
......
# frozen_string_literal: true
require 'tmpdir'
module QA
module Runtime
module Fixtures
......@@ -18,6 +20,19 @@ module QA
parse_body(response)[:content]
end
def with_fixtures(fixtures)
dir = Dir.mktmpdir
fixtures.each do |file_def|
path = File.join(dir, file_def[:file_path])
FileUtils.mkdir_p(File.dirname(path))
File.write(path, file_def[:content])
end
yield dir
ensure
FileUtils.remove_entry(dir)
end
private
def api_client
......
# frozen_string_literal: true
module QA
module Service
module DockerRun
class NodeJs < Base
def initialize(volume_host_path)
@image = 'node:12.11.1-alpine'
@name = "qa-node-#{SecureRandom.hex(8)}"
@volume_host_path = volume_host_path
super()
end
def publish!
# When we run the tests via gitlab-qa, we use docker-in-docker
# which means that host of a volume mount would be the host that
# started the gitlab-qa QA container (e.g., the CI runner),
# not the gitlab-qa container itself. That means we can't
# mount a volume from the file system inside the gitlab-qa
# container.
#
# Instead, we copy the files into the container.
shell <<~CMD.tr("\n", ' ')
docker run -d --rm
--network #{network}
--hostname #{host_name}
--name #{@name}
--volume #{@volume_host_path}:/home/node
#{@image} sh -c "sleep 60"
CMD
shell "docker cp #{@volume_host_path}/. #{@name}:/home/node"
shell "docker exec -t #{@name} sh -c 'cd /home/node && npm publish'"
end
end
end
end
end
# frozen_string_literal: true
require 'spec_helper'
describe Admin::AbuseReportsController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Admin::UsersController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Admin::ApplicationSettingsController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::BlobController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::BoardsController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::BranchesController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::ClustersController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::CommitController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::DeployKeysController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe 'Groups (JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe 'Labels (JavaScript fixtures)' do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::MergeRequests::DiffsController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::PipelinesController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe 'Projects (JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::ServicesController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe 'Raw files', '(JavaScript fixtures)' do
......
# frozen_string_literal: true
require 'spec_helper'
describe SearchController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe Projects::ServicesController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe 'Sessions (JavaScript fixtures)' do
......
# frozen_string_literal: true
require 'spec_helper'
describe SnippetsController, '(JavaScript fixtures)', type: :controller do
......
# frozen_string_literal: true
require 'spec_helper'
describe 'Todos (JavaScript fixtures)' do
......
# frozen_string_literal: true
require 'spec_helper'
context 'U2F' do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册