Metadata step added to deployment automatically
When promoting user stories with Copado, you might notice that the deployment has a Metadata deployment step apart from the expected Git Promotion step. This step was not added manually and none of the user stories in the promotion contains a Deployment Task with Metadata.How was that Metadata step added to the deployment?
The Metadata step will be added automatically during the creation of the deployment if the any of the user stories being promoted contains components that were added with the "Add Metadata" button in the user story.
How can you identify if the "Add Metadata" button was used in the user stories?
Whenever this happens, check the following in the user stories you are promoting:
1. User Story Selections.
If the components were added to the user story with the button "Add Metadata", the components will appear as selected in the column "MetaData". This will cause the Metadata step deployment to be created when promoting the user story.
If you see components marked as "Git Upserts" and "MetaData", it means that both buttons were used.
2. Attachments in the user story.
How do you remove the components that were added to the user story as "MetaData" instead of "Git Upserts"?
You can remove the components added as "MetaData" by removing the "MetaData" attachment on the user story.
If a component was added using both buttons, removing the "MetaData" attachment will only remove the "MetaData" selection but not the "Git Upserts" selection.
Once the "MetaData" attachment is removed from the user stories, the Metadata deployment step will not be created when the user stories are promoted.