Skip to content

Commit

Permalink
moved lowercase check to beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
audrastump committed Nov 27, 2024
1 parent 19fb963 commit 06444fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/actions/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ export async function deploy(

// check manifest stability
core.startGroup('Checking manifest stability')
const resourceType =
const resourceType = (
core.getInput('resource-type') ||
'Microsoft.ContainerService/managedClusters'
).toLowerCase()
const resourceTypes: Resource[] = getResources(
deployedManifestFiles,
models.DEPLOYMENT_TYPES.concat([
Expand Down
3 changes: 2 additions & 1 deletion src/actions/promote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,10 @@ async function promoteBlueGreen(kubectl: Kubectl, manifests: string[]) {

// checking stability of newly created deployments
core.startGroup('Checking manifest stability')
const resourceType =
const resourceType = (
core.getInput('resource-type') ||
'Microsoft.ContainerService/managedClusters'
).toLowerCase()
const deployedManifestFiles = deployResult.manifestFiles
const resources: Resource[] = getResources(
deployedManifestFiles,
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/manifestStabilityUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function checkManifestStability(
resourceType: string
): Promise<void> {
// Skip if resource type is microsoft.containerservice/fleets
if (resourceType.toLowerCase() === 'microsoft.containerservice/fleets') {
if (resourceType === 'microsoft.containerservice/fleets') {
core.info(
'Skipping checkManifestStability for microsoft.containerservice/fleets'
)
Expand Down

0 comments on commit 06444fa

Please sign in to comment.