From e43272030969f3245855614fbb741e06e13ae543 Mon Sep 17 00:00:00 2001 From: Michael Zhen <112977307+zhenmichael@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:44:25 -0700 Subject: [PATCH] (docs): update force deployment condition for build docs (#22954) previous shouldDeploy condition have not been included in deployment condition. This variable has been updated to "forceDeployment" and included back in the deployment condition. shouldDeploy has been updated to check if release builds are the latest version in its major version series. --- tools/pipelines/build-docs.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tools/pipelines/build-docs.yml b/tools/pipelines/build-docs.yml index 11d860bfd1a..11279b6cb1a 100644 --- a/tools/pipelines/build-docs.yml +++ b/tools/pipelines/build-docs.yml @@ -64,18 +64,11 @@ variables: value: true - name: isMain value: ${{ eq(variables['Build.SourceBranchName'], 'main') }} - - name: shouldDeploy - value: ${{ or( - eq(parameters.deployOverride, 'force'), - and(eq(variables.isMain, true), eq(parameters.deployOverride, 'default')) - )}} - name: shouldRetainGuardianAssets value: ${{ or( eq(parameters.guardianAssetRetentionOverride, 'force'), and(eq(variables.isMain, true), eq(parameters.guardianAssetRetentionOverride, 'default')) )}} - - name: arrow.releasedtoproduction - value: eq(variables.shouldDeploy, true) - name: deploymentToken ${{ if eq( parameters['deployEnvironment'], 'new' ) }}: value: "$(FLUID_WEBSITE_TORUS_API_TOKEN)" @@ -121,7 +114,6 @@ stages: echo latestPipeline ${{ variables.latestPipeline }} echo n1Pipeline ${{ variables.n1Pipeline }} echo repoToTrigger ${{ variables.repoToTrigger }} - echo shouldDeploy ${{ variables.shouldDeploy }} echo shouldRetainGuardianAssets ${{ variables.shouldRetainGuardianAssets }} echo publishGuardianBaselines ${{ variables.publishGuardianBaselines }} displayName: Show Variables @@ -339,7 +331,12 @@ stages: displayName: 'Deploy website' pool: Small dependsOn: ['build', 'guardian', 'check_branch_version'] - condition: eq(dependencies.check_branch_version.outputs['check_branch_version.SetShouldDeploy.shouldDeploy'], 'true') + condition: and( + not(eq(parameters.deployOverride, 'skip')), + or( + eq(dependencies.check_branch_version.outputs['check_branch_version.SetShouldDeploy.shouldDeploy'], 'true'), + eq(parameters.deployOverride, 'force') + )) jobs: - job: deploy_site displayName: 'Deploy website' @@ -357,7 +354,6 @@ stages: - task: AzureStaticWebApp@0 displayName: 'Deploy website to ASWA' - condition: eq(variables.shouldDeploy, true) inputs: skip_app_build: true # site was built in previous stage skip_api_build: true # api is written in js, no build needed