Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tsv2013 committed Jun 7, 2024
2 parents 75fa516 + 95df83d commit ec76b20
Show file tree
Hide file tree
Showing 4 changed files with 312 additions and 62 deletions.
96 changes: 96 additions & 0 deletions build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -779,3 +779,99 @@ jobs:
PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/"
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"
140 changes: 80 additions & 60 deletions devops-pull-requests-parallel-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,66 +303,86 @@ jobs:
npm run testcafe:ci:vue3
displayName: "run functional tests"
# - job: JqueryUIPreact
# steps:
# - checkout: self
# persistCredentials: true
# clean: true

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

# - task: CopyFiles@2
# inputs:
# SourceFolder: "$(Build.SourcesDirectory)/"
# 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)/node_modules
# cacheHitVar: NPM_CACHE_RESTORED
# displayName: Cache NPMs

# - task: Npm@1
# displayName: 'NPM install'
# inputs:
# command: install
# verbose: false
# 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_prod"

# - script: |
# npm run test:postcss
# displayName: "check postcss compatibility"

# - script: |
# npm run testsingle
# displayName: "run unit tests"

# - script: |
# npm run lint
# displayName: "eslint check"
- 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

# - script: |
# npm run test:jquery-ui:single
# displayName: "run markup tests"
# 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)"

# - script: |
# npm run testcafe:jquery-ui
# displayName: "run functional tests"
- 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: |
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: |
cd $(Build.SourcesDirectory)/survey-library
npm run testcafe:jquery-ui:ci
displayName: "run functional tests"
69 changes: 68 additions & 1 deletion devops-visual-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -370,4 +370,71 @@ jobs:
ArtifactName: 'Library_Vue3_VRT'
publishLocation: 'Container'
condition: always()
displayName: 'publish vrt artifacts'
displayName: 'publish vrt artifacts'

- job: JqueryUI
steps:
- checkout: self

- task: PowerShell@2
displayName: 'update Google Chrome to latest'
inputs:
targetType: 'inline'
script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer'

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

- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/"
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)/node_modules
cacheHitVar: NPM_CACHE_RESTORED
displayName: Cache NPM

- task: Npm@1
displayName: 'NPM install'
inputs:
command: install
verbose: false
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 vrt:jquery-ui:ci
displayName: "Visual Regression Tests"
- task: CopyFiles@2
inputs:
SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_JqueryUI_VRT'
OverWrite: true
condition: always()
displayName: 'copy vrt artifacts'

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_JqueryUI_VRT/'
ArtifactName: 'Library_JqueryUI_VRT'
publishLocation: 'Container'
condition: always()
displayName: 'publish vrt artifacts'
69 changes: 68 additions & 1 deletion visual-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,71 @@ jobs:
ArtifactName: 'Library_Vue3_VRT'
publishLocation: 'Container'
condition: always()
displayName: 'publish vrt artifacts'
displayName: 'publish vrt artifacts'

- job: JqueryUI
steps:
- checkout: self

- task: PowerShell@2
displayName: 'update Google Chrome to latest'
inputs:
targetType: 'inline'
script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer'

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

- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/"
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)/node_modules
cacheHitVar: NPM_CACHE_RESTORED
displayName: Cache NPM

- task: Npm@1
displayName: 'NPM install'
inputs:
command: install
verbose: false
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 vrt:jquery-ui:ci
displayName: "Visual Regression Tests"
- task: CopyFiles@2
inputs:
SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_JqueryUI_VRT'
OverWrite: true
condition: always()
displayName: 'copy vrt artifacts'

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_JqueryUI_VRT/'
ArtifactName: 'Library_JqueryUI_VRT'
publishLocation: 'Container'
condition: always()
displayName: 'publish vrt artifacts'

0 comments on commit ec76b20

Please sign in to comment.