Skip to content

Commit

Permalink
Update build-packages.yml for Azure Pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
tsv2013 committed Jul 24, 2024
1 parent 053c3ab commit b0a7510
Showing 1 changed file with 95 additions and 99 deletions.
194 changes: 95 additions & 99 deletions build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ jobs:
workingDir: $(Build.SourcesDirectory)/survey-library
condition: ne(variables.NPM_CACHE_RESTORED, 'true')


- job: CoreAngularJquery
dependsOn:
- NPMCache
Expand Down Expand Up @@ -217,7 +216,6 @@ jobs:
ArtifactName: "SurveyJSLibraryBuildCoreAngularJquery"
publishLocation: "Container"


- job: Knockout
dependsOn:
- NPMCache
Expand Down Expand Up @@ -338,7 +336,6 @@ jobs:
ArtifactName: "SurveyJSLibraryBuildKnockout"
publishLocation: "Container"


- job: React
dependsOn:
- NPMCache
Expand Down Expand Up @@ -441,7 +438,6 @@ jobs:
ArtifactName: "SurveyJSLibraryBuildReact"
publishLocation: "Container"


- job: Vue
dependsOn:
- NPMCache
Expand Down Expand Up @@ -780,101 +776,101 @@ jobs:
ArtifactName: "SurveyJSLibraryBuildVue3"
publishLocation: "Container"

- job: JqueryUI
dependsOn:
- NPMCache

steps:
- checkout: self
- checkout: EmptyRepo
persistCredentials: true
clean: true

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

- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-library/"
Contents: "package.json"
TargetFolder: "$(Build.SourcesDirectory)/Temp/"
OverWrite: true
displayName: "Copy package.json for cache key"
- task: Cache@2
inputs:
key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json'
path: $(Build.SourcesDirectory)/survey-library/node_modules
cacheHitVar: NPM_CACHE_RESTORED
displayName: Cache NPM

# setup next release version
- task: DownloadBuildArtifacts@0
inputs:
buildType: "specific"
project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f"
pipeline: "47"
buildVersionToDownload: "latest"
downloadType: "single"
artifactName: "ReleaseVersionFile"
downloadPath: "$(System.ArtifactsDirectory)"

- task: CopyFiles@2
inputs:
SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/"
Contents: "version.txt"
TargetFolder: "$(Build.SourcesDirectory)/"
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"
##########################################################################

- task: Npm@1
displayName: 'NPM install'
inputs:
command: install
verbose: false
workingDir: $(Build.SourcesDirectory)/survey-library
condition: ne(variables.NPM_CACHE_RESTORED, 'true')

- script: |
cd $(Build.SourcesDirectory)/survey-library
npm run release -- --release-as $(SurveyJSVersion)
git status
displayName: "npm run release"
- script: |
cd $(Build.SourcesDirectory)/survey-library
npm run build_core
npm run build_i18n
npm run build-plugins
displayName: "Build Core"
- script: |
cd $(Build.SourcesDirectory)/survey-library
npm run build_jquery_ui
displayName: "Build jquery-ui"
- script: |
cd $(Build.SourcesDirectory)/survey-library
npm run testcafe:jquery-ui:ci
displayName: "run functional tests"
- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-jquery-ui"
TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-jquery-ui"

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/"
ArtifactName: "SurveyJSLibraryBuildJQueryUI"
publishLocation: "Container"
# - job: JqueryUI
# dependsOn:
# - NPMCache

# steps:
# - checkout: self
# - checkout: EmptyRepo
# persistCredentials: true
# clean: true

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

# - task: CopyFiles@2
# inputs:
# SourceFolder: "$(Build.SourcesDirectory)/survey-library/"
# Contents: "package.json"
# TargetFolder: "$(Build.SourcesDirectory)/Temp/"
# OverWrite: true
# displayName: "Copy package.json for cache key"
# - task: Cache@2
# inputs:
# key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json'
# path: $(Build.SourcesDirectory)/survey-library/node_modules
# cacheHitVar: NPM_CACHE_RESTORED
# displayName: Cache NPM

# # setup next release version
# - task: DownloadBuildArtifacts@0
# inputs:
# buildType: "specific"
# project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f"
# pipeline: "47"
# buildVersionToDownload: "latest"
# downloadType: "single"
# artifactName: "ReleaseVersionFile"
# downloadPath: "$(System.ArtifactsDirectory)"

# - task: CopyFiles@2
# inputs:
# SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/"
# Contents: "version.txt"
# TargetFolder: "$(Build.SourcesDirectory)/"
# 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"
# ##########################################################################

# - task: Npm@1
# displayName: 'NPM install'
# inputs:
# command: install
# verbose: false
# workingDir: $(Build.SourcesDirectory)/survey-library
# condition: ne(variables.NPM_CACHE_RESTORED, 'true')

# - script: |
# cd $(Build.SourcesDirectory)/survey-library
# npm run release -- --release-as $(SurveyJSVersion)
# git status
# displayName: "npm run release"

# - script: |
# cd $(Build.SourcesDirectory)/survey-library
# npm run build_core
# npm run build_i18n
# npm run build-plugins
# displayName: "Build Core"

# - script: |
# cd $(Build.SourcesDirectory)/survey-library
# npm run build_jquery_ui
# displayName: "Build jquery-ui"

# - script: |
# cd $(Build.SourcesDirectory)/survey-library
# npm run testcafe:jquery-ui:ci
# displayName: "run functional tests"

# - task: CopyFiles@2
# inputs:
# SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-jquery-ui"
# TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-jquery-ui"

# - task: PublishBuildArtifacts@1
# inputs:
# PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/"
# ArtifactName: "SurveyJSLibraryBuildJQueryUI"
# publishLocation: "Container"

- job: SurveyUI
dependsOn:
Expand Down

0 comments on commit b0a7510

Please sign in to comment.