Fixing Azure Container App template #1568
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Microsoft changed the behavior of the
Get-AzContainerApp
cmdlet, it used to returnnull
when searching for a specific Container App and it didn't exist. It now throws an error causing the template to fail.Results
Template will now perform a search of all container apps within the specified
Resource Group
. If the results are null, the$containerApp
variable is assigned$null
. If something is returned, it does aWhere-Object
operation and will either return the desired Container App or returnnull
if it doesn't exist within the collection.Before
The step template would fail when the Container App didn't exist.
After
The template no longer errors and will function as desired.
Pre-requisites
Id
should be a GUID that is not00000000-0000-0000-0000-000000000000
Id
property (updating theId
will break the Library sync functionality in Octopus).Version
should be incremented, otherwise the integration with Octopus won't update the step template correctly$
LastModifiedBy
field must be present, and (optionally) updated with the correct authorCategory
has been created:{categoryname}.png
must be present under thestep-templates/logos
folderswitch
in thehumanize
function ingulpfile.babel.js
must have acase
statement corresponding to itFixes # . If there is an open issue that this PR fixes add it here, otherwise just remove this line