Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1198cf60
Commit
1198cf60
authored
Jun 07, 2020
by
Fernando
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bad merge conflict resolution
parent
e04b74bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
145 deletions
+0
-145
ee/app/views/projects/settings/ci_cd/_managed_licenses.html.haml
...views/projects/settings/ci_cd/_managed_licenses.html.haml
+0
-16
qa/qa/ee/page/project/settings/ci_cd.rb
qa/qa/ee/page/project/settings/ci_cd.rb
+0
-31
qa/qa/specs/features/ee/browser_ui/secure/license_compliance_spec.rb
.../features/ee/browser_ui/secure/license_compliance_spec.rb
+0
-98
No files found.
ee/app/views/projects/settings/ci_cd/_managed_licenses.html.haml
deleted
100644 → 0
View file @
e04b74bd
-
return
unless
@project
.
feature_available?
(
:license_scanning
)
-
expanded
=
expanded_by_default?
%section
.settings.no-animate
#js-license-management
{
class:
(
'expanded'
if
expanded
),
data:
{
qa_selector:
'license_compliance_settings_content'
}
}
.settings-header
%h4
=
s_
(
'LicenseCompliance|License Compliance'
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'user/compliance/license_compliance/index'
),
target:
'_blank'
,
rel:
'noopener noreferrer'
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
?
_
(
'Collapse'
)
:
_
(
'Expand'
)
%p
-
ci
=
link_to
(
s_
(
'Gitlab CI/CD'
),
'https://docs.gitlab.com/ee/ci/'
,
target:
'_blank'
,
rel:
'noopener noreferrer'
)
-
license
=
link_to
(
s_
(
'Auto License Compliance'
),
'https://docs.gitlab.com/ee/topics/autodevops/index.html#auto-license-management-ultimate'
,
target:
'_blank'
,
rel:
'noopener noreferrer'
)
=
s_
(
'LicenseCompliance|Here you can allow or deny licenses for this project. Using %{ci} or %{license} will allow you to see if there are any unmanaged licenses and allow or deny them in merge request.'
).
html_safe
%
{
ci:
ci
,
license:
license
}
.settings-content
#js-managed-licenses
{
data:
{
api_url:
@license_management_url
}
}
qa/qa/ee/page/project/settings/ci_cd.rb
deleted
100644 → 0
View file @
e04b74bd
# frozen_string_literal: true
module
QA
module
EE
module
Page
module
Project
module
Settings
module
CICD
extend
QA
::
Page
::
PageConcern
def
self
.
prepended
(
base
)
super
base
.
class_eval
do
view
'ee/app/views/projects/settings/ci_cd/_managed_licenses.html.haml'
do
element
:license_compliance_settings_content
end
end
end
def
expand_license_compliance
(
&
block
)
expand_section
(
:license_compliance_settings_content
)
do
Settings
::
LicenseCompliance
.
perform
(
&
block
)
end
end
end
end
end
end
end
end
qa/qa/specs/features/ee/browser_ui/secure/license_compliance_spec.rb
deleted
100644 → 0
View file @
e04b74bd
# frozen_string_literal: true
require
'pathname'
module
QA
context
'Secure'
,
:docker
,
:runner
do
let
(
:approved_license_name
)
{
"MIT License"
}
let
(
:denied_license_name
)
{
"WTFPL"
}
describe
'License Compliance settings page'
do
before
do
Flow
::
Login
.
sign_in
@project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
Runtime
::
Env
.
auto_devops_project_name
||
'project-with-secure'
project
.
description
=
'Project with Secure'
end
@project
.
visit!
Page
::
Project
::
Menu
.
perform
(
&
:go_to_ci_cd_settings
)
Page
::
Project
::
Settings
::
CICD
.
perform
(
&
:expand_license_compliance
)
end
it
'can approve a license in the settings page'
do
QA
::
EE
::
Page
::
Project
::
Settings
::
LicenseCompliance
.
perform
do
|
license_compliance
|
license_compliance
.
approve_license
approved_license_name
expect
(
license_compliance
).
to
have_approved_license
approved_license_name
end
end
it
'can deny a license in the settings page'
do
QA
::
EE
::
Page
::
Project
::
Settings
::
LicenseCompliance
.
perform
do
|
license_compliance
|
license_compliance
.
deny_license
denied_license_name
expect
(
license_compliance
).
to
have_denied_license
denied_license_name
end
end
end
describe
'License Compliance pipeline reports'
do
let
(
:number_of_licenses_in_fixture
)
{
2
}
after
do
@runner
.
remove_via_api!
end
before
do
@executor
=
"qa-runner-
#{
Time
.
now
.
to_i
}
"
Flow
::
Login
.
sign_in
@project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
Runtime
::
Env
.
auto_devops_project_name
||
'project-with-secure'
project
.
description
=
'Project with Secure'
end
@runner
=
Resource
::
Runner
.
fabricate!
do
|
runner
|
runner
.
project
=
@project
runner
.
name
=
@executor
runner
.
tags
=
%w[qa test]
end
# Push fixture to generate Secure reports
Resource
::
Repository
::
ProjectPush
.
fabricate!
do
|
project_push
|
project_push
.
project
=
@project
project_push
.
directory
=
Pathname
.
new
(
__dir__
)
.
join
(
'../../../../../ee/fixtures/secure_premade_reports'
)
project_push
.
commit_message
=
'Create Secure compatible application to serve premade reports'
end
.
project
.
visit!
Page
::
Project
::
Menu
.
perform
(
&
:go_to_ci_cd_settings
)
Page
::
Project
::
Settings
::
CICD
.
perform
(
&
:expand_license_compliance
)
QA
::
EE
::
Page
::
Project
::
Settings
::
LicenseCompliance
.
perform
do
|
license_compliance
|
license_compliance
.
approve_license
approved_license_name
license_compliance
.
deny_license
denied_license_name
end
Page
::
Project
::
Menu
.
perform
(
&
:click_ci_cd_pipelines
)
Page
::
Project
::
Pipeline
::
Index
.
perform
(
&
:wait_for_latest_pipeline_success
)
end
it
'displays license approval status in the pipeline'
do
Page
::
Project
::
Menu
.
perform
(
&
:click_ci_cd_pipelines
)
Page
::
Project
::
Pipeline
::
Index
.
perform
(
&
:click_on_latest_pipeline
)
Page
::
Project
::
Pipeline
::
Show
.
perform
do
|
pipeline
|
pipeline
.
click_on_licenses
expect
(
pipeline
).
to
have_license_count_of
number_of_licenses_in_fixture
expect
(
pipeline
).
to
have_approved_license
approved_license_name
expect
(
pipeline
).
to
have_blacklisted_license
denied_license_name
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment