提交 de0c73ff 编写于 作者: G GitLab Bot

Add latest changes from gitlab-org/gitlab@master

上级 fffced70
......@@ -119,7 +119,7 @@ gem 'fog-local', '~> 0.6'
gem 'fog-openstack', '~> 1.0'
gem 'fog-rackspace', '~> 0.1.1'
gem 'fog-aliyun', '~> 0.3'
gem 'gitlab-fog-azure-rm', '~> 0.7', require: false
gem 'gitlab-fog-azure-rm', '~> 0.8', require: false
# for Google storage
gem 'google-api-client', '~> 0.33'
......
......@@ -419,7 +419,7 @@ GEM
github-markup (1.7.0)
gitlab-chronic (0.10.5)
numerizer (~> 0.2)
gitlab-fog-azure-rm (0.7.0)
gitlab-fog-azure-rm (0.8.1)
azure-storage (~> 0.15.0.preview)
fog-core (= 2.1.0)
fog-json (~> 1.2.0)
......@@ -1301,7 +1301,7 @@ DEPENDENCIES
gitaly (~> 13.3.0.pre.rc1)
github-markup (~> 1.7.0)
gitlab-chronic (~> 0.10.5)
gitlab-fog-azure-rm (~> 0.7)
gitlab-fog-azure-rm (~> 0.8)
gitlab-labkit (= 0.12.1)
gitlab-license (~> 1.0)
gitlab-mail_room (~> 0.0.6)
......
<script>
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { GlButton } from '@gitlab/ui';
import { __ } from '~/locale';
import ModalFilters from './filters';
import ModalTabs from './tabs.vue';
......@@ -10,6 +11,7 @@ export default {
components: {
ModalTabs,
ModalFilters,
GlButton,
},
mixins: [modalMixin],
props: {
......@@ -39,7 +41,7 @@ export default {
},
methods: {
toggleAll() {
this.$refs.selectAllBtn.blur();
this.$refs.selectAllBtn.$el.blur();
ModalStore.toggleAll();
},
......@@ -51,28 +53,28 @@ export default {
<header class="add-issues-header border-top-0 form-actions">
<h2 class="m-0">
Add issues
<button
type="button"
<gl-button
category="tertiary"
icon="close"
class="close"
data-dismiss="modal"
:aria-label="__('Close')"
@click="toggleModal(false)"
>
<span aria-hidden="true">×</span>
</button>
/>
</h2>
</header>
<modal-tabs v-if="!loading && issuesCount > 0" />
<div v-if="showSearch" class="d-flex gl-mb-3">
<modal-filters :store="filter" />
<button
<gl-button
ref="selectAllBtn"
type="button"
class="btn btn-success btn-inverted gl-ml-3"
category="secondary"
variant="success"
class="gl-ml-3"
@click="toggleAll"
>
{{ selectAllText }}
</button>
</gl-button>
</div>
</div>
</template>
......@@ -702,13 +702,7 @@ export const approximateDuration = (seconds = 0) => {
* @return {Date} the date object from the params
*/
export const dateFromParams = (year, month, day) => {
const date = new Date();
date.setFullYear(year);
date.setMonth(month);
date.setDate(day);
return date;
return new Date(year, month, day);
};
/**
......
......@@ -20,6 +20,11 @@ module Ci
end
end
# overridden in EE
condition(:protected_environment_access) do
false
end
condition(:owner_of_job) do
@subject.triggered_by?(@user)
end
......@@ -40,7 +45,7 @@ module Ci
@subject.pipeline.webide?
end
rule { protected_ref | archived }.policy do
rule { ~protected_environment_access & (protected_ref | archived) }.policy do
prevent :update_build
prevent :update_commit_status
prevent :erase_build
......
......@@ -167,7 +167,7 @@
= render_if_exists "layouts/nav/requirements_link", project: @project
- if project_nav_tab? :pipelines
= nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts], unless: -> { current_path?('projects/pipelines#charts') }) do
= nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts, :test_cases], unless: -> { current_path?('projects/pipelines#charts') }) do
= link_to project_pipelines_path(@project), class: 'shortcuts-pipelines qa-link-pipelines rspec-link-pipelines', data: { qa_selector: 'ci_cd_link' } do
.nav-icon-container
= sprite_icon('rocket')
......@@ -175,7 +175,7 @@
= _('CI / CD')
%ul.sidebar-sub-level-items
= nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts], html_options: { class: "fly-out-top-item" }) do
= nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts, :test_cases], html_options: { class: "fly-out-top-item" }) do
= link_to project_pipelines_path(@project) do
%strong.fly-out-top-item-name
= _('CI / CD')
......@@ -204,6 +204,8 @@
%span
= _('Schedules')
= render_if_exists "layouts/nav/test_cases_link", project: @project
= render_if_exists 'layouts/nav/sidebar/project_security_link' # EE-specific
- if project_nav_tab? :operations
......
---
title: Support custom Azure Blob Storage domains
merge_request: 40694
author:
type: added
......@@ -80,6 +80,10 @@ Now that the basics of our project is completed, we can publish the package.
To publish the package, you need:
- A personal access token. You can generate a [personal access token](../../../user/profile/personal_access_tokens.md) with the scope set to `api` for repository authentication.
NOTE: **Note:**
[Deploy tokens](./../../project/deploy_tokens/index.md) are not yet supported for use with Composer.
- Your project ID which can be found on the home page of your project.
To publish the package hosted on GitLab, make a `POST` request to the GitLab package API.
......
......@@ -248,6 +248,13 @@ Uploading mypypipackage-0.0.1.tar.gz
This indicates that the package was uploaded successfully. You can then navigate
to your project's **Packages & Registries** page and see the uploaded packages.
If you would rather not use a `.pypirc` file to define your repository source,
you can upload to the repository with the authentication inline:
```shell
TWINE_PASSWORD=<personal_access_token or deploy_token> TWINE_USERNAME=<username or deploy_token_username> python3 -m twine upload --repository-url https://gitlab.com/api/v4/projects/<project_id>/packages/pypi dist/*
```
If you did not follow the guide above, then you need to ensure your package
has been properly built and you [created a PyPi package with `setuptools`](https://packaging.python.org/tutorials/packaging-projects/).
......@@ -292,3 +299,32 @@ Collecting mypypipackage
Installing collected packages: mypypipackage
Successfully installed mypypipackage-0.0.1
```
## Using GitLab CI with PyPI packages
NOTE: **Note:**
`CI_JOB_TOKEN`s are not yet supported for use with PyPI.
To work with PyPI commands within [GitLab CI/CD](./../../../ci/README.md), you can use
[environment variables](./../../../ci/variables/README.md#custom-environment-variables)
to access your authentication tokens in your commands.
Set up environment variables for `TWINE_PASSWORD` and `TWINE_USERNAME` using either:
- A [personal access token](../../../user/profile/personal_access_tokens.md) and your GitLab username.
- A [deploy token](./../../project/deploy_tokens/index.md) and its associated deploy token username.
You can now access your `TWINE_USERNAME` and `TWINE_PASSWORD` using any `twine` command in your
`.gitlab-ci.yml` file.
For example:
```yaml
image: python:latest
run:
script:
- pip install twine
- python setup.py sdist bdist_wheel
- TWINE_PASSWORD=${TWINE_PASSWORD} TWINE_USERNAME=${TWINE_USERNAME} python -m twine upload --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/*
```
......@@ -54,6 +54,12 @@ module ObjectStorage
end
# End AWS-specific options
# Begin Azure-specific options
def azure_storage_domain
credentials[:azure_storage_domain]
end
# End Azure-specific options
def google?
provider == 'Google'
end
......
......@@ -98,6 +98,9 @@ module ObjectStorage
RemoteTempObjectID: object_name,
ObjectStorage: {
Provider: 'AzureRM',
AzureConfig: {
StorageDomain: config.azure_storage_domain
},
GoCloudConfig: {
URL: "azblob://#{bucket_name}"
}
......
......@@ -24263,6 +24263,9 @@ msgstr ""
msgid "Test"
msgstr ""
msgid "Test Cases"
msgstr ""
msgid "Test coverage parsing"
msgstr ""
......
......@@ -3,12 +3,16 @@
require "spec_helper"
RSpec.describe "User views issue" do
let(:project) { create(:project_empty_repo, :public) }
let(:user) { create(:user) }
let(:issue) { create(:issue, project: project, description: "# Description header", author: user) }
let_it_be(:project) { create(:project_empty_repo, :public) }
let_it_be(:user) { create(:user) }
let_it_be(:issue) { create(:issue, project: project, description: "# Description header", author: user) }
let_it_be(:note) { create(:note, noteable: issue, project: project, author: user) }
before do
before_all do
project.add_developer(user)
end
before do
sign_in(user)
visit(project_issue_path(project, issue))
......@@ -37,24 +41,20 @@ RSpec.describe "User views issue" do
context 'when showing status of the author of the issue' do
it_behaves_like 'showing user status' do
let(:user_with_status) { issue.author }
let(:user_with_status) { user }
end
end
context 'when showing status of a user who commented on an issue', :js do
let!(:note) { create(:note, noteable: issue, project: project, author: user_with_status) }
it_behaves_like 'showing user status' do
let(:user_with_status) { create(:user) }
let(:user_with_status) { user }
end
end
context 'when status message has an emoji', :js do
let(:message) { 'My status with an emoji' }
let(:message_emoji) { 'basketball' }
let!(:note) { create(:note, noteable: issue, project: project, author: user) }
let!(:status) { create(:user_status, user: user, emoji: 'smirk', message: "#{message} :#{message_emoji}:") }
let_it_be(:message) { 'My status with an emoji' }
let_it_be(:message_emoji) { 'basketball' }
let_it_be(:status) { create(:user_status, user: user, emoji: 'smirk', message: "#{message} :#{message_emoji}:") }
it 'correctly renders the emoji' do
tooltip_span = page.first(".user-status-emoji[title^='#{message}']")
......
......@@ -211,6 +211,7 @@ RSpec.describe ObjectStorage::DirectUpload do
expect(subject[:UseWorkhorseClient]).to be true
expect(subject[:RemoteTempObjectID]).to eq(object_name)
expect(subject[:ObjectStorage][:Provider]).to eq('AzureRM')
expect(subject[:ObjectStorage][:AzureConfig][:StorageDomain]).to eq(storage_domain)
expect(subject[:ObjectStorage][:GoCloudConfig]).to eq({ URL: "azblob://#{bucket_name}" })
end
end
......@@ -395,20 +396,22 @@ RSpec.describe ObjectStorage::DirectUpload do
}
end
let(:has_length) { false }
let(:storage_domain) { nil }
let(:storage_url) { 'https://azuretest.blob.core.windows.net' }
context 'when length is known' do
let(:has_length) { true }
it_behaves_like 'a valid AzureRM upload'
it_behaves_like 'a valid upload without multipart data'
it_behaves_like 'a valid AzureRM upload'
it_behaves_like 'a valid upload without multipart data'
end
context 'when a custom storage domain is used' do
let(:storage_domain) { 'blob.core.chinacloudapi.cn' }
let(:storage_url) { "https://azuretest.#{storage_domain}" }
context 'when length is unknown' do
let(:has_length) { false }
before do
credentials[:azure_storage_domain] = storage_domain
end
it_behaves_like 'a valid AzureRM upload'
it_behaves_like 'a valid upload without multipart data'
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册