Add mention on Slack that a failure is new
As per #3 (closed) - report on new failures
The code changes introduce a new feature to a Slack failure report generator. This feature allows the report to include information about failed child pipelines and their jobs, providing a more comprehensive view of the pipeline's status. Additionally, the report now compares the current pipeline's results with the previous pipeline's results, highlighting any new failures that have occurred. These enhancements improve the report's usefulness and help identify potential issues more efficiently.
Testing
Add a breakpoint to ln133
133: require 'pry-byebug'
134: binding.pry
=> 135: overall_results
Run against a pipeline that has new failures
CI_PIPELINE_ID=1268608236 CI_API_V4_URL=https://gitlab.com/api/v4 ruby ./scripts/run_slack_failure_report.rb
2 out of the 7 fail jobs should show NEW - Python Pip and Custom CA:
[1] pry(SlackFailureReport)> overall_results
=> [{"Status"=>"failed",
"Pipeline_name"=>
"💥 NEW - <https://gitlab.com/gitlab-org/security-products/tests/python-pip/-/pipelines/1268615491|❌python-pip-update-requirements-offline-FREEZE> - gemnasium-python-dependency_scanning, qa-gemnasium-python-dependency_scanning"},
{"Status"=>"failed",
"Pipeline_name"=>
"<https://gitlab.com/gitlab-org/security-products/tests/java-gradle-multimodules/-/pipelines/1268615382|❌java-gradle-multimodules-subprojects-buildfilename-FREEZE> - qa-gemnasium-maven-dependency_scanning"},
{"Status"=>"failed",
"Pipeline_name"=>
"<https://gitlab.com/gitlab-org/security-products/tests/java-gradle-multimodules/-/pipelines/1268615375|❌java-gradle-multimodules-offline-FREEZE> - qa-gemnasium-maven-dependency_scanning"},
{"Status"=>"failed",
"Pipeline_name"=>
"<https://gitlab.com/gitlab-org/security-products/tests/java-gradle-multimodules/-/pipelines/1268615367|❌java-gradle-multimodules-no-root-dependencies-FREEZE> - qa-gemnasium-maven-dependency_scanning"},
{"Status"=>"failed",
"Pipeline_name"=>
"<https://gitlab.com/gitlab-org/security-products/tests/java-gradle-multimodules/-/pipelines/1268615402|❌java-gradle-multimodules-master> - qa-gemnasium-maven-dependency_scanning"},
{"Status"=>"failed",
"Pipeline_name"=>
"<https://gitlab.com/gitlab-org/security-products/tests/webgoat.net/-/pipelines/1268615363|❌WebGoat.NET-master> - "},
{"Status"=>"failed",
"Pipeline_name"=>
"💥 NEW - <https://gitlab.com/gitlab-org/security-products/tests/custom-ca/-/pipelines/1268615364|❌Custom CA-master> - gemnasium-maven-fips"}]