Commit 62155c4d authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents cff478eb dbf8005a
...@@ -66,7 +66,8 @@ module Git ...@@ -66,7 +66,8 @@ module Git
def strip_extension(filename) def strip_extension(filename)
return unless filename return unless filename
File.basename(filename, File.extname(filename)) encoded_filename = Gitlab::EncodingHelper.encode_utf8(filename.dup)
File.basename(encoded_filename, File.extname(encoded_filename))
end end
end end
end end
......
--- ---
data_category: Optional data_category: Operational
key_path: counts_monthly.deployments key_path: counts_monthly.deployments
description: Total deployments count for recent 28 days description: Total deployments count for recent 28 days
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: redis_hll_counters.analytics.analytics_total_unique_counts_monthly key_path: redis_hll_counters.analytics.analytics_total_unique_counts_monthly
description: The number of unique users who visited any analytics feature by month description: The number of unique users who visited any analytics feature by month
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.configure.project_clusters_enabled key_path: usage_activity_by_stage_monthly.configure.project_clusters_enabled
description: Total GitLab Managed enabled clusters attached to projects description: Total GitLab Managed enabled clusters attached to projects
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.user_dast_jobs key_path: usage_activity_by_stage_monthly.secure.user_dast_jobs
description: Users who run a DAST job description: Users who run a DAST job
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.dast_pipeline key_path: usage_activity_by_stage_monthly.secure.dast_pipeline
description: Count of pipelines that have at least 1 DAST job description: Count of pipelines that have at least 1 DAST job
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.user_api_fuzzing_jobs key_path: usage_activity_by_stage_monthly.secure.user_api_fuzzing_jobs
description: Count of API Fuzzing jobs by job name description: Count of API Fuzzing jobs by job name
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.user_api_fuzzing_dnd_jobs key_path: usage_activity_by_stage_monthly.secure.user_api_fuzzing_dnd_jobs
description: Count of API Fuzzing `docker-in-docker` jobs by job names description: Count of API Fuzzing `docker-in-docker` jobs by job names
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: redis_hll_counters.incident_management.incident_management_total_unique_counts_monthly key_path: redis_hll_counters.incident_management.incident_management_total_unique_counts_monthly
description: Count of unique users performing events related with incidents per month description: Count of unique users performing events related with incidents per month
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.plan.service_desk_issues key_path: usage_activity_by_stage_monthly.plan.service_desk_issues
description: description:
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.plan.projects_jira_active key_path: usage_activity_by_stage_monthly.plan.projects_jira_active
description: description:
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.plan.projects_jira_dvcs_cloud_active key_path: usage_activity_by_stage_monthly.plan.projects_jira_dvcs_cloud_active
description: description:
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.plan.projects_jira_dvcs_server_active key_path: usage_activity_by_stage_monthly.plan.projects_jira_dvcs_server_active
description: description:
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: redis_hll_counters.issues_edit.g_project_management_issue_created_monthly key_path: redis_hll_counters.issues_edit.g_project_management_issue_created_monthly
description: Count of MAU creating new issues description: Count of MAU creating new issues
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: redis_hll_counters.issues_edit.g_project_management_issue_closed_monthly key_path: redis_hll_counters.issues_edit.g_project_management_issue_closed_monthly
description: Count of MAU closing an issue description: Count of MAU closing an issue
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: redis_hll_counters.issues_edit.issues_edit_total_unique_counts_monthly key_path: redis_hll_counters.issues_edit.issues_edit_total_unique_counts_monthly
description: Aggregate count of MAU taking an action related to an issue description: Aggregate count of MAU taking an action related to an issue
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.user_unique_users_all_secure_scanners key_path: usage_activity_by_stage_monthly.secure.user_unique_users_all_secure_scanners
description: description:
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.user_sast_jobs key_path: usage_activity_by_stage_monthly.secure.user_sast_jobs
description: Users who run a SAST job description: Users who run a SAST job
product_section: sec product_section: sec
...@@ -10,7 +10,6 @@ value_type: number ...@@ -10,7 +10,6 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: database data_source: database
data_category: Optional
distribution: distribution:
- ce - ce
- ee - ee
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.user_secret_detection_jobs key_path: usage_activity_by_stage_monthly.secure.user_secret_detection_jobs
description: Users who run a Secret Detection job description: Users who run a Secret Detection job
product_section: sec product_section: sec
...@@ -10,7 +10,6 @@ value_type: number ...@@ -10,7 +10,6 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: database data_source: database
data_category: Optional
distribution: distribution:
- ce - ce
- ee - ee
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.sast_pipeline key_path: usage_activity_by_stage_monthly.secure.sast_pipeline
description: Counts of Pipelines that have at least 1 SAST job description: Counts of Pipelines that have at least 1 SAST job
product_section: sec product_section: sec
...@@ -10,7 +10,6 @@ value_type: number ...@@ -10,7 +10,6 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: database data_source: database
data_category: Optional
distribution: distribution:
- ce - ce
- ee - ee
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.secret_detection_pipeline key_path: usage_activity_by_stage_monthly.secure.secret_detection_pipeline
description: Counts of Pipelines that have at least 1 Secret Detection job description: Counts of Pipelines that have at least 1 Secret Detection job
product_section: sec product_section: sec
...@@ -10,7 +10,6 @@ value_type: number ...@@ -10,7 +10,6 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: database data_source: database
data_category: Optional
distribution: distribution:
- ce - ce
- ee - ee
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.user_coverage_fuzzing_jobs key_path: usage_activity_by_stage_monthly.secure.user_coverage_fuzzing_jobs
description: '' description: ''
product_section: '' product_section: ''
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.sast_scans key_path: usage_activity_by_stage_monthly.secure.sast_scans
description: '' description: ''
product_section: '' product_section: ''
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.container_scanning_scans key_path: usage_activity_by_stage_monthly.secure.container_scanning_scans
description: '' description: ''
product_section: '' product_section: ''
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.dast_scans key_path: usage_activity_by_stage_monthly.secure.dast_scans
description: '' description: ''
product_section: '' product_section: ''
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.secret_detection_scans key_path: usage_activity_by_stage_monthly.secure.secret_detection_scans
description: '' description: ''
product_section: '' product_section: ''
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.coverage_fuzzing_scans key_path: usage_activity_by_stage_monthly.secure.coverage_fuzzing_scans
description: '' description: ''
product_section: '' product_section: ''
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.api_fuzzing_scans key_path: usage_activity_by_stage_monthly.secure.api_fuzzing_scans
description: '' description: ''
product_section: '' product_section: ''
......
--- ---
data_category: Optional data_category: Operational
key_path: redis_hll_counters.terraform.p_terraform_state_api_unique_users_monthly key_path: redis_hll_counters.terraform.p_terraform_state_api_unique_users_monthly
description: Monthly active users of GitLab Managed Terraform states description: Monthly active users of GitLab Managed Terraform states
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: redis_hll_counters.user_packages.user_packages_total_unique_counts_monthly key_path: redis_hll_counters.user_packages.user_packages_total_unique_counts_monthly
description: A monthly count of users that have published a package to the registry description: A monthly count of users that have published a package to the registry
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: gitaly.servers key_path: gitaly.servers
description: Total Gitalty Servers description: Total Gitalty Servers
product_section: growth product_section: growth
......
--- ---
data_category: Optional data_category: Operational
key_path: gitaly.clusters key_path: gitaly.clusters
description: Total GitLab Managed clusters both enabled and disabled description: Total GitLab Managed clusters both enabled and disabled
product_section: growth product_section: growth
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.service_desk_issues key_path: counts.service_desk_issues
description: Count of service desk issues description: Count of service desk issues
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.merge_requests key_path: counts.merge_requests
description: Count of the number of merge requests description: Count of the number of merge requests
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.clusters_applications_cilium key_path: counts.clusters_applications_cilium
description: Total GitLab Managed clusters with GitLab Managed App:Cilium installed description: Total GitLab Managed clusters with GitLab Managed App:Cilium installed
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_with_terraform_reports key_path: counts.projects_with_terraform_reports
description: Count of projects with Terraform MR reports description: Count of projects with Terraform MR reports
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_with_terraform_states key_path: counts.projects_with_terraform_states
description: Count of projects with GitLab Managed Terraform State description: Count of projects with GitLab Managed Terraform State
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.ingress_modsecurity_packets_processed key_path: counts.ingress_modsecurity_packets_processed
description: Cumulative count of packets processed by ModSecurity since Usage Ping description: Cumulative count of packets processed by ModSecurity since Usage Ping
was last reported was last reported
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.ingress_modsecurity_packets_anomalous key_path: counts.ingress_modsecurity_packets_anomalous
description: Cumulative count of packets identified as anomalous by ModSecurity since description: Cumulative count of packets identified as anomalous by ModSecurity since
Usage Ping was last reported Usage Ping was last reported
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.network_policy_forwards key_path: counts.network_policy_forwards
description: Cumulative count of packets forwarded by Cilium (Container Network Security) description: Cumulative count of packets forwarded by Cilium (Container Network Security)
since Usage Ping was last reported since Usage Ping was last reported
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.network_policy_drops key_path: counts.network_policy_drops
description: Cumulative count of packets dropped by Cilium (Container Network Security) description: Cumulative count of packets dropped by Cilium (Container Network Security)
since Usage Ping was last reported since Usage Ping was last reported
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.ingress_modsecurity_logging key_path: counts.ingress_modsecurity_logging
description: Whether or not ModSecurity is set to logging mode description: Whether or not ModSecurity is set to logging mode
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.ingress_modsecurity_blocking key_path: counts.ingress_modsecurity_blocking
description: Whether or not ModSecurity is set to blocking mode description: Whether or not ModSecurity is set to blocking mode
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.ingress_modsecurity_disabled key_path: counts.ingress_modsecurity_disabled
description: Whether or not ModSecurity is disabled within Ingress description: Whether or not ModSecurity is disabled within Ingress
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.ingress_modsecurity_not_installed key_path: counts.ingress_modsecurity_not_installed
description: Whether or not ModSecurity has not been installed into the cluster description: Whether or not ModSecurity has not been installed into the cluster
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.ci_builds key_path: counts.ci_builds
description: Unique builds in project description: Unique builds in project
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.ci_internal_pipelines key_path: counts.ci_internal_pipelines
description: Total pipelines in GitLab repositories description: Total pipelines in GitLab repositories
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.ci_external_pipelines key_path: counts.ci_external_pipelines
description: Total pipelines in external repositories description: Total pipelines in external repositories
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.dast_jobs key_path: counts.dast_jobs
description: Count of DAST jobs run description: Count of DAST jobs run
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.user_dast_jobs key_path: usage_activity_by_stage.secure.user_dast_jobs
description: Count of DAST jobs description: Count of DAST jobs
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_bamboo_active key_path: counts.projects_bamboo_active
description: Count of projects with active integrations for Bamboo CI description: Count of projects with active integrations for Bamboo CI
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_drone_ci_active key_path: counts.projects_drone_ci_active
description: Count of projects with active integrations for Drone CI description: Count of projects with active integrations for Drone CI
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_jenkins_active key_path: counts.projects_jenkins_active
description: Count of projects with active integrations for Jenkins description: Count of projects with active integrations for Jenkins
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_jira_active key_path: counts.projects_jira_active
description: Count of projects with active integrations for Jira description: Count of projects with active integrations for Jira
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_jira_server_active key_path: counts.projects_jira_server_active
description: Count of active integrations with Jira Software (server) description: Count of active integrations with Jira Software (server)
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_jira_cloud_active key_path: counts.projects_jira_cloud_active
description: Count of active integrations with Jira Cloud (Saas) description: Count of active integrations with Jira Cloud (Saas)
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_jira_dvcs_cloud_active key_path: counts.projects_jira_dvcs_cloud_active
description: Count of active integrations with Jira Cloud (DVCS Connector) description: Count of active integrations with Jira Cloud (DVCS Connector)
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_jira_dvcs_server_active key_path: counts.projects_jira_dvcs_server_active
description: Count of active integrations with Jira Software (DVCS connector) description: Count of active integrations with Jira Software (DVCS connector)
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.user_api_fuzzing_jobs key_path: usage_activity_by_stage.secure.user_api_fuzzing_jobs
description: Count of API Fuzzing jobs by job name description: Count of API Fuzzing jobs by job name
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.user_api_fuzzing_dnd_jobs key_path: usage_activity_by_stage.secure.user_api_fuzzing_dnd_jobs
description: Count of API Fuzzing `docker-in-docker` jobs by job name description: Count of API Fuzzing `docker-in-docker` jobs by job name
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_imported_from_github key_path: counts.projects_imported_from_github
description: description:
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.manage.issue_imports.jira key_path: usage_activity_by_stage.manage.issue_imports.jira
description: Count of projects imported from Jira description: Count of projects imported from Jira
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.issues key_path: counts.issues
description: Count of Issues created description: Count of Issues created
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.plan.issues key_path: usage_activity_by_stage.plan.issues
description: Count of users creating Issues description: Count of users creating Issues
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.plan.epics key_path: usage_activity_by_stage.plan.epics
description: description:
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects key_path: counts.projects
description: Count of Projects created description: Count of Projects created
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.todos key_path: counts.todos
description: Count of todos created description: Count of todos created
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.user_unique_users_all_secure_scanners key_path: usage_activity_by_stage.secure.user_unique_users_all_secure_scanners
description: description:
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.remote_mirrors key_path: counts.remote_mirrors
description: Count of total remote mirrors. Includes both push and pull mirrors description: Count of total remote mirrors. Includes both push and pull mirrors
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.sast_jobs key_path: counts.sast_jobs
description: Count of SAST CI jobs for the month. Job names ending in '-sast' description: Count of SAST CI jobs for the month. Job names ending in '-sast'
product_section: sec product_section: sec
...@@ -10,7 +10,6 @@ value_type: number ...@@ -10,7 +10,6 @@ value_type: number
status: data_available status: data_available
time_frame: all time_frame: all
data_source: database data_source: database
data_category: Optional
distribution: distribution:
- ce - ce
- ee - ee
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.secret_detection_jobs key_path: counts.secret_detection_jobs
description: Count of all 'secret-detection' CI jobs. description: Count of all 'secret-detection' CI jobs.
product_section: sec product_section: sec
...@@ -10,7 +10,6 @@ value_type: number ...@@ -10,7 +10,6 @@ value_type: number
status: data_available status: data_available
time_frame: all time_frame: all
data_source: database data_source: database
data_category: Optional
distribution: distribution:
- ce - ce
- ee - ee
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.user_sast_jobs key_path: usage_activity_by_stage.secure.user_sast_jobs
description: Count of SAST jobs per user description: Count of SAST jobs per user
product_section: sec product_section: sec
...@@ -10,7 +10,6 @@ value_type: number ...@@ -10,7 +10,6 @@ value_type: number
status: data_available status: data_available
time_frame: all time_frame: all
data_source: database data_source: database
data_category: Optional
distribution: distribution:
- ce - ce
- ee - ee
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.user_secret_detection_jobs key_path: usage_activity_by_stage.secure.user_secret_detection_jobs
description: Count of Secret Detection Jobs per user description: Count of Secret Detection Jobs per user
product_section: sec product_section: sec
...@@ -10,7 +10,6 @@ value_type: number ...@@ -10,7 +10,6 @@ value_type: number
status: data_available status: data_available
time_frame: all time_frame: all
data_source: database data_source: database
data_category: Optional
distribution: distribution:
- ce - ce
- ee - ee
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.user_coverage_fuzzing_jobs key_path: usage_activity_by_stage.secure.user_coverage_fuzzing_jobs
description: '' description: ''
product_section: '' product_section: ''
......
--- ---
data_category: Optional data_category: Operational
key_path: gitaly.version key_path: gitaly.version
description: Version of Gitaly description: Version of Gitaly
product_section: growth product_section: growth
......
--- ---
data_category: Optional data_category: Operational
key_path: git.version key_path: git.version
description: Information about Git version description: Information about Git version
product_section: enablement product_section: enablement
......
--- ---
data_category: Optional data_category: Operational
key_path: ingress_modsecurity_enabled key_path: ingress_modsecurity_enabled
description: Whether or not ModSecurity is enabled within Ingress description: Whether or not ModSecurity is enabled within Ingress
product_section: sec product_section: sec
......
...@@ -70,7 +70,7 @@ is the same as [getting the job's artifacts](#get-job-artifacts), but by ...@@ -70,7 +70,7 @@ is the same as [getting the job's artifacts](#get-job-artifacts), but by
defining the job's name instead of its ID. defining the job's name instead of its ID.
NOTE: NOTE:
If a pipeline is [parent of other child pipelines](../ci/parent_child_pipelines.md), artifacts If a pipeline is [parent of other child pipelines](../ci/pipelines/parent_child_pipelines.md), artifacts
are searched in hierarchical order from parent to child. For example, if both parent and are searched in hierarchical order from parent to child. For example, if both parent and
child pipelines have a job with the same name, the artifact from the parent pipeline is returned. child pipelines have a job with the same name, the artifact from the parent pipeline is returned.
...@@ -172,7 +172,7 @@ pipeline for the given reference name from inside the job's artifacts archive. ...@@ -172,7 +172,7 @@ pipeline for the given reference name from inside the job's artifacts archive.
The file is extracted from the archive and streamed to the client. The file is extracted from the archive and streamed to the client.
In [GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/201784) and later, artifacts In [GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/201784) and later, artifacts
for [parent and child pipelines](../ci/parent_child_pipelines.md) are searched in hierarchical for [parent and child pipelines](../ci/pipelines/parent_child_pipelines.md) are searched in hierarchical
order from parent to child. For example, if both parent and child pipelines have a order from parent to child. For example, if both parent and child pipelines have a
job with the same name, the artifact from the parent pipeline is returned. job with the same name, the artifact from the parent pipeline is returned.
......
...@@ -295,7 +295,7 @@ Example of response ...@@ -295,7 +295,7 @@ Example of response
``` ```
In GitLab 13.3 and later, this endpoint [returns data for any pipeline](pipelines.md#single-pipeline-requests) In GitLab 13.3 and later, this endpoint [returns data for any pipeline](pipelines.md#single-pipeline-requests)
including [child pipelines](../ci/parent_child_pipelines.md). including [child pipelines](../ci/pipelines/parent_child_pipelines.md).
In GitLab 13.5 and later, this endpoint does not return retried jobs in the response In GitLab 13.5 and later, this endpoint does not return retried jobs in the response
by default. Additionally, jobs are sorted by ID in descending order (newest first). by default. Additionally, jobs are sorted by ID in descending order (newest first).
......
...@@ -11,7 +11,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w ...@@ -11,7 +11,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36494) in GitLab 13.3. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36494) in GitLab 13.3.
Endpoints that request information about a single pipeline return data for any pipeline. Endpoints that request information about a single pipeline return data for any pipeline.
Before 13.3, requests for [child pipelines](../ci/parent_child_pipelines.md) returned Before 13.3, requests for [child pipelines](../ci/pipelines/parent_child_pipelines.md) returned
a 404 error. a 404 error.
## Pipelines pagination ## Pipelines pagination
......
...@@ -129,7 +129,7 @@ All project maintainers have access to production secrets. If you need to limit ...@@ -129,7 +129,7 @@ All project maintainers have access to production secrets. If you need to limit
that can deploy to a production environment, you can create a separate project and configure a new that can deploy to a production environment, you can create a separate project and configure a new
permission model that isolates the CD permissions from the original project and prevents the permission model that isolates the CD permissions from the original project and prevents the
original project's maintainers from accessing the production secret and CD configuration. You can original project's maintainers from accessing the production secret and CD configuration. You can
connect the CD project to your development projects by using [multi-project pipelines](../multi_project_pipelines.md). connect the CD project to your development projects by using [multi-project pipelines](../pipelines/multi_project_pipelines.md).
## Protect `gitlab-ci.yml` from change ## Protect `gitlab-ci.yml` from change
......
...@@ -221,8 +221,8 @@ check the value of the `$CI_PIPELINE_SOURCE` variable: ...@@ -221,8 +221,8 @@ check the value of the `$CI_PIPELINE_SOURCE` variable:
| `external` | When you use CI services other than GitLab. | | `external` | When you use CI services other than GitLab. |
| `external_pull_request_event` | When an external pull request on GitHub is created or updated. See [Pipelines for external pull requests](../ci_cd_for_external_repos/index.md#pipelines-for-external-pull-requests). | | `external_pull_request_event` | When an external pull request on GitHub is created or updated. See [Pipelines for external pull requests](../ci_cd_for_external_repos/index.md#pipelines-for-external-pull-requests). |
| `merge_request_event` | For pipelines created when a merge request is created or updated. Required to enable [merge request pipelines](../pipelines/merge_request_pipelines.md), [merged results pipelines](../pipelines/pipelines_for_merged_results.md), and [merge trains](../pipelines/merge_trains.md). | | `merge_request_event` | For pipelines created when a merge request is created or updated. Required to enable [merge request pipelines](../pipelines/merge_request_pipelines.md), [merged results pipelines](../pipelines/pipelines_for_merged_results.md), and [merge trains](../pipelines/merge_trains.md). |
| `parent_pipeline` | For pipelines triggered by a [parent/child pipeline](../parent_child_pipelines.md) with `rules`. Use this pipeline source in the child pipeline configuration so that it can be triggered by the parent pipeline. | | `parent_pipeline` | For pipelines triggered by a [parent/child pipeline](../pipelines/parent_child_pipelines.md) with `rules`. Use this pipeline source in the child pipeline configuration so that it can be triggered by the parent pipeline. |
| `pipeline` | For [multi-project pipelines](../multi_project_pipelines.md) created by [using the API with `CI_JOB_TOKEN`](../multi_project_pipelines.md#create-multi-project-pipelines-by-using-the-api), or the [`trigger`](../yaml/index.md#trigger) keyword. | | `pipeline` | For [multi-project pipelines](../pipelines/multi_project_pipelines.md) created by [using the API with `CI_JOB_TOKEN`](../pipelines/multi_project_pipelines.md#create-multi-project-pipelines-by-using-the-api), or the [`trigger`](../yaml/index.md#trigger) keyword. |
| `push` | For pipelines triggered by a `git push` event, including for branches and tags. | | `push` | For pipelines triggered by a `git push` event, including for branches and tags. |
| `schedule` | For [scheduled pipelines](../pipelines/schedules.md). | | `schedule` | For [scheduled pipelines](../pipelines/schedules.md). |
| `trigger` | For pipelines created by using a [trigger token](../triggers/index.md#trigger-token). | | `trigger` | For pipelines created by using a [trigger token](../triggers/index.md#trigger-token). |
......
--- ---
stage: Verify redirect_to: 'pipelines/multi_project_pipelines.md'
group: Pipeline Authoring
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
type: reference
--- ---
# Multi-project pipelines **(FREE)** This document was moved to [another location](pipelines/multi_project_pipelines.md).
> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/199224) to GitLab Free in 12.8. <!-- This redirect file can be deleted after 2021-09-29. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->
You can set up [GitLab CI/CD](index.md) across multiple projects, so that a pipeline
in one project can trigger a pipeline in another project. You can visualize the entire pipeline
in one place, including all cross-project interdependencies.
For example, you might deploy your web application from three different projects in GitLab.
Each project has its own build, test, and deploy process. With multi-project pipelines you can
visualize the entire pipeline, including all build and test stages for all three projects.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For an overview, see the [Multi-project pipelines demo](https://www.youtube.com/watch?v=g_PIwBM1J84).
Multi-project pipelines are also useful for larger products that require cross-project interdependencies, like those
with a [microservices architecture](https://about.gitlab.com/blog/2016/08/16/trends-in-version-control-land-microservices/).
Learn more in the [Cross-project Pipeline Triggering and Visualization demo](https://about.gitlab.com/learn/)
at GitLab@learn, in the Continuous Integration section.
If you trigger a pipeline in a downstream private project, on the upstream project's pipelines page,
you can view:
- The name of the project.
- The status of the pipeline.
If you have a public project that can trigger downstream pipelines in a private project,
make sure there are no confidentiality problems.
## Create multi-project pipelines
To create multi-project pipelines, you can:
- [Define them in your `.gitlab-ci.yml` file](#define-multi-project-pipelines-in-your-gitlab-ciyml-file).
- [Use the API](#create-multi-project-pipelines-by-using-the-api).
### Define multi-project pipelines in your `.gitlab-ci.yml` file
> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/199224) to GitLab Free in 12.8.
When you create a multi-project pipeline in your `.gitlab-ci.yml` file,
you create what is called a *trigger job*. For example:
```yaml
rspec:
stage: test
script: bundle exec rspec
staging:
variables:
ENVIRONMENT: staging
stage: deploy
trigger: my/deployment
```
In this example, after the `rspec` job succeeds in the `test` stage,
the `staging` trigger job starts. The initial status of this
job is `pending`.
GitLab then creates a downstream pipeline in the
`my/deployment` project and, as soon as the pipeline is created, the
`staging` job succeeds. The full path to the project is `my/deployment`.
You can view the status for the pipeline, or you can display
[the downstream pipeline's status instead](#mirror-status-of-a-triggered-pipeline-in-the-trigger-job).
The user that creates the upstream pipeline must be able to create pipelines in the
downstream project (`my/deployment`) too. If the downstream project is not found,
or the user does not have [permission](../user/permissions.md) to create a pipeline there,
the `staging` job is marked as _failed_.
#### Trigger job configuration keywords
Trigger jobs can use only a limited set of the GitLab CI/CD [configuration keywords](yaml/index.md).
The keywords available for use in trigger jobs are:
- [`trigger`](yaml/index.md#trigger)
- [`stage`](yaml/index.md#stage)
- [`allow_failure`](yaml/index.md#allow_failure)
- [`rules`](yaml/index.md#rules)
- [`only` and `except`](yaml/index.md#only--except)
- [`when`](yaml/index.md#when) (only with a value of `on_success`, `on_failure`, or `always`)
- [`extends`](yaml/index.md#extends)
- [`needs`](yaml/index.md#needs)
#### Specify a downstream pipeline branch
You can specify a branch name for the downstream pipeline to use.
GitLab uses the commit on the head of the branch to
create the downstream pipeline.
```yaml
rspec:
stage: test
script: bundle exec rspec
staging:
stage: deploy
trigger:
project: my/deployment
branch: stable-11-2
```
Use:
- The `project` keyword to specify the full path to a downstream project.
- The `branch` keyword to specify the name of a branch in the project specified by `project`.
[In GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/-/issues/10126) and later, variable expansion is
supported.
Pipelines triggered on a protected branch in a downstream project use the [role](../user/permissions.md)
of the user that ran the trigger job in the upstream project. If the user does not
have permission to run CI/CD pipelines against the protected branch, the pipeline fails. See
[pipeline security for protected branches](pipelines/index.md#pipeline-security-on-protected-branches).
#### Pass CI/CD variables to a downstream pipeline by using the `variables` keyword
Sometimes you might want to pass CI/CD variables to a downstream pipeline.
You can do that by using the `variables` keyword, just like you would for any other job.
```yaml
rspec:
stage: test
script: bundle exec rspec
staging:
variables:
ENVIRONMENT: staging
stage: deploy
trigger: my/deployment
```
The `ENVIRONMENT` variable is passed to every job defined in a downstream
pipeline. It is available as a variable when GitLab Runner picks a job.
In the following configuration, the `MY_VARIABLE` variable is passed to the downstream pipeline
that is created when the `trigger-downstream` job is queued. This is because `trigger-downstream`
job inherits variables declared in global variables blocks, and then we pass these variables to a downstream pipeline.
```yaml
variables:
MY_VARIABLE: my-value
trigger-downstream:
variables:
ENVIRONMENT: something
trigger: my/project
```
You might want to pass some information about the upstream pipeline using, for
example, predefined variables. In order to do that, you can use interpolation
to pass any variable. For example:
```yaml
downstream-job:
variables:
UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME
trigger: my/project
```
In this scenario, the `UPSTREAM_BRANCH` variable with a value related to the
upstream pipeline is passed to the `downstream-job` job. It is available
in the context of all downstream builds.
Upstream pipelines take precedence over downstream ones. If there are two
variables with the same name defined in both upstream and downstream projects,
the ones defined in the upstream project take precedence.
#### Pass CI/CD variables to a downstream pipeline by using variable inheritance
You can pass variables to a downstream pipeline with [`dotenv` variable inheritance](variables/index.md#pass-an-environment-variable-to-another-job) and [cross project artifact downloads](yaml/index.md#cross-project-artifact-downloads-with-needs).
In the upstream pipeline:
1. Save the variables in a `.env` file.
1. Save the `.env` file as a `dotenv` report.
1. Trigger the downstream pipeline.
```yaml
build_vars:
stage: build
script:
- echo "BUILD_VERSION=hello" >> build.env
artifacts:
reports:
dotenv: build.env
deploy:
stage: deploy
trigger: my/downstream_project
```
1. Set the `test` job in the downstream pipeline to inherit the variables from the `build_vars`
job in the upstream project with `needs:`. The `test` job inherits the variables in the
`dotenv` report and it can access `BUILD_VERSION` in the script:
```yaml
test:
stage: test
script:
- echo $BUILD_VERSION
needs:
- project: my/upstream_project
job: build_vars
ref: master
artifacts: true
```
#### Use `rules` or `only`/`except` with multi-project pipelines
You can use CI/CD variables or the [`rules`](yaml/index.md#rulesif) keyword to
[control job behavior](jobs/job_control.md) for multi-project pipelines. When a
downstream pipeline is triggered with the [`trigger`](yaml/index.md#trigger) keyword,
the value of the [`$CI_PIPELINE_SOURCE` predefined variable](variables/predefined_variables.md)
is `pipeline` for all its jobs.
If you use [`only/except`](yaml/index.md#only--except) to control job behavior, use the
[`pipelines`](yaml/index.md#onlyrefs--exceptrefs) keyword.
#### Mirror status of a triggered pipeline in the trigger job
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11238) in GitLab Premium 12.3.
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/199224) to GitLab Free in 12.8.
You can mirror the pipeline status from the triggered pipeline to the source
trigger job by using `strategy: depend`. For example:
```yaml
trigger_job:
trigger:
project: my/project
strategy: depend
```
#### Mirror status from upstream pipeline
You can mirror the pipeline status from an upstream pipeline to a bridge job by
using the `needs:pipeline` keyword. The latest pipeline status from the default branch is
replicated to the bridge job.
For example:
```yaml
upstream_bridge:
stage: test
needs:
pipeline: other/project
```
### Create multi-project pipelines by using the API
> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/31573) to GitLab Free in 12.4.
When you use the [`CI_JOB_TOKEN` to trigger pipelines](triggers/index.md#ci-job-token),
GitLab recognizes the source of the job token. The pipelines become related,
so you can visualize their relationships on pipeline graphs.
These relationships are displayed in the pipeline graph by showing inbound and
outbound connections for upstream and downstream pipeline dependencies.
When using:
- CI/CD variables or [`rules`](yaml/index.md#rulesif) to control job behavior, the value of
the [`$CI_PIPELINE_SOURCE` predefined variable](variables/predefined_variables.md) is
`pipeline` for multi-project pipeline triggered through the API with `CI_JOB_TOKEN`.
- [`only/except`](yaml/index.md#only--except) to control job behavior, use the
`pipelines` keyword.
## Trigger a pipeline when an upstream project is rebuilt **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/9045) in GitLab Premium 12.8.
You can trigger a pipeline in your project whenever a pipeline finishes for a new
tag in a different project.
Prerequisites:
- The upstream project must be [public](../public_access/public_access.md).
- The user must have the [Developer role](../user/permissions.md#project-members-permissions)
in the upstream project.
To trigger the pipeline when the upstream project is rebuilt:
1. On the top bar, select **Menu > Projects** and find your project.
1. On the left sidebar, select **Settings > CI/CD** page.
1. Expand the **Pipeline subscriptions** section.
1. Enter the project you want to subscribe to, in the format `<namespace>/<project>`.
For example, if the project is `https://gitlab.com/gitlab-org/gitlab`, use `gitlab-org/gitlab`.
1. Select **Subscribe**.
Any pipelines that complete successfully for new tags in the subscribed project
now trigger a pipeline on the current project's default branch. The maximum
number of upstream pipeline subscriptions is 2 by default, for both the upstream and
downstream projects. On self-managed instances, an administrator can change this
[limit](../administration/instance_limits.md#number-of-cicd-subscriptions-to-a-project).
## Multi-project pipeline visualization **(PREMIUM)**
When you configure GitLab CI/CD for your project, you can visualize the stages of your
[jobs](pipelines/index.md#configure-a-pipeline) on a [pipeline graph](pipelines/index.md#visualize-pipelines).
![Multi-project pipeline graph](img/multi_project_pipeline_graph.png)
In the merge request, on the **Pipelines** tab, multi-project pipeline mini-graphs are displayed.
They expand and are shown adjacent to each other when hovering (or tapping on touchscreen devices).
![Multi-project mini graph](img/multi_pipeline_mini_graph.gif)
--- ---
stage: Verify redirect_to: 'pipelines/parent_child_pipelines.md'
group: Pipeline Execution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
type: reference
--- ---
# Parent-child pipelines **(FREE)** This document was moved to [another location](pipelines/parent_child_pipelines.md).
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/16094) in GitLab 12.7. <!-- This redirect file can be deleted after 2021-09-29. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->
As pipelines grow more complex, a few related problems start to emerge:
- The staged structure, where all steps in a stage must be completed before the first
job in next stage begins, causes arbitrary waits, slowing things down.
- Configuration for the single global pipeline becomes very long and complicated,
making it hard to manage.
- Imports with [`include`](yaml/index.md#include) increase the complexity of the configuration, and create the potential
for namespace collisions where jobs are unintentionally duplicated.
- Pipeline UX can become unwieldy with so many jobs and stages to work with.
Additionally, sometimes the behavior of a pipeline needs to be more dynamic. The ability
to choose to start sub-pipelines (or not) is a powerful ability, especially if the
YAML is dynamically generated.
![Parent pipeline graph expanded](img/parent_pipeline_graph_expanded_v12_6.png)
Similarly to [multi-project pipelines](multi_project_pipelines.md), a pipeline can trigger a
set of concurrently running child pipelines, but within the same project:
- Child pipelines still execute each of their jobs according to a stage sequence, but
would be free to continue forward through their stages without waiting for unrelated
jobs in the parent pipeline to finish.
- The configuration is split up into smaller child pipeline configurations, which are
easier to understand. This reduces the cognitive load to understand the overall configuration.
- Imports are done at the child pipeline level, reducing the likelihood of collisions.
- Each pipeline has only relevant steps, making it easier to understand what's going on.
Child pipelines work well with other GitLab CI/CD features:
- Use [`rules: changes`](yaml/index.md#ruleschanges) to trigger pipelines only when
certain files change. This is useful for monorepos, for example.
- Since the parent pipeline in `.gitlab-ci.yml` and the child pipeline run as normal
pipelines, they can have their own behaviors and sequencing in relation to triggers.
See the [`trigger:`](yaml/index.md#trigger) keyword documentation for full details on how to
include the child pipeline configuration.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For an overview, see [Parent-Child Pipelines feature demo](https://youtu.be/n8KpBSqZNbk).
## Examples
The simplest case is [triggering a child pipeline](yaml/index.md#trigger) using a
local YAML file to define the pipeline configuration. In this case, the parent pipeline
triggers the child pipeline, and continues without waiting:
```yaml
microservice_a:
trigger:
include: path/to/microservice_a.yml
```
You can include multiple files when composing a child pipeline:
```yaml
microservice_a:
trigger:
include:
- local: path/to/microservice_a.yml
- template: Security/SAST.gitlab-ci.yml
```
In [GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/205157) and later,
you can use [`include:file`](yaml/index.md#includefile) to trigger child pipelines
with a configuration file in a different project:
```yaml
microservice_a:
trigger:
include:
- project: 'my-group/my-pipeline-library'
file: 'path/to/ci-config.yml'
```
The maximum number of entries that are accepted for `trigger:include:` is three.
Similar to [multi-project pipelines](multi_project_pipelines.md#mirror-status-of-a-triggered-pipeline-in-the-trigger-job),
we can set the parent pipeline to depend on the status of the child pipeline upon completion:
```yaml
microservice_a:
trigger:
include:
- local: path/to/microservice_a.yml
- template: Security/SAST.gitlab-ci.yml
strategy: depend
```
## Merge Request child pipelines
To trigger a child pipeline as a [Merge Request Pipeline](pipelines/merge_request_pipelines.md) we need to:
- Set the trigger job to run on merge requests:
```yaml
# parent .gitlab-ci.yml
microservice_a:
trigger:
include: path/to/microservice_a.yml
rules:
- if: $CI_MERGE_REQUEST_ID
```
- Configure the child pipeline by either:
- Setting all jobs in the child pipeline to evaluate in the context of a merge request:
```yaml
# child path/to/microservice_a.yml
workflow:
rules:
- if: $CI_MERGE_REQUEST_ID
job1:
script: ...
job2:
script: ...
```
- Alternatively, setting the rule per job. For example, to create only `job1` in
the context of merge request pipelines:
```yaml
# child path/to/microservice_a.yml
job1:
script: ...
rules:
- if: $CI_MERGE_REQUEST_ID
job2:
script: ...
```
## Dynamic child pipelines
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/35632) in GitLab 12.9.
Instead of running a child pipeline from a static YAML file, you can define a job that runs
your own script to generate a YAML file, which is then [used to trigger a child pipeline](yaml/index.md#trigger-child-pipeline-with-generated-configuration-file).
This technique can be very powerful in generating pipelines targeting content that changed or to
build a matrix of targets and architectures.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For an overview, see [Create child pipelines using dynamically generated configurations](https://youtu.be/nMdfus2JWHM).
<!-- vale gitlab.Spelling = NO -->
We also have an example project using
[Dynamic Child Pipelines with Jsonnet](https://gitlab.com/gitlab-org/project-templates/jsonnet)
which shows how to use a data templating language to generate your `.gitlab-ci.yml` at runtime. You could use a similar process for other templating languages like [Dhall](https://dhall-lang.org/) or [`ytt`](https://get-ytt.io/).
<!-- vale gitlab.Spelling = NO -->
The artifact path is parsed by GitLab, not the runner, so the path must match the
syntax for the OS running GitLab. If GitLab is running on Linux but using a Windows
runner for testing, the path separator for the trigger job would be `/`. Other CI/CD
configuration for jobs, like scripts, that use the Windows runner would use `\`.
In GitLab 12.9, the child pipeline could fail to be created in certain cases, causing the parent pipeline to fail.
This is [resolved in GitLab 12.10](https://gitlab.com/gitlab-org/gitlab/-/issues/209070).
## Nested child pipelines
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/29651) in GitLab 13.4.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/243747) in GitLab 13.5.
Parent and child pipelines were introduced with a maximum depth of one level of child
pipelines, which was later increased to two. A parent pipeline can trigger many child
pipelines, and these child pipelines can trigger their own child pipelines. It's not
possible to trigger another level of child pipelines.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For an overview, see [Nested Dynamic Pipelines](https://youtu.be/C5j3ju9je2M).
## Pass CI/CD variables to a child pipeline
You can pass CI/CD variables to a downstream pipeline using the same methods as
multi-project pipelines:
- [By using the `variable` keyword](multi_project_pipelines.md#pass-cicd-variables-to-a-downstream-pipeline-by-using-the-variables-keyword).
- [By using variable inheritance](multi_project_pipelines.md#pass-cicd-variables-to-a-downstream-pipeline-by-using-variable-inheritance).
...@@ -50,8 +50,8 @@ Pipelines can be configured in many different ways: ...@@ -50,8 +50,8 @@ Pipelines can be configured in many different ways:
followed by the next stage. followed by the next stage.
- [Directed Acyclic Graph Pipeline (DAG) pipelines](../directed_acyclic_graph/index.md) are based on relationships - [Directed Acyclic Graph Pipeline (DAG) pipelines](../directed_acyclic_graph/index.md) are based on relationships
between jobs and can run more quickly than basic pipelines. between jobs and can run more quickly than basic pipelines.
- [Multi-project pipelines](../multi_project_pipelines.md) combine pipelines for different projects together. - [Multi-project pipelines](multi_project_pipelines.md) combine pipelines for different projects together.
- [Parent-Child pipelines](../parent_child_pipelines.md) break down complex pipelines - [Parent-Child pipelines](parent_child_pipelines.md) break down complex pipelines
into one parent pipeline that can trigger multiple child sub-pipelines, which all into one parent pipeline that can trigger multiple child sub-pipelines, which all
run in the same project and with the same SHA. run in the same project and with the same SHA.
- [Pipelines for Merge Requests](../pipelines/merge_request_pipelines.md) run for merge - [Pipelines for Merge Requests](../pipelines/merge_request_pipelines.md) run for merge
...@@ -349,7 +349,7 @@ You can group the jobs by: ...@@ -349,7 +349,7 @@ You can group the jobs by:
- [Job dependencies](#view-job-dependencies-in-the-pipeline-graph), which arranges - [Job dependencies](#view-job-dependencies-in-the-pipeline-graph), which arranges
jobs based on their [`needs`](../yaml/index.md#needs) dependencies. jobs based on their [`needs`](../yaml/index.md#needs) dependencies.
[Multi-project pipeline graphs](../multi_project_pipelines.md#multi-project-pipeline-visualization) help [Multi-project pipeline graphs](multi_project_pipelines.md#multi-project-pipeline-visualization) help
you visualize the entire pipeline, including all cross-project inter-dependencies. **(PREMIUM)** you visualize the entire pipeline, including all cross-project inter-dependencies. **(PREMIUM)**
### View job dependencies in the pipeline graph ### View job dependencies in the pipeline graph
......
...@@ -112,7 +112,7 @@ the artifact. ...@@ -112,7 +112,7 @@ the artifact.
## How searching for job artifacts works ## How searching for job artifacts works
In [GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/201784) and later, artifacts In [GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/201784) and later, artifacts
for [parent and child pipelines](../parent_child_pipelines.md) are searched in hierarchical for [parent and child pipelines](parent_child_pipelines.md) are searched in hierarchical
order from parent to child. For example, if both parent and child pipelines have a order from parent to child. For example, if both parent and child pipelines have a
job with the same name, the job artifact from the parent pipeline is returned. job with the same name, the job artifact from the parent pipeline is returned.
......
---
stage: Verify
group: Pipeline Authoring
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
type: reference
---
# Multi-project pipelines **(FREE)**
> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/199224) to GitLab Free in 12.8.
You can set up [GitLab CI/CD](../index.md) across multiple projects, so that a pipeline
in one project can trigger a pipeline in another project. You can visualize the entire pipeline
in one place, including all cross-project interdependencies.
For example, you might deploy your web application from three different projects in GitLab.
Each project has its own build, test, and deploy process. With multi-project pipelines you can
visualize the entire pipeline, including all build and test stages for all three projects.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For an overview, see the [Multi-project pipelines demo](https://www.youtube.com/watch?v=g_PIwBM1J84).
Multi-project pipelines are also useful for larger products that require cross-project interdependencies, like those
with a [microservices architecture](https://about.gitlab.com/blog/2016/08/16/trends-in-version-control-land-microservices/).
Learn more in the [Cross-project Pipeline Triggering and Visualization demo](https://about.gitlab.com/learn/)
at GitLab@learn, in the Continuous Integration section.
If you trigger a pipeline in a downstream private project, on the upstream project's pipelines page,
you can view:
- The name of the project.
- The status of the pipeline.
If you have a public project that can trigger downstream pipelines in a private project,
make sure there are no confidentiality problems.
## Create multi-project pipelines
To create multi-project pipelines, you can:
- [Define them in your `.gitlab-ci.yml` file](#define-multi-project-pipelines-in-your-gitlab-ciyml-file).
- [Use the API](#create-multi-project-pipelines-by-using-the-api).
### Define multi-project pipelines in your `.gitlab-ci.yml` file
> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/199224) to GitLab Free in 12.8.
When you create a multi-project pipeline in your `.gitlab-ci.yml` file,
you create what is called a *trigger job*. For example:
```yaml
rspec:
stage: test
script: bundle exec rspec
staging:
variables:
ENVIRONMENT: staging
stage: deploy
trigger: my/deployment
```
In this example, after the `rspec` job succeeds in the `test` stage,
the `staging` trigger job starts. The initial status of this
job is `pending`.
GitLab then creates a downstream pipeline in the
`my/deployment` project and, as soon as the pipeline is created, the
`staging` job succeeds. The full path to the project is `my/deployment`.
You can view the status for the pipeline, or you can display
[the downstream pipeline's status instead](#mirror-status-of-a-triggered-pipeline-in-the-trigger-job).
The user that creates the upstream pipeline must be able to create pipelines in the
downstream project (`my/deployment`) too. If the downstream project is not found,
or the user does not have [permission](../../user/permissions.md) to create a pipeline there,
the `staging` job is marked as _failed_.
#### Trigger job configuration keywords
Trigger jobs can use only a limited set of the GitLab CI/CD [configuration keywords](../yaml/index.md).
The keywords available for use in trigger jobs are:
- [`trigger`](../yaml/index.md#trigger)
- [`stage`](../yaml/index.md#stage)
- [`allow_failure`](../yaml/index.md#allow_failure)
- [`rules`](../yaml/index.md#rules)
- [`only` and `except`](../yaml/index.md#only--except)
- [`when`](../yaml/index.md#when) (only with a value of `on_success`, `on_failure`, or `always`)
- [`extends`](../yaml/index.md#extends)
- [`needs`](../yaml/index.md#needs)
#### Specify a downstream pipeline branch
You can specify a branch name for the downstream pipeline to use.
GitLab uses the commit on the head of the branch to
create the downstream pipeline.
```yaml
rspec:
stage: test
script: bundle exec rspec
staging:
stage: deploy
trigger:
project: my/deployment
branch: stable-11-2
```
Use:
- The `project` keyword to specify the full path to a downstream project.
- The `branch` keyword to specify the name of a branch in the project specified by `project`.
[In GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/-/issues/10126) and later, variable expansion is
supported.
Pipelines triggered on a protected branch in a downstream project use the [role](../../user/permissions.md)
of the user that ran the trigger job in the upstream project. If the user does not
have permission to run CI/CD pipelines against the protected branch, the pipeline fails. See
[pipeline security for protected branches](index.md#pipeline-security-on-protected-branches).
#### Pass CI/CD variables to a downstream pipeline by using the `variables` keyword
Sometimes you might want to pass CI/CD variables to a downstream pipeline.
You can do that by using the `variables` keyword, just like you would for any other job.
```yaml
rspec:
stage: test
script: bundle exec rspec
staging:
variables:
ENVIRONMENT: staging
stage: deploy
trigger: my/deployment
```
The `ENVIRONMENT` variable is passed to every job defined in a downstream
pipeline. It is available as a variable when GitLab Runner picks a job.
In the following configuration, the `MY_VARIABLE` variable is passed to the downstream pipeline
that is created when the `trigger-downstream` job is queued. This is because `trigger-downstream`
job inherits variables declared in global variables blocks, and then we pass these variables to a downstream pipeline.
```yaml
variables:
MY_VARIABLE: my-value
trigger-downstream:
variables:
ENVIRONMENT: something
trigger: my/project
```
You might want to pass some information about the upstream pipeline using, for
example, predefined variables. In order to do that, you can use interpolation
to pass any variable. For example:
```yaml
downstream-job:
variables:
UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME
trigger: my/project
```
In this scenario, the `UPSTREAM_BRANCH` variable with a value related to the
upstream pipeline is passed to the `downstream-job` job. It is available
in the context of all downstream builds.
Upstream pipelines take precedence over downstream ones. If there are two
variables with the same name defined in both upstream and downstream projects,
the ones defined in the upstream project take precedence.
#### Pass CI/CD variables to a downstream pipeline by using variable inheritance
You can pass variables to a downstream pipeline with [`dotenv` variable inheritance](../variables/index.md#pass-an-environment-variable-to-another-job) and [cross project artifact downloads](../yaml/index.md#cross-project-artifact-downloads-with-needs).
In the upstream pipeline:
1. Save the variables in a `.env` file.
1. Save the `.env` file as a `dotenv` report.
1. Trigger the downstream pipeline.
```yaml
build_vars:
stage: build
script:
- echo "BUILD_VERSION=hello" >> build.env
artifacts:
reports:
dotenv: build.env
deploy:
stage: deploy
trigger: my/downstream_project
```
1. Set the `test` job in the downstream pipeline to inherit the variables from the `build_vars`
job in the upstream project with `needs:`. The `test` job inherits the variables in the
`dotenv` report and it can access `BUILD_VERSION` in the script:
```yaml
test:
stage: test
script:
- echo $BUILD_VERSION
needs:
- project: my/upstream_project
job: build_vars
ref: master
artifacts: true
```
#### Use `rules` or `only`/`except` with multi-project pipelines
You can use CI/CD variables or the [`rules`](../yaml/index.md#rulesif) keyword to
[control job behavior](../jobs/job_control.md) for multi-project pipelines. When a
downstream pipeline is triggered with the [`trigger`](../yaml/index.md#trigger) keyword,
the value of the [`$CI_PIPELINE_SOURCE` predefined variable](../variables/predefined_variables.md)
is `pipeline` for all its jobs.
If you use [`only/except`](../yaml/index.md#only--except) to control job behavior, use the
[`pipelines`](../yaml/index.md#onlyrefs--exceptrefs) keyword.
#### Mirror status of a triggered pipeline in the trigger job
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11238) in GitLab Premium 12.3.
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/199224) to GitLab Free in 12.8.
You can mirror the pipeline status from the triggered pipeline to the source
trigger job by using `strategy: depend`. For example:
```yaml
trigger_job:
trigger:
project: my/project
strategy: depend
```
#### Mirror status from upstream pipeline
You can mirror the pipeline status from an upstream pipeline to a bridge job by
using the `needs:pipeline` keyword. The latest pipeline status from the default branch is
replicated to the bridge job.
For example:
```yaml
upstream_bridge:
stage: test
needs:
pipeline: other/project
```
### Create multi-project pipelines by using the API
> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/31573) to GitLab Free in 12.4.
When you use the [`CI_JOB_TOKEN` to trigger pipelines](../triggers/index.md#ci-job-token),
GitLab recognizes the source of the job token. The pipelines become related,
so you can visualize their relationships on pipeline graphs.
These relationships are displayed in the pipeline graph by showing inbound and
outbound connections for upstream and downstream pipeline dependencies.
When using:
- CI/CD variables or [`rules`](../yaml/index.md#rulesif) to control job behavior, the value of
the [`$CI_PIPELINE_SOURCE` predefined variable](../variables/predefined_variables.md) is
`pipeline` for multi-project pipeline triggered through the API with `CI_JOB_TOKEN`.
- [`only/except`](../yaml/index.md#only--except) to control job behavior, use the
`pipelines` keyword.
## Trigger a pipeline when an upstream project is rebuilt **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/9045) in GitLab Premium 12.8.
You can trigger a pipeline in your project whenever a pipeline finishes for a new
tag in a different project.
Prerequisites:
- The upstream project must be [public](../../public_access/public_access.md).
- The user must have the [Developer role](../../user/permissions.md#project-members-permissions)
in the upstream project.
To trigger the pipeline when the upstream project is rebuilt:
1. On the top bar, select **Menu > Projects** and find your project.
1. On the left sidebar, select **Settings > CI/CD** page.
1. Expand the **Pipeline subscriptions** section.
1. Enter the project you want to subscribe to, in the format `<namespace>/<project>`.
For example, if the project is `https://gitlab.com/gitlab-org/gitlab`, use `gitlab-org/gitlab`.
1. Select **Subscribe**.
Any pipelines that complete successfully for new tags in the subscribed project
now trigger a pipeline on the current project's default branch. The maximum
number of upstream pipeline subscriptions is 2 by default, for both the upstream and
downstream projects. On self-managed instances, an administrator can change this
[limit](../../administration/instance_limits.md#number-of-cicd-subscriptions-to-a-project).
## Multi-project pipeline visualization **(PREMIUM)**
When you configure GitLab CI/CD for your project, you can visualize the stages of your
[jobs](index.md#configure-a-pipeline) on a [pipeline graph](index.md#visualize-pipelines).
![Multi-project pipeline graph](img/multi_project_pipeline_graph.png)
In the merge request, on the **Pipelines** tab, multi-project pipeline mini-graphs are displayed.
They expand and are shown adjacent to each other when hovering (or tapping on touchscreen devices).
![Multi-project mini graph](img/multi_pipeline_mini_graph.gif)
---
stage: Verify
group: Pipeline Authoring
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
type: reference
---
# Parent-child pipelines **(FREE)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/16094) in GitLab 12.7.
As pipelines grow more complex, a few related problems start to emerge:
- The staged structure, where all steps in a stage must be completed before the first
job in next stage begins, causes arbitrary waits, slowing things down.
- Configuration for the single global pipeline becomes very long and complicated,
making it hard to manage.
- Imports with [`include`](../yaml/index.md#include) increase the complexity of the configuration, and create the potential
for namespace collisions where jobs are unintentionally duplicated.
- Pipeline UX can become unwieldy with so many jobs and stages to work with.
Additionally, sometimes the behavior of a pipeline needs to be more dynamic. The ability
to choose to start sub-pipelines (or not) is a powerful ability, especially if the
YAML is dynamically generated.
![Parent pipeline graph expanded](img/parent_pipeline_graph_expanded_v12_6.png)
Similarly to [multi-project pipelines](multi_project_pipelines.md), a pipeline can trigger a
set of concurrently running child pipelines, but within the same project:
- Child pipelines still execute each of their jobs according to a stage sequence, but
would be free to continue forward through their stages without waiting for unrelated
jobs in the parent pipeline to finish.
- The configuration is split up into smaller child pipeline configurations, which are
easier to understand. This reduces the cognitive load to understand the overall configuration.
- Imports are done at the child pipeline level, reducing the likelihood of collisions.
- Each pipeline has only relevant steps, making it easier to understand what's going on.
Child pipelines work well with other GitLab CI/CD features:
- Use [`rules: changes`](../yaml/index.md#ruleschanges) to trigger pipelines only when
certain files change. This is useful for monorepos, for example.
- Since the parent pipeline in `.gitlab-ci.yml` and the child pipeline run as normal
pipelines, they can have their own behaviors and sequencing in relation to triggers.
See the [`trigger:`](../yaml/index.md#trigger) keyword documentation for full details on how to
include the child pipeline configuration.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For an overview, see [Parent-Child Pipelines feature demo](https://youtu.be/n8KpBSqZNbk).
## Examples
The simplest case is [triggering a child pipeline](../yaml/index.md#trigger) using a
local YAML file to define the pipeline configuration. In this case, the parent pipeline
triggers the child pipeline, and continues without waiting:
```yaml
microservice_a:
trigger:
include: path/to/microservice_a.yml
```
You can include multiple files when composing a child pipeline:
```yaml
microservice_a:
trigger:
include:
- local: path/to/microservice_a.yml
- template: Security/SAST.gitlab-ci.yml
```
In [GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/205157) and later,
you can use [`include:file`](../yaml/index.md#includefile) to trigger child pipelines
with a configuration file in a different project:
```yaml
microservice_a:
trigger:
include:
- project: 'my-group/my-pipeline-library'
file: 'path/to/ci-config.yml'
```
The maximum number of entries that are accepted for `trigger:include:` is three.
Similar to [multi-project pipelines](multi_project_pipelines.md#mirror-status-of-a-triggered-pipeline-in-the-trigger-job),
we can set the parent pipeline to depend on the status of the child pipeline upon completion:
```yaml
microservice_a:
trigger:
include:
- local: path/to/microservice_a.yml
- template: Security/SAST.gitlab-ci.yml
strategy: depend
```
## Merge Request child pipelines
To trigger a child pipeline as a [Merge Request Pipeline](merge_request_pipelines.md) we need to:
- Set the trigger job to run on merge requests:
```yaml
# parent .gitlab-ci.yml
microservice_a:
trigger:
include: path/to/microservice_a.yml
rules:
- if: $CI_MERGE_REQUEST_ID
```
- Configure the child pipeline by either:
- Setting all jobs in the child pipeline to evaluate in the context of a merge request:
```yaml
# child path/to/microservice_a.yml
workflow:
rules:
- if: $CI_MERGE_REQUEST_ID
job1:
script: ...
job2:
script: ...
```
- Alternatively, setting the rule per job. For example, to create only `job1` in
the context of merge request pipelines:
```yaml
# child path/to/microservice_a.yml
job1:
script: ...
rules:
- if: $CI_MERGE_REQUEST_ID
job2:
script: ...
```
## Dynamic child pipelines
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/35632) in GitLab 12.9.
Instead of running a child pipeline from a static YAML file, you can define a job that runs
your own script to generate a YAML file, which is then [used to trigger a child pipeline](../yaml/index.md#trigger-child-pipeline-with-generated-configuration-file).
This technique can be very powerful in generating pipelines targeting content that changed or to
build a matrix of targets and architectures.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For an overview, see [Create child pipelines using dynamically generated configurations](https://youtu.be/nMdfus2JWHM).
<!-- vale gitlab.Spelling = NO -->
We also have an example project using
[Dynamic Child Pipelines with Jsonnet](https://gitlab.com/gitlab-org/project-templates/jsonnet)
which shows how to use a data templating language to generate your `.gitlab-ci.yml` at runtime. You could use a similar process for other templating languages like [Dhall](https://dhall-lang.org/) or [`ytt`](https://get-ytt.io/).
<!-- vale gitlab.Spelling = NO -->
The artifact path is parsed by GitLab, not the runner, so the path must match the
syntax for the OS running GitLab. If GitLab is running on Linux but using a Windows
runner for testing, the path separator for the trigger job would be `/`. Other CI/CD
configuration for jobs, like scripts, that use the Windows runner would use `\`.
In GitLab 12.9, the child pipeline could fail to be created in certain cases, causing the parent pipeline to fail.
This is [resolved in GitLab 12.10](https://gitlab.com/gitlab-org/gitlab/-/issues/209070).
## Nested child pipelines
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/29651) in GitLab 13.4.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/243747) in GitLab 13.5.
Parent and child pipelines were introduced with a maximum depth of one level of child
pipelines, which was later increased to two. A parent pipeline can trigger many child
pipelines, and these child pipelines can trigger their own child pipelines. It's not
possible to trigger another level of child pipelines.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For an overview, see [Nested Dynamic Pipelines](https://youtu.be/C5j3ju9je2M).
## Pass CI/CD variables to a child pipeline
You can pass CI/CD variables to a downstream pipeline using the same methods as
multi-project pipelines:
- [By using the `variable` keyword](multi_project_pipelines.md#pass-cicd-variables-to-a-downstream-pipeline-by-using-the-variables-keyword).
- [By using variable inheritance](multi_project_pipelines.md#pass-cicd-variables-to-a-downstream-pipeline-by-using-variable-inheritance).
...@@ -162,7 +162,7 @@ deploy_b: ...@@ -162,7 +162,7 @@ deploy_b:
## Child / Parent Pipelines ## Child / Parent Pipelines
In the examples above, it's clear we've got two types of things that could be built independently. In the examples above, it's clear we've got two types of things that could be built independently.
This is an ideal case for using [Child / Parent Pipelines](../parent_child_pipelines.md)) via This is an ideal case for using [Child / Parent Pipelines](parent_child_pipelines.md)) via
the [`trigger` keyword](../yaml/index.md#trigger). It separates out the configuration the [`trigger` keyword](../yaml/index.md#trigger). It separates out the configuration
into multiple files, keeping things very simple. You can also combine this with: into multiple files, keeping things very simple. You can also combine this with:
......
...@@ -186,7 +186,7 @@ shouldn't run, saving pipeline resources. ...@@ -186,7 +186,7 @@ shouldn't run, saving pipeline resources.
In a basic configuration, jobs always wait for all other jobs in earlier stages to complete In a basic configuration, jobs always wait for all other jobs in earlier stages to complete
before running. This is the simplest configuration, but it's also the slowest in most before running. This is the simplest configuration, but it's also the slowest in most
cases. [Directed Acyclic Graphs](../directed_acyclic_graph/index.md) and cases. [Directed Acyclic Graphs](../directed_acyclic_graph/index.md) and
[parent/child pipelines](../parent_child_pipelines.md) are more flexible and can [parent/child pipelines](parent_child_pipelines.md) are more flexible and can
be more efficient, but can also make pipelines harder to understand and analyze. be more efficient, but can also make pipelines harder to understand and analyze.
### Caching ### Caching
......
...@@ -40,7 +40,7 @@ Below are the shared runners settings. ...@@ -40,7 +40,7 @@ Below are the shared runners settings.
| Setting | GitLab.com | Default | | Setting | GitLab.com | Default |
| ----------- | ----------------- | ---------- | | ----------- | ----------------- | ---------- |
| [GitLab Runner](https://gitlab.com/gitlab-org/gitlab-runner) | [Runner versions dashboard](https://dashboards.gitlab.com/d/000000159/ci?from=now-1h&to=now&refresh=5m&orgId=1&panelId=12&fullscreen&theme=light) | - | | [GitLab Runner](https://gitlab.com/gitlab-org/gitlab-runner) | [Runner versions dashboard](https://dashboards.gitlab.net/d/ci-runners-deployment/ci-runners-deployment-overview?orgId=1&refresh=1m) | - |
| Executor | `docker+machine` | - | | Executor | `docker+machine` | - |
| Default Docker image | `ruby:2.5` | - | | Default Docker image | `ruby:2.5` | - |
| `privileged` (run [Docker in Docker](https://hub.docker.com/_/docker/)) | `true` | `false` | | `privileged` (run [Docker in Docker](https://hub.docker.com/_/docker/)) | `true` | `false` |
......
...@@ -50,7 +50,7 @@ with the [GitLab Container Registry](../../user/packages/container_registry/inde ...@@ -50,7 +50,7 @@ with the [GitLab Container Registry](../../user/packages/container_registry/inde
This way of triggering can only be used when invoked inside `.gitlab-ci.yml`, This way of triggering can only be used when invoked inside `.gitlab-ci.yml`,
and it creates a dependent pipeline relation visible on the and it creates a dependent pipeline relation visible on the
[pipeline graph](../multi_project_pipelines.md). For example: [pipeline graph](../pipelines/multi_project_pipelines.md). For example:
```yaml ```yaml
trigger_pipeline: trigger_pipeline:
......
...@@ -60,11 +60,11 @@ and [templates](examples/index.md#cicd-templates). ...@@ -60,11 +60,11 @@ and [templates](examples/index.md#cicd-templates).
Some pipeline types have their own detailed usage guides that you should read Some pipeline types have their own detailed usage guides that you should read
if you are using that type: if you are using that type:
- [Multi-project pipelines](multi_project_pipelines.md): Have your pipeline trigger - [Multi-project pipelines](pipelines/multi_project_pipelines.md): Have your pipeline trigger
a pipeline in a different project. a pipeline in a different project.
- [Parent/child pipelines](parent_child_pipelines.md): Have your main pipeline trigger - [Parent/child pipelines](pipelines/parent_child_pipelines.md): Have your main pipeline trigger
and run separate pipelines in the same project. You can also and run separate pipelines in the same project. You can also
[dynamically generate the child pipeline's configuration](parent_child_pipelines.md#dynamic-child-pipelines) [dynamically generate the child pipeline's configuration](pipelines/parent_child_pipelines.md#dynamic-child-pipelines)
at runtime. at runtime.
- [Pipelines for Merge Requests](pipelines/merge_request_pipelines.md): Run a pipeline - [Pipelines for Merge Requests](pipelines/merge_request_pipelines.md): Run a pipeline
in the context of a merge request. in the context of a merge request.
......
...@@ -581,8 +581,8 @@ You can override the value of a variable when you: ...@@ -581,8 +581,8 @@ You can override the value of a variable when you:
1. Run a job manually in the UI. 1. Run a job manually in the UI.
1. Use [push options](../../user/project/push_options.md#push-options-for-gitlab-cicd). 1. Use [push options](../../user/project/push_options.md#push-options-for-gitlab-cicd).
1. Trigger a pipeline by using [the API](../triggers/index.md#making-use-of-trigger-variables). 1. Trigger a pipeline by using [the API](../triggers/index.md#making-use-of-trigger-variables).
1. Pass variables to a downstream pipeline [by using the `variable` keyword](../multi_project_pipelines.md#pass-cicd-variables-to-a-downstream-pipeline-by-using-the-variables-keyword) 1. Pass variables to a downstream pipeline [by using the `variable` keyword](../pipelines/multi_project_pipelines.md#pass-cicd-variables-to-a-downstream-pipeline-by-using-the-variables-keyword)
or [by using variable inheritance](../multi_project_pipelines.md#pass-cicd-variables-to-a-downstream-pipeline-by-using-variable-inheritance). or [by using variable inheritance](../pipelines/multi_project_pipelines.md#pass-cicd-variables-to-a-downstream-pipeline-by-using-variable-inheritance).
The pipeline variables declared in these events take [priority over other variables](#cicd-variable-precedence). The pipeline variables declared in these events take [priority over other variables](#cicd-variable-precedence).
......
...@@ -1336,7 +1336,7 @@ pipeline based on branch names or pipeline types. ...@@ -1336,7 +1336,7 @@ pipeline based on branch names or pipeline types.
| `external` | When you use CI services other than GitLab. | | `external` | When you use CI services other than GitLab. |
| `external_pull_requests` | When an external pull request on GitHub is created or updated (See [Pipelines for external pull requests](../ci_cd_for_external_repos/index.md#pipelines-for-external-pull-requests)). | | `external_pull_requests` | When an external pull request on GitHub is created or updated (See [Pipelines for external pull requests](../ci_cd_for_external_repos/index.md#pipelines-for-external-pull-requests)). |
| `merge_requests` | For pipelines created when a merge request is created or updated. Enables [merge request pipelines](../pipelines/merge_request_pipelines.md), [merged results pipelines](../pipelines/pipelines_for_merged_results.md), and [merge trains](../pipelines/merge_trains.md). | | `merge_requests` | For pipelines created when a merge request is created or updated. Enables [merge request pipelines](../pipelines/merge_request_pipelines.md), [merged results pipelines](../pipelines/pipelines_for_merged_results.md), and [merge trains](../pipelines/merge_trains.md). |
| `pipelines` | For [multi-project pipelines](../multi_project_pipelines.md) created by [using the API with `CI_JOB_TOKEN`](../multi_project_pipelines.md#create-multi-project-pipelines-by-using-the-api), or the [`trigger`](#trigger) keyword. | | `pipelines` | For [multi-project pipelines](../pipelines/multi_project_pipelines.md) created by [using the API with `CI_JOB_TOKEN`](../pipelines/multi_project_pipelines.md#create-multi-project-pipelines-by-using-the-api), or the [`trigger`](#trigger) keyword. |
| `pushes` | For pipelines triggered by a `git push` event, including for branches and tags. | | `pushes` | For pipelines triggered by a `git push` event, including for branches and tags. |
| `schedules` | For [scheduled pipelines](../pipelines/schedules.md). | | `schedules` | For [scheduled pipelines](../pipelines/schedules.md). |
| `tags` | When the Git reference for a pipeline is a tag. | | `tags` | When the Git reference for a pipeline is a tag. |
...@@ -1710,7 +1710,7 @@ build_job: ...@@ -1710,7 +1710,7 @@ build_job:
You can't download artifacts from jobs that run in [`parallel:`](#parallel). You can't download artifacts from jobs that run in [`parallel:`](#parallel).
To download artifacts between [parent-child pipelines](../parent_child_pipelines.md), To download artifacts between [parent-child pipelines](../pipelines/parent_child_pipelines.md),
use [`needs:pipeline`](#artifact-downloads-to-child-pipelines). use [`needs:pipeline`](#artifact-downloads-to-child-pipelines).
You should not download artifacts from the same ref as a running pipeline. Concurrent You should not download artifacts from the same ref as a running pipeline. Concurrent
...@@ -1720,7 +1720,7 @@ pipelines running on the same ref could override the artifacts. ...@@ -1720,7 +1720,7 @@ pipelines running on the same ref could override the artifacts.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/255983) in GitLab v13.7. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/255983) in GitLab v13.7.
A [child pipeline](../parent_child_pipelines.md) can download artifacts from a job in A [child pipeline](../pipelines/parent_child_pipelines.md) can download artifacts from a job in
its parent pipeline or another child pipeline in the same parent-child pipeline hierarchy. its parent pipeline or another child pipeline in the same parent-child pipeline hierarchy.
For example, with the following parent pipeline that has a job that creates some artifacts: For example, with the following parent pipeline that has a job that creates some artifacts:
...@@ -3305,7 +3305,7 @@ If there is more than one matched line in the job output, the last line is used. ...@@ -3305,7 +3305,7 @@ If there is more than one matched line in the job output, the last line is used.
For the matched line, the first occurrence of `\d+(\.\d+)?` is the code coverage. For the matched line, the first occurrence of `\d+(\.\d+)?` is the code coverage.
Leading zeros are removed. Leading zeros are removed.
Coverage output from [child pipelines](../parent_child_pipelines.md) is not recorded Coverage output from [child pipelines](../pipelines/parent_child_pipelines.md) is not recorded
or displayed. Check [the related issue](https://gitlab.com/gitlab-org/gitlab/-/issues/280818) or displayed. Check [the related issue](https://gitlab.com/gitlab-org/gitlab/-/issues/280818)
for more details. for more details.
...@@ -3561,14 +3561,14 @@ deploystacks: [vultr, data] ...@@ -3561,14 +3561,14 @@ deploystacks: [vultr, data]
Use `trigger` to define a downstream pipeline trigger. When GitLab starts a `trigger` job, Use `trigger` to define a downstream pipeline trigger. When GitLab starts a `trigger` job,
a downstream pipeline is created. a downstream pipeline is created.
Jobs with `trigger` can only use a [limited set of keywords](../multi_project_pipelines.md#define-multi-project-pipelines-in-your-gitlab-ciyml-file). Jobs with `trigger` can only use a [limited set of keywords](../pipelines/multi_project_pipelines.md#define-multi-project-pipelines-in-your-gitlab-ciyml-file).
For example, you can't run commands with [`script`](#script), [`before_script`](#before_script), For example, you can't run commands with [`script`](#script), [`before_script`](#before_script),
or [`after_script`](#after_script). or [`after_script`](#after_script).
You can use this keyword to create two different types of downstream pipelines: You can use this keyword to create two different types of downstream pipelines:
- [Multi-project pipelines](../multi_project_pipelines.md#define-multi-project-pipelines-in-your-gitlab-ciyml-file) - [Multi-project pipelines](../pipelines/multi_project_pipelines.md#define-multi-project-pipelines-in-your-gitlab-ciyml-file)
- [Child pipelines](../parent_child_pipelines.md) - [Child pipelines](../pipelines/parent_child_pipelines.md)
[In GitLab 13.2](https://gitlab.com/gitlab-org/gitlab/-/issues/197140/) and later, you can [In GitLab 13.2](https://gitlab.com/gitlab-org/gitlab/-/issues/197140/) and later, you can
view which job triggered a downstream pipeline. In the [pipeline graph](../pipelines/index.md#visualize-pipelines), view which job triggered a downstream pipeline. In the [pipeline graph](../pipelines/index.md#visualize-pipelines),
...@@ -3633,7 +3633,7 @@ upstream_bridge: ...@@ -3633,7 +3633,7 @@ upstream_bridge:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/16094) in GitLab 12.7. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/16094) in GitLab 12.7.
To create a [child pipeline](../parent_child_pipelines.md), specify the path to the To create a [child pipeline](../pipelines/parent_child_pipelines.md), specify the path to the
YAML file that contains the configuration of the child pipeline: YAML file that contains the configuration of the child pipeline:
```yaml ```yaml
...@@ -3642,7 +3642,7 @@ trigger_job: ...@@ -3642,7 +3642,7 @@ trigger_job:
include: path/to/child-pipeline.yml include: path/to/child-pipeline.yml
``` ```
Similar to [multi-project pipelines](../multi_project_pipelines.md#mirror-status-of-a-triggered-pipeline-in-the-trigger-job), Similar to [multi-project pipelines](../pipelines/multi_project_pipelines.md#mirror-status-of-a-triggered-pipeline-in-the-trigger-job),
it's possible to mirror the status from a triggered pipeline: it's possible to mirror the status from a triggered pipeline:
```yaml ```yaml
...@@ -3657,7 +3657,7 @@ trigger_job: ...@@ -3657,7 +3657,7 @@ trigger_job:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/35632) in GitLab 12.9. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/35632) in GitLab 12.9.
You can also trigger a child pipeline from a [dynamically generated configuration file](../parent_child_pipelines.md#dynamic-child-pipelines): You can also trigger a child pipeline from a [dynamically generated configuration file](../pipelines/parent_child_pipelines.md#dynamic-child-pipelines):
```yaml ```yaml
generate-config: generate-config:
......
...@@ -30,7 +30,7 @@ On the left side we have the events that can trigger a pipeline based on various ...@@ -30,7 +30,7 @@ On the left side we have the events that can trigger a pipeline based on various
- When a [merge request is created or updated](../../ci/pipelines/merge_request_pipelines.md#pipelines-for-merge-requests). - When a [merge request is created or updated](../../ci/pipelines/merge_request_pipelines.md#pipelines-for-merge-requests).
- When an MR is added to a [Merge Train](../../ci/pipelines/merge_trains.md#merge-trains). - When an MR is added to a [Merge Train](../../ci/pipelines/merge_trains.md#merge-trains).
- A [scheduled pipeline](../../ci/pipelines/schedules.md#pipeline-schedules). - A [scheduled pipeline](../../ci/pipelines/schedules.md#pipeline-schedules).
- When project is [subscribed to an upstream project](../../ci/multi_project_pipelines.md#trigger-a-pipeline-when-an-upstream-project-is-rebuilt). - When project is [subscribed to an upstream project](../../ci/pipelines/multi_project_pipelines.md#trigger-a-pipeline-when-an-upstream-project-is-rebuilt).
- When [Auto DevOps](../../topics/autodevops/index.md) is enabled. - When [Auto DevOps](../../topics/autodevops/index.md) is enabled.
- When GitHub integration is used with [external pull requests](../../ci/ci_cd_for_external_repos/index.md#pipelines-for-external-pull-requests). - When GitHub integration is used with [external pull requests](../../ci/ci_cd_for_external_repos/index.md#pipelines-for-external-pull-requests).
- When an upstream pipeline contains a [bridge job](../../ci/yaml/index.md#trigger) which triggers a downstream pipeline. - When an upstream pipeline contains a [bridge job](../../ci/yaml/index.md#trigger) which triggers a downstream pipeline.
......
...@@ -476,7 +476,7 @@ If you want to know the in-depth details, here's what's really happening: ...@@ -476,7 +476,7 @@ If you want to know the in-depth details, here's what's really happening:
The following GitLab features are used among others: The following GitLab features are used among others:
- [Manual actions](../../ci/yaml/index.md#whenmanual) - [Manual actions](../../ci/yaml/index.md#whenmanual)
- [Multi project pipelines](../../ci/multi_project_pipelines.md) - [Multi project pipelines](../../ci/pipelines/multi_project_pipelines.md)
- [Review Apps](../../ci/review_apps/index.md) - [Review Apps](../../ci/review_apps/index.md)
- [Artifacts](../../ci/yaml/index.md#artifacts) - [Artifacts](../../ci/yaml/index.md#artifacts)
- [Specific runner](../../ci/runners/runners_scope.md#prevent-a-specific-runner-from-being-enabled-for-other-projects) - [Specific runner](../../ci/runners/runners_scope.md#prevent-a-specific-runner-from-being-enabled-for-other-projects)
......
...@@ -192,7 +192,7 @@ To use coverage fuzzing in an offline environment, follow these steps: ...@@ -192,7 +192,7 @@ To use coverage fuzzing in an offline environment, follow these steps:
### Continuous fuzzing (long-running asynchronous fuzzing jobs) ### Continuous fuzzing (long-running asynchronous fuzzing jobs)
It's also possible to run the fuzzing jobs longer and without blocking your main pipeline. This It's also possible to run the fuzzing jobs longer and without blocking your main pipeline. This
configuration uses the GitLab [parent-child pipelines](../../../ci/parent_child_pipelines.md). configuration uses the GitLab [parent-child pipelines](../../../ci/pipelines/parent_child_pipelines.md).
The full example is available in the [repository](https://gitlab.com/gitlab-org/security-products/demos/coverage-fuzzing/go-fuzzing-example/-/tree/continuous_fuzzing#running-go-fuzz-from-ci). The full example is available in the [repository](https://gitlab.com/gitlab-org/security-products/demos/coverage-fuzzing/go-fuzzing-example/-/tree/continuous_fuzzing#running-go-fuzz-from-ci).
This example uses Go, but is applicable for any other supported languages. This example uses Go, but is applicable for any other supported languages.
......
...@@ -11,9 +11,9 @@ info: To determine the technical writer assigned to the Stage/Group associated w ...@@ -11,9 +11,9 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> - Deployed behind a feature flag, disabled by default. > - Deployed behind a feature flag, disabled by default.
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/221047) in GitLab 13.2. > - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/221047) in GitLab 13.2.
> - Enabled on GitLab.com. > - Enabled on GitLab.com.
> - Able to be enabled or disabled per-group. > - Can be enabled or disabled per-group.
> - Recommended for production use. > - Recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#disable-iterations). **(PREMIUM ONLY)** > - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-iterations). **(PREMIUM ONLY)**
> - Moved to GitLab Premium in 13.9. > - Moved to GitLab Premium in 13.9.
Iterations are a way to track issues over a period of time. This allows teams Iterations are a way to track issues over a period of time. This allows teams
...@@ -32,31 +32,81 @@ In GitLab, iterations are similar to milestones, with a few differences: ...@@ -32,31 +32,81 @@ In GitLab, iterations are similar to milestones, with a few differences:
- Iterations require both a start and an end date. - Iterations require both a start and an end date.
- Iteration date ranges cannot overlap. - Iteration date ranges cannot overlap.
## Iteration cadences
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/5077) in GitLab 14.1.
> - Deployed behind a [feature flag](../../feature_flags.md), disabled by default.
> - Disabled on GitLab.com.
> - Not recommended for production use.
> - To use in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-iteration-cadences). **(PREMIUM SELF)**
This in-development feature might not be available for your use. There can be
[risks when enabling features still in development](../../feature_flags.md#risks-when-enabling-features-still-in-development).
Refer to this feature's version history for more details.
Iteration cadences automate some common iteration tasks. They can be used to
automatically create iterations every 1, 2, 3, 4, or 6 weeks. They can also
be configured to automatically roll over incomplete issues to the next iteration.
### Create an iteration cadence
Prerequisites:
- You must have at least the [Developer role](../../permissions.md) for a group.
To create an iteration cadence:
1. On the top bar, select **Menu > Groups** and find your group.
1. On the left sidebar, select **Issues > Iterations**.
1. Select **New iteration cadence**.
1. Fill out required fields, and select **Create iteration cadence**. The cadence list page opens.
## Delete an iteration cadence
Prerequisites:
- You must have at least the [Developer role](../../permissions.md) for a group.
Deleting an iteration cadence also deletes all iterations within that cadence.
To delete an iteration cadence:
1. On the top bar, select **Menu > Groups** and find your group.
1. On the left sidebar, select **Issues > Iterations**.
1. Select the three-dot menu (**{ellipsis_v}**) > **Delete cadence** for the cadence you want to delete.
1. Select **Delete cadence** in the confirmation modal.
## View the iterations list ## View the iterations list
To view the iterations list, in a group, go to **{issues}** **Issues > Iterations**. To view the iterations list, go to **{issues}** **Issues > Iterations**.
From there you can create a new iteration or click an iteration to get a more detailed view. To view all the iterations in a cadence, ordered by descending date, select that iteration cadence.
From there you can create a new iteration or select an iteration to get a more detailed view.
## Create an iteration ## Create an iteration
NOTE: Prerequisites:
You need Developer [permissions](../../permissions.md) or higher to create an iteration.
- You must have at least the [Developer role](../../permissions.md) for a group.
For manually scheduled iteration cadences, you create and add iterations yourself.
To create an iteration: To create an iteration:
1. In a group, go to **{issues}** **Issues > Iterations**. 1. On the top bar, select **Menu > Groups** and find your group.
1. Click **New iteration**. 1. On the left sidebar, select **Issues > Iterations**.
1. Select the three-dot menu (**{ellipsis_v}**) > **Add iteration** for the cadence you want to add to.
1. Enter the title, a description (optional), a start date, and a due date. 1. Enter the title, a description (optional), a start date, and a due date.
1. Click **Create iteration**. The iteration details page opens. 1. Select **Create iteration**. The iteration details page opens.
## Edit an iteration ## Edit an iteration
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/218277) in GitLab 13.2. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/218277) in GitLab 13.2.
NOTE: Prerequisites:
You need Developer [permissions](../../permissions.md) or higher to edit an iteration.
- You must have at least the [Developer role](../../permissions.md) for a group.
To edit an iteration, click the three-dot menu (**{ellipsis_v}**) > **Edit iteration**. To edit an iteration, select the three-dot menu (**{ellipsis_v}**) > **Edit iteration**.
## Add an issue to an iteration ## Add an issue to an iteration
...@@ -76,7 +126,7 @@ The report also shows a breakdown of total issues in an iteration. ...@@ -76,7 +126,7 @@ The report also shows a breakdown of total issues in an iteration.
Open iteration reports show a summary of completed, unstarted, and in-progress issues. Open iteration reports show a summary of completed, unstarted, and in-progress issues.
Closed iteration reports show the total number of issues completed by the due date. Closed iteration reports show the total number of issues completed by the due date.
To view an iteration report, go to the iterations list page and click an iteration's title. To view an iteration report, go to the iterations list page and select an iteration's title.
### Iteration burndown and burnup charts ### Iteration burndown and burnup charts
...@@ -99,13 +149,15 @@ and get a more accurate understanding of scope attributable to each label. ...@@ -99,13 +149,15 @@ and get a more accurate understanding of scope attributable to each label.
To group issues by label: To group issues by label:
1. On the top bar, select **Menu > Groups** and find your group.
1. On the left sidebar, select **Issues > Iterations**.
1. In the **Group by** dropdown, select **Label**. 1. In the **Group by** dropdown, select **Label**.
1. Select the **Filter by label** dropdown. 1. Select the **Filter by label** dropdown.
1. Select the labels you want to group by in the labels dropdown. 1. Select the labels you want to group by in the labels dropdown.
You can also search for labels by typing in the search input. You can also search for labels by typing in the search input.
1. Click or tap outside of the label dropdown. The page is now grouped by the selected labels. 1. Select or tap outside of the label dropdown. The page is now grouped by the selected labels.
## Disable iterations **(PREMIUM SELF)** ## Enable or disable iterations **(PREMIUM SELF)**
GitLab Iterations feature is deployed with a feature flag that is **enabled by default**. GitLab Iterations feature is deployed with a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md) [GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md)
...@@ -129,6 +181,25 @@ Feature.disable(:group_iterations) ...@@ -129,6 +181,25 @@ Feature.disable(:group_iterations)
Feature.disable(:group_iterations, Group.find(<group ID>)) Feature.disable(:group_iterations, Group.find(<group ID>))
``` ```
### Enable or disable iteration cadences **(PREMIUM SELF)**
Iteration Cadences feature is under development and not ready for production use. It is
deployed behind a feature flag that is **disabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md)
can enable it.
To enable it:
```ruby
Feature.enable(:iterations_cadences)
```
To disable it:
```ruby
Feature.disable(:iterations_cadences)
```
<!-- ## Troubleshooting <!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues Include any troubleshooting steps that you can foresee. If you know beforehand what issues
......
...@@ -64,7 +64,7 @@ With GitLab Enterprise Edition, you can also: ...@@ -64,7 +64,7 @@ With GitLab Enterprise Edition, you can also:
- Leverage [Elasticsearch](../integration/elasticsearch.md) with [Advanced Search](search/advanced_search.md) for faster, more advanced code search across your entire GitLab instance. - Leverage [Elasticsearch](../integration/elasticsearch.md) with [Advanced Search](search/advanced_search.md) for faster, more advanced code search across your entire GitLab instance.
- [Authenticate users with Kerberos](../integration/kerberos.md). - [Authenticate users with Kerberos](../integration/kerberos.md).
- [Mirror a repository](project/repository/repository_mirroring.md) from elsewhere on your local server. - [Mirror a repository](project/repository/repository_mirroring.md) from elsewhere on your local server.
- View your entire CI/CD pipeline involving more than one project with [Multiple-Project Pipelines](../ci/multi_project_pipelines.md). - View your entire CI/CD pipeline involving more than one project with [Multiple-Project Pipelines](../ci/pipelines/multi_project_pipelines.md).
- [Lock files](project/file_lock.md) to prevent conflicts. - [Lock files](project/file_lock.md) to prevent conflicts.
- View the current health and status of each CI environment running on Kubernetes with [Deploy Boards](project/deploy_boards.md). - View the current health and status of each CI environment running on Kubernetes with [Deploy Boards](project/deploy_boards.md).
- Leverage continuous delivery method with [Canary Deployments](project/canary_deployments.md). - Leverage continuous delivery method with [Canary Deployments](project/canary_deployments.md).
......
...@@ -22,7 +22,7 @@ or link to useful information directly from merge requests: ...@@ -22,7 +22,7 @@ or link to useful information directly from merge requests:
| [Unit test reports](../../../ci/unit_test_reports.md) | Configure your CI jobs to use Unit test reports, and let GitLab display a report on the merge request so that it's easier and faster to identify the failure without having to check the entire job log. | | [Unit test reports](../../../ci/unit_test_reports.md) | Configure your CI jobs to use Unit test reports, and let GitLab display a report on the merge request so that it's easier and faster to identify the failure without having to check the entire job log. |
| [License Compliance](../../compliance/license_compliance/index.md) **(ULTIMATE)** | Manage the licenses of your dependencies. | | [License Compliance](../../compliance/license_compliance/index.md) **(ULTIMATE)** | Manage the licenses of your dependencies. |
| [Metrics Reports](../../../ci/metrics_reports.md) **(PREMIUM)** | Display the Metrics Report on the merge request so that it's fast and easy to identify changes to important metrics. | | [Metrics Reports](../../../ci/metrics_reports.md) **(PREMIUM)** | Display the Metrics Report on the merge request so that it's fast and easy to identify changes to important metrics. |
| [Multi-Project pipelines](../../../ci/multi_project_pipelines.md) **(PREMIUM)** | When you set up GitLab CI/CD across multiple projects, you can visualize the entire pipeline, including all cross-project interdependencies. | | [Multi-Project pipelines](../../../ci/pipelines/multi_project_pipelines.md) **(PREMIUM)** | When you set up GitLab CI/CD across multiple projects, you can visualize the entire pipeline, including all cross-project interdependencies. |
| [Pipelines for merge requests](../../../ci/pipelines/merge_request_pipelines.md) | Customize a specific pipeline structure for merge requests in order to speed the cycle up by running only important jobs. | | [Pipelines for merge requests](../../../ci/pipelines/merge_request_pipelines.md) | Customize a specific pipeline structure for merge requests in order to speed the cycle up by running only important jobs. |
| [Pipeline Graphs](../../../ci/pipelines/index.md#visualize-pipelines) | View the status of pipelines within the merge request, including the deployment process. | | [Pipeline Graphs](../../../ci/pipelines/index.md#visualize-pipelines) | View the status of pipelines within the merge request, including the deployment process. |
| [Test Coverage visualization](test_coverage_visualization.md) | See test coverage results for merge requests, within the file diff. | | [Test Coverage visualization](test_coverage_visualization.md) | See test coverage results for merge requests, within the file diff. |
......
<script>
import { GlBanner, GlLink, GlSprintf } from '@gitlab/ui';
import {
activateCloudLicense,
subscriptionBannerText,
subscriptionBannerTitle,
} from '../constants';
export const ACTIVATE_SUBSCRIPTION_EVENT = 'activate-subscription';
export default {
name: 'SubscriptionActivationBanner',
i18n: {
bannerText: subscriptionBannerText,
buttonText: activateCloudLicense,
title: subscriptionBannerTitle,
},
components: {
GlBanner,
GlLink,
GlSprintf,
},
inject: ['congratulationSvgPath', 'customersPortalUrl'],
methods: {
handlePrimary() {
this.$emit(ACTIVATE_SUBSCRIPTION_EVENT);
},
},
};
</script>
<template>
<gl-banner
:button-text="$options.i18n.buttonText"
:title="$options.i18n.title"
variant="promotion"
:svg-path="congratulationSvgPath"
@primary="handlePrimary"
>
<p>
<gl-sprintf :message="$options.i18n.bannerText">
<template #blogPostLink="{ content }">
<gl-link href="#" target="_blank">{{ content }}</gl-link>
</template>
<template #portalLink="{ content }">
<gl-link :href="customersPortalUrl" target="_blank">{{ content }}</gl-link>
</template>
</gl-sprintf>
</p>
</gl-banner>
</template>
...@@ -22,11 +22,19 @@ export default { ...@@ -22,11 +22,19 @@ export default {
SubscriptionActivationErrors, SubscriptionActivationErrors,
SubscriptionActivationForm, SubscriptionActivationForm,
}, },
model: {
prop: 'visible',
event: 'change',
},
props: { props: {
modalId: { modalId: {
type: String, type: String,
required: true, required: true,
}, },
visible: {
type: Boolean,
required: true,
},
}, },
data() { data() {
return { return {
...@@ -38,7 +46,10 @@ export default { ...@@ -38,7 +46,10 @@ export default {
this.error = error; this.error = error;
}, },
handleActivationSuccess() { handleActivationSuccess() {
this.$refs.modal.hide(); this.$emit('change', false);
},
handleChange(event) {
this.$emit('change', event);
}, },
handlePrimary() { handlePrimary() {
this.$refs.form.submit(); this.$refs.form.submit();
...@@ -52,13 +63,14 @@ export default { ...@@ -52,13 +63,14 @@ export default {
<template> <template>
<gl-modal <gl-modal
ref="modal" :visible="visible"
:modal-id="modalId" :modal-id="modalId"
:title="$options.title" :title="$options.title"
:action-cancel="$options.actionCancel" :action-cancel="$options.actionCancel"
:action-primary="$options.actionPrimary" :action-primary="$options.actionPrimary"
@primary.prevent="handlePrimary" @primary.prevent="handlePrimary"
@hidden="removeError" @hidden="removeError"
@change="handleChange"
> >
<subscription-activation-errors v-if="error" class="mb-4" :error="error" /> <subscription-activation-errors v-if="error" class="mb-4" :error="error" />
<p>{{ $options.bodyText }}</p> <p>{{ $options.bodyText }}</p>
......
...@@ -66,6 +66,7 @@ export default { ...@@ -66,6 +66,7 @@ export default {
shouldShowNotifications: false, shouldShowNotifications: false,
subscriptionSyncStatus: null, subscriptionSyncStatus: null,
subscriptionDetailsFields, subscriptionDetailsFields,
activationModalVisible: false,
}; };
}, },
computed: { computed: {
...@@ -138,7 +139,11 @@ export default { ...@@ -138,7 +139,11 @@ export default {
<template> <template>
<div> <div>
<subscription-activation-modal v-if="hasSubscription" :modal-id="$options.modal.id" /> <subscription-activation-modal
v-if="hasSubscription"
v-model="activationModalVisible"
:modal-id="$options.modal.id"
/>
<subscription-sync-notifications <subscription-sync-notifications
v-if="shouldShowNotifications" v-if="shouldShowNotifications"
class="mb-4" class="mb-4"
......
...@@ -137,3 +137,7 @@ export const connectivityErrorAlert = { ...@@ -137,3 +137,7 @@ export const connectivityErrorAlert = {
), ),
}; };
export const supportLink = 'https://about.gitlab.com/support/#contact-support'; export const supportLink = 'https://about.gitlab.com/support/#contact-support';
export const subscriptionBannerTitle = s__('SuperSonics|Cloud licensing');
export const subscriptionBannerText = s__(
"SuperSonics|Cloud licensing is now available. It's an easier way to activate instances and manage subscriptions. Read more about it in our %{blogPostLinkStart}blog post%{blogPostLinkEnd}. Activation codes are available in the %{portalLinkStart}Customers Portal%{portalLinkEnd}.",
);
...@@ -25,6 +25,7 @@ export default () => { ...@@ -25,6 +25,7 @@ export default () => {
const { const {
buySubscriptionPath, buySubscriptionPath,
congratulationSvgPath,
customersPortalUrl, customersPortalUrl,
freeTrialPath, freeTrialPath,
hasActiveLicense, hasActiveLicense,
...@@ -41,6 +42,7 @@ export default () => { ...@@ -41,6 +42,7 @@ export default () => {
apolloProvider, apolloProvider,
provide: { provide: {
buySubscriptionPath, buySubscriptionPath,
congratulationSvgPath,
connectivityHelpURL, connectivityHelpURL,
customersPortalUrl, customersPortalUrl,
freeTrialPath, freeTrialPath,
......
<script> <script>
import { GlDrawer } from '@gitlab/ui'; import { GlDrawer } from '@gitlab/ui';
import Project from './drawer_sections/project.vue';
export default { export default {
components: { components: {
GlDrawer, GlDrawer,
Project,
}, },
props: { props: {
mergeRequest: { mergeRequest: {
...@@ -42,5 +44,13 @@ export default { ...@@ -42,5 +44,13 @@ export default {
<template #header> <template #header>
<h4 data-testid="dashboard-drawer-title">{{ mergeRequest.title }}</h4> <h4 data-testid="dashboard-drawer-title">{{ mergeRequest.title }}</h4>
</template> </template>
<template v-if="showDrawer" #default>
<project
:avatar-url="mergeRequest.project.avatar_url"
:compliance-framework="mergeRequest.compliance_management_framework"
:name="mergeRequest.project.name"
:url="mergeRequest.project.web_url"
/>
</template>
</gl-drawer> </gl-drawer>
</template> </template>
<script>
import { GlAvatarLabeled, GlAvatarLink } from '@gitlab/ui';
import ComplianceFrameworkLabel from 'ee/vue_shared/components/compliance_framework_label/compliance_framework_label.vue';
import { __ } from '~/locale';
import DrawerSectionHeader from '../shared/drawer_section_header.vue';
export default {
components: {
ComplianceFrameworkLabel,
DrawerSectionHeader,
GlAvatarLabeled,
GlAvatarLink,
},
props: {
avatarUrl: {
type: String,
required: false,
default: '',
},
complianceFramework: {
type: Object,
required: false,
default: null,
},
name: {
type: String,
required: true,
},
url: {
type: String,
required: true,
},
},
i18n: {
header: __('Project'),
},
};
</script>
<template>
<div>
<drawer-section-header>{{ $options.i18n.header }}</drawer-section-header>
<div class="gl-display-flex gl-align-items-center">
<gl-avatar-link :title="name" :href="url">
<gl-avatar-labeled
:size="16"
:entity-name="name"
label=""
:sub-label="name"
:src="avatarUrl"
/>
</gl-avatar-link>
<compliance-framework-label
v-if="complianceFramework"
class="gl-ml-3"
:name="complianceFramework.name"
:color="complianceFramework.color"
:description="complianceFramework.description"
/>
</div>
</div>
</template>
<script>
export default {};
</script>
<template>
<span class="gl-display-block gl-mb-4 gl-text-gray-900">
<slot></slot>
</span>
</template>
...@@ -60,7 +60,8 @@ module LicenseHelper ...@@ -60,7 +60,8 @@ module LicenseHelper
has_active_license: (has_active_license? ? 'true' : 'false'), has_active_license: (has_active_license? ? 'true' : 'false'),
license_upload_path: new_admin_license_path, license_upload_path: new_admin_license_path,
license_remove_path: admin_license_path, license_remove_path: admin_license_path,
subscription_sync_path: sync_seat_link_admin_license_path subscription_sync_path: sync_seat_link_admin_license_path,
congratulation_svg_path: image_path('illustrations/illustration-congratulation-purchase.svg')
} }
end end
......
...@@ -20,6 +20,14 @@ class MergeRequestComplianceEntity < Grape::Entity ...@@ -20,6 +20,14 @@ class MergeRequestComplianceEntity < Grape::Entity
merge_request.to_reference(merge_request.project.group) merge_request.to_reference(merge_request.project.group)
end end
expose :project do |merge_request|
{
avatar_url: merge_request.project.avatar_url,
name: merge_request.project.name,
web_url: merge_request.project.web_url
}
end
expose :author, using: API::Entities::UserBasic expose :author, using: API::Entities::UserBasic
expose :approved_by_users, using: API::Entities::UserBasic expose :approved_by_users, using: API::Entities::UserBasic
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.user_dependency_scanning_jobs key_path: usage_activity_by_stage_monthly.secure.user_dependency_scanning_jobs
description: Monthly number of users creating Dependency Scanning jobs description: Monthly number of users creating Dependency Scanning jobs
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.user_license_management_jobs key_path: usage_activity_by_stage_monthly.secure.user_license_management_jobs
description: Monthly number of users running License Scanning jobs description: Monthly number of users running License Scanning jobs
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.dependency_scanning_pipeline key_path: usage_activity_by_stage_monthly.secure.dependency_scanning_pipeline
description: Count of pipelines with successful Dependency Scanning jobs description: Count of pipelines with successful Dependency Scanning jobs
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.user_container_scanning_jobs key_path: usage_activity_by_stage_monthly.secure.user_container_scanning_jobs
description: Distinct count per user of Container Scanning jobs run monthly description: Distinct count per user of Container Scanning jobs run monthly
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.container_scanning_pipeline key_path: usage_activity_by_stage_monthly.secure.container_scanning_pipeline
description: Pipelines containing a Container Scanning job description: Pipelines containing a Container Scanning job
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.coverage_fuzzing_pipeline key_path: usage_activity_by_stage_monthly.secure.coverage_fuzzing_pipeline
description: Counts of Pipelines that have at least 1 coverage-guided Fuzz Testing description: Counts of Pipelines that have at least 1 coverage-guided Fuzz Testing
job job
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.api_fuzzing_pipeline key_path: usage_activity_by_stage_monthly.secure.api_fuzzing_pipeline
description: Counts of Pipelines that have at least 1 API Fuzzing Testing job description: Counts of Pipelines that have at least 1 API Fuzzing Testing job
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.create.projects_enforcing_code_owner_approval key_path: usage_activity_by_stage_monthly.create.projects_enforcing_code_owner_approval
description: Count of total projects that require approval by code owners for code changes description: Count of total projects that require approval by code owners for code changes
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.user_preferences_group_overview_security_dashboard key_path: usage_activity_by_stage_monthly.secure.user_preferences_group_overview_security_dashboard
description: Users who set personal preference to see Security Dashboard on Group description: Users who set personal preference to see Security Dashboard on Group
information page information page
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage_monthly.secure.dependency_scanning_scans key_path: usage_activity_by_stage_monthly.secure.dependency_scanning_scans
description: Monthly number of users running Dependency Scanning Scans description: Monthly number of users running Dependency Scanning Scans
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
# Name of this metric contains g_project_management prefix # Name of this metric contains g_project_management prefix
# because we are using the same slot from issue_tracking to # because we are using the same slot from issue_tracking to
# allow data aggregation. # allow data aggregation.
......
--- ---
data_category: Optional data_category: Operational
key_path: redis_hll_counters.epics_usage.epics_usage_total_unique_counts_monthly key_path: redis_hll_counters.epics_usage.epics_usage_total_unique_counts_monthly
description: Total monthly users count for epics_usage description: Total monthly users count for epics_usage
product_section: dev product_section: dev
......
...@@ -10,6 +10,7 @@ status: data_available ...@@ -10,6 +10,7 @@ status: data_available
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444
time_frame: 28d time_frame: 28d
data_source: database data_source: database
data_category: Operational
distribution: distribution:
- ee - ee
tier: tier:
......
...@@ -10,6 +10,7 @@ status: data_available ...@@ -10,6 +10,7 @@ status: data_available
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444
time_frame: 28d time_frame: 28d
data_source: database data_source: database
data_category: Operational
distribution: distribution:
- ee - ee
tier: tier:
......
...@@ -10,6 +10,7 @@ status: data_available ...@@ -10,6 +10,7 @@ status: data_available
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444
time_frame: 28d time_frame: 28d
data_source: database data_source: database
data_category: Operational
distribution: distribution:
- ee - ee
tier: tier:
......
...@@ -10,6 +10,7 @@ status: data_available ...@@ -10,6 +10,7 @@ status: data_available
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444
time_frame: 28d time_frame: 28d
data_source: database data_source: database
data_category: Operational
distribution: distribution:
- ee - ee
tier: tier:
......
...@@ -10,6 +10,7 @@ status: data_available ...@@ -10,6 +10,7 @@ status: data_available
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444
time_frame: 28d time_frame: 28d
data_source: database data_source: database
data_category: Operational
distribution: distribution:
- ee - ee
tier: tier:
......
...@@ -10,6 +10,7 @@ status: data_available ...@@ -10,6 +10,7 @@ status: data_available
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444
time_frame: 28d time_frame: 28d
data_source: database data_source: database
data_category: Operational
distribution: distribution:
- ee - ee
tier: tier:
......
...@@ -10,6 +10,7 @@ status: data_available ...@@ -10,6 +10,7 @@ status: data_available
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49444
time_frame: 28d time_frame: 28d
data_source: database data_source: database
data_category: Operational
distribution: distribution:
- ee - ee
tier: tier:
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.dependency_scanning_jobs key_path: counts.dependency_scanning_jobs
description: Count of Dependency Scanning jobs run description: Count of Dependency Scanning jobs run
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.user_dependency_scanning_jobs key_path: usage_activity_by_stage.secure.user_dependency_scanning_jobs
description: Total number of users running Dependency Scanning jobs description: Total number of users running Dependency Scanning jobs
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.user_license_management_jobs key_path: usage_activity_by_stage.secure.user_license_management_jobs
description: Total number of users running License Scanning jobs description: Total number of users running License Scanning jobs
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.dependency_scanning_scans key_path: usage_activity_by_stage.secure.dependency_scanning_scans
description: Total number of users running Dependency Scanning Scans description: Total number of users running Dependency Scanning Scans
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.kubernetes_agent_gitops_sync key_path: counts.kubernetes_agent_gitops_sync
description: Count of events when an Agent is asked to synchronize the manifests or its configuration description: Count of events when an Agent is asked to synchronize the manifests or its configuration
product_section: ops product_section: ops
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.ingress_modsecurity_statistics_unavailable key_path: counts.ingress_modsecurity_statistics_unavailable
description: Whether or not ModSecurity statistics are unavailable description: Whether or not ModSecurity statistics are unavailable
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.container_scanning_jobs key_path: counts.container_scanning_jobs
description: Count of Container Scanning jobs run description: Count of Container Scanning jobs run
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.user_container_scanning_jobs key_path: usage_activity_by_stage.secure.user_container_scanning_jobs
description: Distinct count per user of Container Scanning jobs run description: Distinct count per user of Container Scanning jobs run
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.container_scanning_scans key_path: usage_activity_by_stage.secure.container_scanning_scans
description: 'Counts container scanning jobs' description: 'Counts container scanning jobs'
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_github_active key_path: counts.projects_github_active
description: Count of projects with active integrations for GitHub description: Count of projects with active integrations for GitHub
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.coverage_fuzzing_scans key_path: usage_activity_by_stage.secure.coverage_fuzzing_scans
description: 'Counts fuzzing jobs' description: 'Counts fuzzing jobs'
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.api_fuzzing_scans key_path: usage_activity_by_stage.secure.api_fuzzing_scans
description: 'Counts API fuzzing jobs' description: 'Counts API fuzzing jobs'
product_section: sec product_section: sec
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.epics key_path: counts.epics
description: Count of all epics description: Count of all epics
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.projects_with_repositories_enabled key_path: counts.projects_with_repositories_enabled
description: Count of users creating projects that have a matching Git repository, result of a Git push action. description: Count of users creating projects that have a matching Git repository, result of a Git push action.
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.protected_branches key_path: counts.protected_branches
description: Count of total protected branches description: Count of total protected branches
product_section: dev product_section: dev
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.sast_scans key_path: usage_activity_by_stage.secure.sast_scans
description: Counts sast jobs description: Counts sast jobs
product_section: sec product_section: sec
...@@ -10,7 +10,6 @@ value_type: number ...@@ -10,7 +10,6 @@ value_type: number
status: data_available status: data_available
time_frame: all time_frame: all
data_source: database data_source: database
data_category: Optional
distribution: distribution:
- ee - ee
tier: tier:
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.dast_scans key_path: usage_activity_by_stage.secure.dast_scans
description: Counts dast jobs description: Counts dast jobs
product_section: sec product_section: sec
...@@ -10,7 +10,6 @@ value_type: number ...@@ -10,7 +10,6 @@ value_type: number
status: data_available status: data_available
time_frame: all time_frame: all
data_source: database data_source: database
data_category: Optional
distribution: distribution:
- ee - ee
tier: tier:
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.secret_detection_scans key_path: usage_activity_by_stage.secure.secret_detection_scans
description: counts secret detection jobs description: counts secret detection jobs
product_section: sec product_section: sec
...@@ -10,7 +10,6 @@ value_type: number ...@@ -10,7 +10,6 @@ value_type: number
status: data_available status: data_available
time_frame: all time_frame: all
data_source: database data_source: database
data_category: Optional
distribution: distribution:
- ee - ee
tier: tier:
......
--- ---
data_category: Optional data_category: Operational
key_path: counts.user_preferences_group_overview_security_dashboard key_path: counts.user_preferences_group_overview_security_dashboard
description: Count of users who set personal preference to see Security Dashboard description: Count of users who set personal preference to see Security Dashboard
on Group information page on Group information page
......
--- ---
data_category: Optional data_category: Operational
key_path: usage_activity_by_stage.secure.user_preferences_group_overview_security_dashboard key_path: usage_activity_by_stage.secure.user_preferences_group_overview_security_dashboard
description: Users who set personal preference to see Details on Group information page description: Users who set personal preference to see Details on Group information page
product_section: sec product_section: sec
......
import { GlBanner, GlLink, GlSprintf } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import SubscriptionActivationBanner, {
ACTIVATE_SUBSCRIPTION_EVENT,
} from 'ee/admin/subscriptions/show/components/subscription_activation_banner.vue';
import {
activateCloudLicense,
subscriptionBannerText,
subscriptionBannerTitle,
} from 'ee/admin/subscriptions/show/constants';
describe('SubscriptionActivationBanner', () => {
let wrapper;
const findBanner = () => wrapper.findComponent(GlBanner);
const findLink = (at) => wrapper.findAllComponents(GlLink).at(at);
const customersPortalUrl = 'customers.dot';
const congratulationSvgPath = '/path/to/svg';
const createComponent = () => {
wrapper = shallowMount(SubscriptionActivationBanner, {
provide: {
congratulationSvgPath,
customersPortalUrl,
},
stubs: {
GlSprintf,
},
});
};
beforeEach(() => {
createComponent();
});
afterEach(() => {
wrapper.destroy();
});
it('provides the correct props to the banner', () => {
expect(findBanner().props()).toMatchObject({
buttonText: activateCloudLicense,
title: subscriptionBannerTitle,
svgPath: congratulationSvgPath,
});
});
it('contains help text', () => {
expect(findBanner().text()).toMatchInterpolatedText(subscriptionBannerText);
});
it('contains a link to the blog post', () => {
expect(findLink(0).attributes('href')).toBe('#');
});
it('contains a link to the customers portal', () => {
expect(findLink(1).attributes('href')).toBe(customersPortalUrl);
});
it('emits an event when the primary button is clicked', () => {
expect(wrapper.emitted(ACTIVATE_SUBSCRIPTION_EVENT)).toBeUndefined();
findBanner().vm.$emit('primary');
expect(wrapper.emitted(ACTIVATE_SUBSCRIPTION_EVENT)).toEqual([[]]);
});
});
...@@ -23,14 +23,14 @@ describe('SubscriptionActivationModal', () => { ...@@ -23,14 +23,14 @@ describe('SubscriptionActivationModal', () => {
wrapper.findComponent(SubscriptionActivationErrors); wrapper.findComponent(SubscriptionActivationErrors);
const findSubscriptionActivationForm = () => wrapper.findComponent(SubscriptionActivationForm); const findSubscriptionActivationForm = () => wrapper.findComponent(SubscriptionActivationForm);
const createComponent = ({ props = {}, stubs = {} } = {}) => { const createComponent = ({ props = {} } = {}) => {
wrapper = extendedWrapper( wrapper = extendedWrapper(
shallowMount(SubscriptionActivationModal, { shallowMount(SubscriptionActivationModal, {
propsData: { propsData: {
modalId, modalId,
visible: false,
...props, ...props,
}, },
stubs,
}), }),
); );
}; };
...@@ -67,11 +67,18 @@ describe('SubscriptionActivationModal', () => { ...@@ -67,11 +67,18 @@ describe('SubscriptionActivationModal', () => {
it('does not show any error', () => { it('does not show any error', () => {
expect(findSubscriptionActivationErrors().exists()).toBe(false); expect(findSubscriptionActivationErrors().exists()).toBe(false);
}); });
it('emits a change event', () => {
expect(wrapper.emitted('change')).toBeUndefined();
findGlModal().vm.$emit('change', false);
expect(wrapper.emitted('change')).toEqual([[false]]);
});
}); });
describe('subscription activation', () => { describe('subscription activation', () => {
const fakeEvent = 'fake-modal-event'; const fakeEvent = 'fake-modal-event';
const hiddenEven = 'hidden';
describe('when submitting the form', () => { describe('when submitting the form', () => {
beforeEach(() => { beforeEach(() => {
...@@ -89,15 +96,19 @@ describe('SubscriptionActivationModal', () => { ...@@ -89,15 +96,19 @@ describe('SubscriptionActivationModal', () => {
describe('successful activation', () => { describe('successful activation', () => {
beforeEach(() => { beforeEach(() => {
createComponent({ stubs: { GlModal } }); createComponent({ props: { visible: true } });
jest
.spyOn(wrapper.vm.$refs.modal, 'hide')
.mockImplementation(() => wrapper.vm.$emit(hiddenEven));
findSubscriptionActivationForm().vm.$emit(SUBSCRIPTION_ACTIVATION_SUCCESS_EVENT);
}); });
it('it emits a hidden event', () => { it('provides the correct prop to the modal', () => {
expect(wrapper.emitted(hiddenEven)).toEqual([[]]); expect(findGlModal().props('visible')).toBe(true);
});
it('hides the modal', () => {
expect(wrapper.emitted('change')).toBeUndefined();
findSubscriptionActivationForm().vm.$emit(SUBSCRIPTION_ACTIVATION_SUCCESS_EVENT);
expect(wrapper.emitted('change')).toEqual([[false]]);
}); });
}); });
......
...@@ -138,11 +138,18 @@ describe('Subscription Breakdown', () => { ...@@ -138,11 +138,18 @@ describe('Subscription Breakdown', () => {
}); });
it('presents a subscription activation modal', () => { it('presents a subscription activation modal', () => {
expect(findSubscriptionActivationModal().exists()).toBe(true); expect(findSubscriptionActivationModal().props()).toMatchObject({
modalId,
visible: false,
});
}); });
it('passes the correct modal id', () => { it('updates visible of subscription activation modal when change emitted', async () => {
expect(findSubscriptionActivationModal().attributes('modalid')).toBe(modalId); findSubscriptionActivationModal().vm.$emit('change', true);
await wrapper.vm.$nextTick();
expect(findSubscriptionActivationModal().props('visible')).toBe(true);
}); });
describe('footer buttons', () => { describe('footer buttons', () => {
...@@ -279,9 +286,7 @@ describe('Subscription Breakdown', () => { ...@@ -279,9 +286,7 @@ describe('Subscription Breakdown', () => {
expect(findSubscriptionSyncNotifications().exists()).toBe(false); expect(findSubscriptionSyncNotifications().exists()).toBe(false);
}); });
it('shows a modal', () => { it('shows modal when active subscription action clicked', () => {
const props = { subscription: { ...licenseFile } };
createComponent({ props, stubs: { GlCard, SubscriptionDetailsCard } });
findActivateSubscriptionAction().vm.$emit('click'); findActivateSubscriptionAction().vm.$emit('click');
expect(glModalDirective).toHaveBeenCalledWith(modalId); expect(glModalDirective).toHaveBeenCalledWith(modalId);
......
import { GlAvatarLabeled, GlAvatarLink } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import Project from 'ee/compliance_dashboard/components/drawer_sections/project.vue';
import DrawerSectionHeader from 'ee/compliance_dashboard/components/shared/drawer_section_header.vue';
import ComplianceFrameworkLabel from 'ee/vue_shared/components/compliance_framework_label/compliance_framework_label.vue';
import { complianceFramework } from 'ee_jest/vue_shared/components/compliance_framework_label/mock_data';
describe('Project component', () => {
let wrapper;
const projectName = 'Foo project';
const url = 'https://foo.com/project';
const avatarUrl = '/foo/bar.png';
const findSectionHeader = () => wrapper.findComponent(DrawerSectionHeader);
const findAvatarLink = () => wrapper.findComponent(GlAvatarLink);
const findAvatarLabel = () => wrapper.findComponent(GlAvatarLabeled);
const findComplianceFrameworkLabel = () => wrapper.findComponent(ComplianceFrameworkLabel);
const createComponent = (props) => {
return shallowMount(Project, {
propsData: {
name: projectName,
url,
...props,
},
});
};
afterEach(() => {
wrapper.destroy();
});
describe('by default', () => {
beforeEach(() => {
wrapper = createComponent();
});
it('renders the header', () => {
expect(findSectionHeader().text()).toBe('Project');
});
it('renders the avatar with a name and url', () => {
expect(findAvatarLink().attributes()).toStrictEqual({
title: projectName,
href: url,
});
expect(findAvatarLabel().props()).toMatchObject({
subLabel: projectName,
label: '',
});
expect(findAvatarLabel().attributes()).toMatchObject({
'entity-name': projectName,
src: '',
});
});
it('does not render the compliance framework label', () => {
expect(findComplianceFrameworkLabel().exists()).toBe(false);
});
});
describe('when the avatar URL is provided', () => {
beforeEach(() => {
wrapper = createComponent({ avatarUrl });
});
it('renders the avatar with the URL', () => {
expect(findAvatarLabel().props()).toMatchObject({
subLabel: projectName,
label: '',
});
expect(findAvatarLabel().attributes()).toMatchObject({
'entity-name': projectName,
src: avatarUrl,
});
});
});
describe('when the compliance framework is provided', () => {
beforeEach(() => {
wrapper = createComponent({ complianceFramework });
});
it('renders the compliance framework label', () => {
const { color, description, name } = complianceFramework;
expect(findComplianceFrameworkLabel().props()).toStrictEqual({
color,
description,
name,
});
});
});
});
import { GlDrawer } from '@gitlab/ui'; import { GlDrawer } from '@gitlab/ui';
import MergeRequestDrawer from 'ee/compliance_dashboard/components/drawer.vue'; import MergeRequestDrawer from 'ee/compliance_dashboard/components/drawer.vue';
import Project from 'ee/compliance_dashboard/components/drawer_sections/project.vue';
import { complianceFramework } from 'ee_jest/vue_shared/components/compliance_framework_label/mock_data';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { createMergeRequests } from '../mock_data'; import { createMergeRequests } from '../mock_data';
describe('MergeRequestDrawer component', () => { describe('MergeRequestDrawer component', () => {
let wrapper; let wrapper;
const mergeRequest = createMergeRequests({ count: 1 })[0]; const mergeRequest = createMergeRequests({
count: 1,
props: {
compliance_management_framework: complianceFramework,
},
})[0];
const findTitle = () => wrapper.findByTestId('dashboard-drawer-title'); const findTitle = () => wrapper.findByTestId('dashboard-drawer-title');
const findDrawer = () => wrapper.findComponent(GlDrawer); const findDrawer = () => wrapper.findComponent(GlDrawer);
const findProject = () => wrapper.findComponent(Project);
const createComponent = (props) => { const createComponent = (props) => {
return shallowMountExtended(MergeRequestDrawer, { return shallowMountExtended(MergeRequestDrawer, {
...@@ -31,6 +39,10 @@ describe('MergeRequestDrawer component', () => { ...@@ -31,6 +39,10 @@ describe('MergeRequestDrawer component', () => {
it('the drawer is not shown', () => { it('the drawer is not shown', () => {
expect(findDrawer().props('open')).toBe(false); expect(findDrawer().props('open')).toBe(false);
}); });
it('the sections are not mounted', () => {
expect(findProject().exists()).toBe(false);
});
}); });
describe('when open', () => { describe('when open', () => {
...@@ -45,5 +57,14 @@ describe('MergeRequestDrawer component', () => { ...@@ -45,5 +57,14 @@ describe('MergeRequestDrawer component', () => {
it('has the drawer title', () => { it('has the drawer title', () => {
expect(findTitle().text()).toEqual(mergeRequest.title); expect(findTitle().text()).toEqual(mergeRequest.title);
}); });
it('has the project section', () => {
expect(findProject().props()).toStrictEqual({
avatarUrl: mergeRequest.project.avatar_url,
complianceFramework,
name: mergeRequest.project.name,
url: mergeRequest.project.web_url,
});
});
}); });
}); });
import { shallowMount } from '@vue/test-utils';
import DrawerSectionHeader from 'ee/compliance_dashboard/components/shared/drawer_section_header.vue';
describe('DrawerSectionHeader component', () => {
let wrapper;
const headerText = 'Section header';
const createComponent = () => {
return shallowMount(DrawerSectionHeader, {
slots: {
default: headerText,
},
});
};
beforeEach(() => {
wrapper = createComponent();
});
afterEach(() => {
wrapper.destroy();
});
it('renders the header text', () => {
expect(wrapper.text()).toBe(headerText);
});
});
...@@ -40,6 +40,11 @@ export const createMergeRequest = ({ id = 1, props } = {}) => { ...@@ -40,6 +40,11 @@ export const createMergeRequest = ({ id = 1, props } = {}) => {
author: createUser(id), author: createUser(id),
pipeline_status: createPipelineStatus('success'), pipeline_status: createPipelineStatus('success'),
approval_status: 'success', approval_status: 'success',
project: {
avatar_url: '/foo/bar.png',
name: 'Foo',
web_url: 'https://foo.com/project',
},
}; };
return { ...mergeRequest, ...props }; return { ...mergeRequest, ...props };
......
...@@ -99,7 +99,8 @@ RSpec.describe LicenseHelper do ...@@ -99,7 +99,8 @@ RSpec.describe LicenseHelper do
buy_subscription_path: 'subscriptions_plans_url', buy_subscription_path: 'subscriptions_plans_url',
subscription_sync_path: sync_seat_link_admin_license_path, subscription_sync_path: sync_seat_link_admin_license_path,
license_upload_path: new_admin_license_path, license_upload_path: new_admin_license_path,
license_remove_path: admin_license_path }) license_remove_path: admin_license_path,
congratulation_svg_path: helper.image_path('illustrations/illustration-congratulation-purchase.svg') })
end end
end end
...@@ -113,7 +114,8 @@ RSpec.describe LicenseHelper do ...@@ -113,7 +114,8 @@ RSpec.describe LicenseHelper do
buy_subscription_path: 'subscriptions_plans_url', buy_subscription_path: 'subscriptions_plans_url',
subscription_sync_path: sync_seat_link_admin_license_path, subscription_sync_path: sync_seat_link_admin_license_path,
license_upload_path: new_admin_license_path, license_upload_path: new_admin_license_path,
license_remove_path: admin_license_path }) license_remove_path: admin_license_path,
congratulation_svg_path: helper.image_path('illustrations/illustration-congratulation-purchase.svg') })
end end
end end
end end
......
...@@ -30,7 +30,8 @@ RSpec.describe MergeRequestComplianceEntity do ...@@ -30,7 +30,8 @@ RSpec.describe MergeRequestComplianceEntity do
:target_branch_uri, :target_branch_uri,
:source_branch, :source_branch,
:source_branch_uri, :source_branch_uri,
:compliance_management_framework :compliance_management_framework,
:project
) )
end end
......
...@@ -31425,6 +31425,12 @@ msgstr "" ...@@ -31425,6 +31425,12 @@ msgstr ""
msgid "SuperSonics|Cloud license" msgid "SuperSonics|Cloud license"
msgstr "" msgstr ""
msgid "SuperSonics|Cloud licensing"
msgstr ""
msgid "SuperSonics|Cloud licensing is now available. It's an easier way to activate instances and manage subscriptions. Read more about it in our %{blogPostLinkStart}blog post%{blogPostLinkEnd}. Activation codes are available in the %{portalLinkStart}Customers Portal%{portalLinkEnd}."
msgstr ""
msgid "SuperSonics|Expires on" msgid "SuperSonics|Expires on"
msgstr "" msgstr ""
......
...@@ -42,7 +42,7 @@ RSpec.describe 'Projects > Settings > For a forked project', :js do ...@@ -42,7 +42,7 @@ RSpec.describe 'Projects > Settings > For a forked project', :js do
expect(find_field(send_email)).to be_checked expect(find_field(send_email)).to be_checked
end end
it 'updates form values' do it 'updates form values', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/333665' do
check(create_issue) check(create_issue)
uncheck(send_email) uncheck(send_email)
click_on('No template selected') click_on('No template selected')
......
...@@ -58,7 +58,7 @@ RSpec.describe 'Terraform', :js do ...@@ -58,7 +58,7 @@ RSpec.describe 'Terraform', :js do
context 'when clicking on the delete button' do context 'when clicking on the delete button' do
let(:additional_state) { create(:terraform_state, project: project) } let(:additional_state) { create(:terraform_state, project: project) }
it 'removes the state', :aggregate_failures do it 'removes the state', :aggregate_failures, quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/333640' do
visit project_terraform_index_path(project) visit project_terraform_index_path(project)
expect(page).to have_content(additional_state.name) expect(page).to have_content(additional_state.name)
......
...@@ -65,6 +65,26 @@ RSpec.describe Git::WikiPushService, services: true do ...@@ -65,6 +65,26 @@ RSpec.describe Git::WikiPushService, services: true do
expect(Event.last(count).pluck(:action)).to match_array(Event::WIKI_ACTIONS.map(&:to_s)) expect(Event.last(count).pluck(:action)).to match_array(Event::WIKI_ACTIONS.map(&:to_s))
end end
context 'when wiki_page slug is not UTF-8 ' do
let(:binary_title) { Gitlab::EncodingHelper.encode_binary('编码') }
def run_service
wiki_page = create(:wiki_page, wiki: wiki, title: "#{binary_title} 'foo'")
process_changes do
# Test that new_path is converted to UTF-8
create(:wiki_page, wiki: wiki, title: binary_title)
# Test that old_path is also is converted to UTF-8
update_page(wiki_page.title, 'foo')
end
end
it 'does not raise an error' do
expect { run_service }.not_to raise_error
end
end
end end
context 'two pages have been created' do context 'two pages have been created' do
...@@ -346,9 +366,10 @@ RSpec.describe Git::WikiPushService, services: true do ...@@ -346,9 +366,10 @@ RSpec.describe Git::WikiPushService, services: true do
::Wikis::CreateAttachmentService.new(container: wiki.container, current_user: current_user, params: params).execute ::Wikis::CreateAttachmentService.new(container: wiki.container, current_user: current_user, params: params).execute
end end
def update_page(title) def update_page(title, new_title = nil)
new_title = title unless new_title.present?
page = git_wiki.page(title: title) page = git_wiki.page(title: title)
git_wiki.update_page(page.path, title, 'markdown', 'Hey', commit_details) git_wiki.update_page(page.path, new_title, 'markdown', 'Hey', commit_details)
end end
def delete_page(page) def delete_page(page)
......
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