feat: post config file with failure notification
Description
This MR implements three things:
- Posts contents of an instance's
config.yml
andrequirements.txt
file in the PR sandbox success and failure notifications. - Removes extra notifications that were posted during sandbox create/update. Now, only success/failure notification is posted at the end of the deployment pipeline.
- Fixes the issue where deleting a PR comment with the sandbox command, triggered a pipeline. Now pipelines are triggered only when such commands are posted.
Note to reviewer: It might be easier to review this MR commit-wise
Supporting information
Link to other information about the change, such as GitLab issues, GitHub issues, forum discussions. Be sure to check they are publicly readable, or if not, repeat the information here.
Testing instructions
1. Post config with success notifications
- Check this success notification corresponding to this instance. Verify that config and requirements are accessible, accurate and does not contain any secrets.
- Check this failure notifiaciton corresponding to this instance. Verify that config and requirements are accessible, accurate and does not contain any secrets.
2. Removes extra notifications
- Check this sandbox update comment.
- Verify that the only comment posted after this, is the failure notification.
3. Deleting comment should not trigger build
- Delete this comment from the PR.
- Check the pipelines for the cluster, to verify no build was triggered.
Dependencies
List the dependencies required for this change, if any. Do not forget to link grove-template merge request here if that's affected by this change.
Screenshots
If applicable, add screenshots to help explain your feature.
Checklist
If any of the items below is not applicable, do not remove them, but put a check in it.
-
All providers include the new feature/change -
All affected providers can provision new clusters -
Unit tests are added/updated -
Documentation is added/updated -
The TOOLS_CONTAINER_IMAGE_VERSION
in ci_vars.yml is updated -
The grove-template repository is updated
Additional context
Private Ref: Open Craft internal ticket: BB-8182
Edited by Kaustav Banerjee