Commit 9a0d9230 authored by Brandon Labuschagne's avatar Brandon Labuschagne Committed by Olena Horal-Koretska

DevOps Adoption - Add SAST and DAST to the adoption table

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