Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgamero committed Dec 9, 2024
1 parent fd54d1f commit aeeea27
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions src/actions/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as core from '@actions/core'
import * as models from '../types/kubernetesTypes'
import * as KubernetesConstants from '../types/kubernetesTypes'
import { Kubectl, Resource } from '../types/kubectl'
import {Kubectl, Resource} from '../types/kubectl'
import {
getResources,
updateManifestFiles
Expand All @@ -11,8 +11,8 @@ import {
checkManifestStability,
deployManifests
} from '../strategyHelpers/deploymentHelper'
import { DeploymentStrategy } from '../types/deploymentStrategy'
import { parseTrafficSplitMethod } from '../types/trafficSplitMethod'
import {DeploymentStrategy} from '../types/deploymentStrategy'
import {parseTrafficSplitMethod} from '../types/trafficSplitMethod'
export const ResourceTypeManagedCluster =
'Microsoft.ContainerService/managedClusters'
export const ResourceTypeFleet = 'Microsoft.ContainerService/fleets'
Expand All @@ -32,7 +32,7 @@ export async function deploy(
// deploy manifests
core.startGroup('Deploying manifests')
const trafficSplitMethod = parseTrafficSplitMethod(
core.getInput('traffic-split-method', { required: true })
core.getInput('traffic-split-method', {required: true})
)
const deployedManifestFiles = await deployManifests(
inputManifestFiles,
Expand Down
32 changes: 16 additions & 16 deletions src/strategyHelpers/deploymentHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ import * as fs from 'fs'
import * as yaml from 'js-yaml'
import * as canaryDeploymentHelper from './canary/canaryHelper'
import * as models from '../types/kubernetesTypes'
import { isDeploymentEntity } from '../types/kubernetesTypes'
import {isDeploymentEntity} from '../types/kubernetesTypes'
import * as fileHelper from '../utilities/fileUtils'
import * as KubernetesManifestUtility from '../utilities/manifestStabilityUtils'
import { Kubectl, Resource } from '../types/kubectl'
import {Kubectl, Resource} from '../types/kubectl'

import { deployPodCanary } from './canary/podCanaryHelper'
import { deploySMICanary } from './canary/smiCanaryHelper'
import { DeploymentConfig } from '../types/deploymentConfig'
import { deployBlueGreen } from './blueGreen/deploy'
import { DeploymentStrategy } from '../types/deploymentStrategy'
import {deployPodCanary} from './canary/podCanaryHelper'
import {deploySMICanary} from './canary/smiCanaryHelper'
import {DeploymentConfig} from '../types/deploymentConfig'
import {deployBlueGreen} from './blueGreen/deploy'
import {DeploymentStrategy} from '../types/deploymentStrategy'
import * as core from '@actions/core'
import {
parseTrafficSplitMethod,
TrafficSplitMethod
} from '../types/trafficSplitMethod'
import { parseRouteStrategy } from '../types/routeStrategy'
import { ExecOutput } from '@actions/exec'
import {parseRouteStrategy} from '../types/routeStrategy'
import {ExecOutput} from '@actions/exec'
import {
getWorkflowAnnotationKeyLabel,
getWorkflowAnnotations,
Expand All @@ -33,9 +33,9 @@ import {
getWorkflowFilePath,
normalizeWorkflowStrLabel
} from '../utilities/githubUtils'
import { getDeploymentConfig } from '../utilities/dockerUtils'
import { DeployResult } from '../types/deployResult'
import { ClusterType } from '../actions/deploy'
import {getDeploymentConfig} from '../utilities/dockerUtils'
import {DeployResult} from '../types/deployResult'
import {ClusterType} from '../actions/deploy'

export async function deployManifests(
files: string[],
Expand All @@ -56,7 +56,7 @@ export async function deployManifests(

case DeploymentStrategy.BLUE_GREEN: {
const routeStrategy = parseRouteStrategy(
core.getInput('route-method', { required: true })
core.getInput('route-method', {required: true})
)
const blueGreenDeployment = await deployBlueGreen(
kubectl,
Expand All @@ -80,7 +80,7 @@ export async function deployManifests(

case DeploymentStrategy.BASIC: {
const trafficSplitMethod = parseTrafficSplitMethod(
core.getInput('traffic-split-method', { required: true })
core.getInput('traffic-split-method', {required: true})
)

const forceDeployment = core.getInput('force').toLowerCase() === 'true'
Expand Down Expand Up @@ -115,7 +115,7 @@ function appendStableVersionLabelToResource(files: string[]): string[] {
const fileContents = fs.readFileSync(filePath).toString()

yaml.loadAll(fileContents, function (inputObject) {
const kind = (inputObject as { kind: string }).kind
const kind = (inputObject as {kind: string}).kind

if (isDeploymentEntity(kind)) {
const updatedObject =
Expand Down Expand Up @@ -258,7 +258,7 @@ async function annotateResources(
resource.type.toLowerCase() !==
models.KubernetesWorkload.POD.toLowerCase()
) {
; (
;(
await annotateChildPods(
kubectl,
resource.type,
Expand Down

0 comments on commit aeeea27

Please sign in to comment.