Release Stats¶
This feature is supported since v0.36.
Feature Introduction¶
The Release Stats (ReleaseStats) feature is used to show the execution status of pipelines of the release type, helping users understand the release history and status of versions more intuitively.
Enable Release Stats¶
By default, the release stats feature is disabled. You can enable it by modifying the configuration file.
1. Modify the configuration file¶
-
In Container Management, select the global service cluster, and search for
amamba-configin ConfigMaps.
-
Click Edit YAML, and add
ReleaseStats=trueto thefeatureGatesof apiServerConfig and devopsConfig.amamba-config.yaml: | apiServerConfig: featureGates: - ReleaseStats=true devopsConfig: featureGates: - ReleaseStats=true
-
After the modification is successful, search for
amamba-apiserverandamamba-devops-serverin Deployments, and click Restart.
2. Confirm the feature is enabled¶
After the restart is successful, enter the Workbench, and you will see the release feature on the relevant pages.
Use Release Stats¶
-
Create a pipeline
Select
releaseas the pipeline type.
-
Edit and run the pipeline
Since we identify business-related information through environment variables and run parameters, the pipeline needs to contain the following keywords (case-insensitive; if both are contained, the information in the run parameters prevails):
application: the application nameimage: the image name and versioncluster: the cluster namenamespace: the namespace name
Update the Jenkinsfile as follows:
pipeline { agent { node { label 'base' } } parameters { choice(name: 'cluster', choices: ['sh-02', 'eu-01'], description: '') choice(name: 'namespace', choices: ['biz1', 'biz2'],, description: '') } stages { stage('Stage-RnIJL') { steps { container('base') { echo "123" } } } } environment { application = 'test-2' image = 'docker.io/library/nginx:latest' } }Run the pipeline.
-
View the release stats
In the left navigation bar, select Release Stats. On the list page, the system will show all version releases related to the current pipeline.
