Skip to content

Commit

Permalink
(docs): update force deployment condition for build docs (#22954)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zhenmichael authored Oct 31, 2024
1 parent 512e53f commit e432720
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tools/pipelines/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit e432720

Please sign in to comment.