Skip to content

Commit

Permalink
Update devops-pull-requests-parallel-jobs.yml for Azure Pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
tsv2013 committed Jul 10, 2024
1 parent 4b9b021 commit 6eb6fae
Showing 1 changed file with 43 additions and 27 deletions.
70 changes: 43 additions & 27 deletions devops-pull-requests-parallel-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,30 +328,52 @@ jobs:
cacheHitVar: NPM_CACHE_RESTORED
displayName: Cache NPM

# setup next release version
- task: DownloadBuildArtifacts@0
- task: Npm@1
displayName: 'NPM install'
inputs:
buildType: "specific"
project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f"
pipeline: "47"
buildVersionToDownload: "latest"
downloadType: "single"
artifactName: "ReleaseVersionFile"
downloadPath: "$(System.ArtifactsDirectory)"
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)
condition: ne(variables.NPM_CACHE_RESTORED, 'true')

- script: |
npm run build_core
npm run build_i18n
npm run build-plugins
displayName: "Build Core"
- script: |
npm run build_jquery_ui_prod
displayName: "Build jquery-ui"
- script: |
npm run testcafe:jquery-ui:ci
displayName: "run functional tests"
- job: SurveyUI
steps:
- checkout: self
persistCredentials: true
clean: true

- task: NodeTool@0
inputs:
versionSpec: "14.x"
displayName: "Install Node.js"

- task: CopyFiles@2
inputs:
SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/"
Contents: "version.txt"
TargetFolder: "$(Build.SourcesDirectory)/"
SourceFolder: "$(Build.SourcesDirectory)/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/"
OverWrite: true
displayName: "Copy Build Artifact - SurveyJSVersion File"

- powershell: |
$version = Get-Content $(Build.SourcesDirectory)/version.txt
Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version"
displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile"
##########################################################################
displayName: "Copy package.json for cache key"
- task: Cache@2
inputs:
key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json'
path: $(Build.SourcesDirectory)/node_modules
cacheHitVar: NPM_CACHE_RESTORED
displayName: Cache NPM

- task: Npm@1
displayName: 'NPM install'
Expand All @@ -361,23 +383,17 @@ jobs:
workingDir: $(Build.SourcesDirectory)
condition: ne(variables.NPM_CACHE_RESTORED, 'true')

- script: |
cd $(Build.SourcesDirectory)
npm run release -- --release-as $(SurveyJSVersion)
git status
displayName: "npm run release"
- script: |
npm run build_core
npm run build_i18n
npm run build-plugins
displayName: "Build Core"
- script: |
npm run build_jquery_ui_prod
npm run build_ui_prod
displayName: "Build jquery-ui"
- script: |
npm run testcafe:jquery-ui:ci
npm run testcafe:survey-ui:ci
displayName: "run functional tests"

0 comments on commit 6eb6fae

Please sign in to comment.