Commit e8f349c5 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch '328033-devops-adoption-add-sast-and-dast-to-the-adoption-table-fe' into 'master'

DevOps Adoption - Add SAST and DAST to the adoption table

See merge request gitlab-org/gitlab!65122
parents 2e09691a 9a0d9230
......@@ -39,25 +39,28 @@ collected before this feature is available.
## DevOps Adoption **(ULTIMATE SELF)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/247112) in GitLab 13.7 as a [Beta feature](https://about.gitlab.com/handbook/product/gitlab-the-product/#beta).
> - The Overview tab [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/330401) in GitLab 14.1.
> - [Deployed behind a feature flag](../../../user/feature_flags.md), disabled by default.
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59267) in GitLab 14.0.
> - Enabled on GitLab.com.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#disable-or-enable-devops-adoption). **(ULTIMATE SELF)**
> - The Overview tab [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/330401) in GitLab 14.1.
> - DAST and SAST metrics [added](https://gitlab.com/gitlab-org/gitlab/-/issues/328033) in GitLab 14.1.
DevOps Adoption shows you which groups within your organization are using the most essential features of GitLab:
- Dev
- Issues
- Merge Requests
- Approvals
- Code owners
- Issues
- Merge requests
- Sec
- DAST
- SAST
- Scans
- Ops
- Runners
- Pipelines
- Deployments
- Pipelines
- Runners
When managing groups in the UI, you can add your groups with the **Add group to table**
button, in the top right hand section the page.
......
......@@ -9,6 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/321083) in GitLab 13.11 as a [Beta feature](https://about.gitlab.com/handbook/product/gitlab-the-product/#beta).
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/333556) in GitLab 14.1.
> - The Overview tab [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/330401) in GitLab 14.1.
> - DAST and SAST metrics [added](https://gitlab.com/gitlab-org/gitlab/-/issues/328033) in GitLab 14.1.
Prerequisites:
......@@ -19,16 +20,18 @@ To access Group DevOps Adoption, go to your group and select **Analytics > DevOp
Group DevOps Adoption shows you how individual groups and sub-groups within your organization use the following features:
- Dev
- Issues
- Merge Requests
- Approvals
- Code owners
- Issues
- Merge requests
- Sec
- DAST
- SAST
- Scans
- Ops
- Runners
- Pipelines
- Deployments
- Pipelines
- Runners
When managing groups in the UI, you can add your sub-groups with the **Add sub-group to table**
button, in the top right hand section of your Groups pages.
......
......@@ -123,7 +123,7 @@ export const DEVOPS_ADOPTION_TABLE_CONFIGURATION = [
{
key: 'mergeRequestApproved',
label: s__('DevopsAdoption|Approvals'),
tooltip: s__('DevopsAdoption|At least one approval on an MR'),
tooltip: s__('DevopsAdoption|At least one approval on a merge request'),
testId: 'approvalsCol',
},
{
......@@ -141,7 +141,7 @@ export const DEVOPS_ADOPTION_TABLE_CONFIGURATION = [
{
key: 'mergeRequestOpened',
label: s__('DevopsAdoption|MRs'),
tooltip: s__('DevopsAdoption|At least one MR opened'),
tooltip: s__('DevopsAdoption|At least one merge request opened'),
testId: 'mrsCol',
},
],
......@@ -152,6 +152,18 @@ export const DEVOPS_ADOPTION_TABLE_CONFIGURATION = [
icon: 'shield',
variant: 'info',
cols: [
{
key: 'dastEnabledCount',
label: s__('DevopsAdoption|DAST'),
tooltip: s__('DevopsAdoption|DAST enabled for at least one project'),
testId: 'dastCol',
},
{
key: 'sastEnabledCount',
label: s__('DevopsAdoption|SAST'),
tooltip: s__('DevopsAdoption|SAST enabled for at least one project'),
testId: 'sastCol',
},
{
key: 'securityScanSucceeded',
label: s__('DevopsAdoption|Scanning'),
......
fragment LatestSnapshot on DevopsAdoptionSnapshot {
issueOpened
mergeRequestOpened
mergeRequestApproved
runnerConfigured
pipelineSucceeded
deploySucceeded
securityScanSucceeded
recordedAt
codeOwnersUsedCount
sastEnabledCount
dastEnabledCount
}
#import "../fragments/latest_snapshot.fragment.graphql"
mutation($namespaceIds: [NamespaceID!]!, $displayNamespaceId: NamespaceID) {
bulkEnableDevopsAdoptionNamespaces(
input: { namespaceIds: $namespaceIds, displayNamespaceId: $displayNamespaceId }
......@@ -5,15 +7,7 @@ mutation($namespaceIds: [NamespaceID!]!, $displayNamespaceId: NamespaceID) {
enabledNamespaces {
id
latestSnapshot {
issueOpened
mergeRequestOpened
mergeRequestApproved
runnerConfigured
pipelineSucceeded
deploySucceeded
securityScanSucceeded
recordedAt
codeOwnersUsedCount
...LatestSnapshot
}
namespace {
fullName
......
#import "../fragments/latest_snapshot.fragment.graphql"
query devopsAdoptionEnabledNamespaces($displayNamespaceId: NamespaceID) {
devopsAdoptionEnabledNamespaces(displayNamespaceId: $displayNamespaceId) {
nodes {
id
latestSnapshot {
issueOpened
mergeRequestOpened
mergeRequestApproved
runnerConfigured
pipelineSucceeded
deploySucceeded
securityScanSucceeded
recordedAt
codeOwnersUsedCount
...LatestSnapshot
}
namespace {
fullName
......
......@@ -4,6 +4,10 @@ import DevopsAdoptionTableCellFlag from 'ee/analytics/devops_report/devops_adopt
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { overallAdoptionData } from '../mock_data';
const metrics = `${overallAdoptionData.featureMeta.filter(({ adopted }) => adopted).length}/${
overallAdoptionData.featureMeta.length
}`;
describe('DevopsAdoptionOverview', () => {
let wrapper;
......@@ -46,7 +50,7 @@ describe('DevopsAdoptionOverview', () => {
const text = wrapper.findByTestId('card-description');
expect(text.exists()).toBe(true);
expect(text.text()).toBe('3/8 Overall adoption features adopted');
expect(text.text()).toBe(`${metrics} Overall adoption features adopted`);
});
describe('meta', () => {
......@@ -83,7 +87,7 @@ describe('DevopsAdoptionOverview', () => {
const text = wrapper.findByTestId('card-description');
expect(text.exists()).toBe(true);
expect(text.text()).toBe('3/8 features adopted');
expect(text.text()).toBe(`${metrics} features adopted`);
});
it('does not display the meta', () => {
......
......@@ -46,6 +46,8 @@ export const devopsAdoptionNamespaceData = {
deploySucceeded: false,
securityScanSucceeded: false,
codeOwnersUsedCount: 0,
sastEnabledCount: 0,
dastEnabledCount: 0,
recordedAt: '2020-10-31T23:59:59Z',
__typename: 'latestSnapshot',
},
......@@ -78,7 +80,7 @@ export const devopsAdoptionTableHeaders = [
{
index: 1,
label: 'Approvals',
tooltip: 'At least one approval on an MR',
tooltip: 'At least one approval on a merge request',
},
{
index: 2,
......@@ -93,7 +95,7 @@ export const devopsAdoptionTableHeaders = [
{
index: 4,
label: 'MRs',
tooltip: 'At least one MR opened',
tooltip: 'At least one merge request opened',
},
{
index: 5,
......@@ -130,6 +132,14 @@ export const overallAdoptionData = {
adopted: true,
title: 'MRs',
},
{
adopted: false,
title: 'DAST',
},
{
adopted: false,
title: 'SAST',
},
{
adopted: false,
title: 'Scanning',
......
......@@ -11150,10 +11150,7 @@ msgstr ""
msgid "DevopsAdoption|Are you sure that you would like to remove %{name} from the table?"
msgstr ""
msgid "DevopsAdoption|At least one MR opened"
msgstr ""
msgid "DevopsAdoption|At least one approval on an MR"
msgid "DevopsAdoption|At least one approval on a merge request"
msgstr ""
msgid "DevopsAdoption|At least one deploy"
......@@ -11162,6 +11159,9 @@ msgstr ""
msgid "DevopsAdoption|At least one issue opened"
msgstr ""
msgid "DevopsAdoption|At least one merge request opened"
msgstr ""
msgid "DevopsAdoption|At least one pipeline successfully run"
msgstr ""
......@@ -11177,6 +11177,12 @@ msgstr ""
msgid "DevopsAdoption|Confirm remove Group"
msgstr ""
msgid "DevopsAdoption|DAST"
msgstr ""
msgid "DevopsAdoption|DAST enabled for at least one project"
msgstr ""
msgid "DevopsAdoption|Deploys"
msgstr ""
......@@ -11231,6 +11237,12 @@ msgstr ""
msgid "DevopsAdoption|Runners"
msgstr ""
msgid "DevopsAdoption|SAST"
msgstr ""
msgid "DevopsAdoption|SAST enabled for at least one project"
msgstr ""
msgid "DevopsAdoption|Save changes"
msgstr ""
......
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