diff --git a/legacy-pipelines/build-packages.yml b/legacy-pipelines/build-packages.yml deleted file mode 100644 index 0daae042d2..0000000000 --- a/legacy-pipelines/build-packages.yml +++ /dev/null @@ -1,1302 +0,0 @@ -# Node.js -# Build a general Node.js project with npm. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - -resources: - repositories: - - repository: Service - type: github - endpoint: dmitrykurmanov:admin - name: surveyjs/service - - repository: EmptyRepo - type: github - endpoint: dmitrykurmanov:admin - name: surveyjs/azure-pipelines-repo-dont-remove-please - - -trigger: - batch: true - branches: - include: - - legacy/1.12.15 - tags: - exclude: - - v*.*.* - -pool: - vmImage: 'Ubuntu-20.04' - -jobs: - -- job: CreatorV1 - - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-creator-v1 | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - powershell: | - $env:GIT_REDIRECT_STDERR = '2>&1' - git config --global user.email "kurmanov.work@gmail.com" - git config --global user.name "dmitrykurmanov" - displayName: 'Set up git config' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildKnockout' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: Npm@1 - displayName: 'NPM install survey-creator v1' - inputs: - command: custom - customCommand: install --legacy-peer-deps - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator - npx puppeteer browsers install chrome - displayName: "install chrome" - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildKnockout/packages/survey-knockout' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator/node_modules/survey-knockout' - OverWrite: true - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildKnockout/' - 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' - - - powershell: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator - npm run release -- --release-as $(SurveyJSVersion) - displayName: 'Release specific version survey-creator' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '99' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSWidgetsBuild' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSWidgetsBuild/packages/survey-widgets' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator/node_modules/surveyjs-widgets' - OverWrite: true - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator - npm run build_prod - displayName: 'Build prod' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator - npm run test_ci - displayName: 'Unit tests' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator - npm run testcafe_ci - displayName: 'Functional tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator/build' - targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSCreatorBuild/build - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/SurveyJSCreatorBuild/' - ArtifactName: 'SurveyJSCreatorBuild' - publishLocation: 'Container' - - -- job: CreatorV2Core - steps: - - checkout: self - - checkout: Service - persistCredentials: true - clean: true - fetchDepth: 1 - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-creator-core | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM Core - - - powershell: | - $env:GIT_REDIRECT_STDERR = '2>&1' - git config --global user.email "kurmanov.work@gmail.com" - git config --global user.name "dmitrykurmanov" - displayName: 'Set up git config' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: Npm@1 - displayName: 'Npm install survey-creator-core' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - # update 'file' npm dependencies in case of cache - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/node_modules - rm -rf survey-core - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'remove survey-core symlink from node_modules' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(Build.SourcesDirectory)/survey-library/build/survey-core - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/node_modules/survey-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-core in case of npm cache' - # EO update 'file' npm dependencies in case of cache - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - npm run remove-package-lock - displayName: 'npm run remove-package-lock' - -# set release specific version - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/' - 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' - - - powershell: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - npm run release -- --release-as $(SurveyJSVersion) - displayName: 'Release specific version survey-creator-core' -# EO set release specific version - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - npm run build:themes - npm run build:i18n - npm run build - displayName: 'Build Creator V2 Core' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - npm run test - displayName: 'Unit tests CreatorV2 Core' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - npm run test:postcss - displayName: 'check postcss compatibility' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-core - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-core' - ArtifactName: 'SurveyJSCreatorV2BuildCore' - publishLocation: 'Container' - displayName: 'publish artifact SurveyJSCreatorV2BuildCore for release' - - # - task: CopyFiles@2 - # inputs: - # SourceFolder: "$(Build.SourcesDirectory)/Temp/" - # Contents: "package.json" - # TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-core" - # OverWrite: true - # displayName: "Copy package.json from temp to next jobs buld to avoid problem with npm survey-core version" - - # TODO change to Azure File Transform task see the commented tast below - # TODO also see https://stackoverflow.com/questions/71849470/azure-pipeline-replace-json-key-value-during-build-process - - script: | - cd $(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-core - sed -i 's/"survey-core": .*"/"survey-core": "..\/..\/..\/..\/survey-library\/build\/survey-core"/g' package.json - displayName: 'Change survey-core dependency version from release next ver to local dependency' - # - task: FileTransform@1 - # inputs: - # folderPath: '$(System.DefaultWorkingDirectory)/**/*.zip' - # fileType: 'json' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-core' - ArtifactName: 'SurveyJSCreatorV2BuildCore-$(Build.BuildId)' - publishLocation: 'Container' - displayName: 'publish artifact SurveyJSCreatorV2BuildCore-$(Build.BuildId) for next jobs' - - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: Cobertura # or JaCoCo - summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/*coverage.xml' - reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage' - - # - task: CopyFiles@2 - # inputs: - # SourceFolder: '$(Build.SourcesDirectory)/survey-creator/docs' - # TargetFolder: '$(Build.SourcesDirectory)/service/surveyjs.io/App_Data/DocsEditor' - # CleanTargetFolder: true - # displayName: 'Copy root docs to the local surveyjs/service repo' - -- job: CreatorV2React - dependsOn: CreatorV2Core - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-creator-react | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - powershell: | - $env:GIT_REDIRECT_STDERR = '2>&1' - git config --global user.email "kurmanov.work@gmail.com" - git config --global user.name "dmitrykurmanov" - displayName: 'Set up git config' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildReact' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'SurveyJSCreatorV2BuildCore-$(Build.BuildId)' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildReact/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - script: | - cd $(Build.SourcesDirectory)/survey-library/build/survey-react-ui - sed -i 's/"survey-core": .*"/"survey-core": "latest"/g' package.json - displayName: 'Change survey-core dependency version from release next ver to local dependency' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - - # - script: | - # cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - # npm install - # npm run remove-package-lock - # displayName: 'Npm install survey-creator-core' - - # - script: | - # cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - # npm run build - # displayName: 'Build creator v2 core' - - # - script: | - # cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - # npm run test - # displayName: 'Unit tests CreatorV2 Core' - - - task: Npm@1 - displayName: 'Npm install survey-creator-react' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npx puppeteer browsers install chrome - displayName: "install chrome" - - # update 'file' npm dependencies in case of cache - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules - rm -rf survey-core survey-react-ui @survey - mkdir -p @survey/creator - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'remove symlinks from node_modules' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/survey-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-core in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(Build.SourcesDirectory)/survey-library/build/survey-react-ui - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/survey-react-ui' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-react-ui in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/survey-creator-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-creator-core in case of npm cache' - # EO update 'file' npm dependencies in case of cache - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npm run remove-package-lock - displayName: 'npm run remove-package-lock' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/survey-core' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildReact/packages/survey-react-ui' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/survey-react-ui' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/@types' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/node_modules/@types' - OverWrite: true - displayName: 'copy @types into library directory' - -# set release specific version - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/' - 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' - - - powershell: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npm run release -- --release-as $(SurveyJSVersion) - displayName: 'Release specific version survey-creator-react' -# EO set release specific version - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npm run build - displayName: 'Build CreatorV2 React' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npm run test - displayName: 'Unit test CreatorV2 React' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npm run testcafe:ci - displayName: 'Functional test CreatorV2 React' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npm run testcafe:a11y:ci - displayName: 'A11Y Functional test CreatorV2 React' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/build' - targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-react - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-react' - ArtifactName: 'SurveyJSCreatorV2BuildReact' - publishLocation: 'Container' - - -- job: CreatorV2Knockout - dependsOn: CreatorV2Core - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-creator-knockout | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - powershell: | - $env:GIT_REDIRECT_STDERR = '2>&1' - git config --global user.email "kurmanov.work@gmail.com" - git config --global user.name "dmitrykurmanov" - displayName: 'Set up git config' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildKnockout' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'SurveyJSCreatorV2BuildCore-$(Build.BuildId)' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildKnockout/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - script: | - cd $(Build.SourcesDirectory)/survey-library/build/survey-knockout-ui - sed -i 's/"survey-core": .*"/"survey-core": "latest"/g' package.json - displayName: 'Change survey-core dependency version from release next ver to local dependency' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - - # - script: | - # cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - # npm install - # npm run remove-package-lock - # displayName: 'Npm install survey-creator-core' - - # - script: | - # cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - # npm run build - # displayName: 'Build creator v2 core' - - # - script: | - # cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - # npm run test - # displayName: 'Unit tests CreatorV2 Core' - - - task: Npm@1 - displayName: 'Npm install survey-creator-knockout' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - npx puppeteer browsers install chrome - displayName: "install chrome" - - # update 'file' npm dependencies in case of cache - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules - rm -rf survey-core survey-knockout-ui @survey - mkdir -p @survey/creator - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'remove symlinks from node_modules' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/survey-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-core in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(Build.SourcesDirectory)/survey-library/build/survey-knockout-ui - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/survey-knockout-ui' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-knockout-ui in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/survey-creator-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-creator-core in case of npm cache' - # EO update 'file' npm dependencies in case of cache - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - npm run remove-package-lock - displayName: 'npm run remove-package-lock' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/survey-core' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildKnockout/packages/survey-knockout-ui' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/survey-knockout-ui' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/knockout' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/survey-knockout-ui/node_modules/knockout' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy knockout from node_modules for survey-knockout-ui' - -# set release specific version - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/' - 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' - - - powershell: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - npm run release -- --release-as $(SurveyJSVersion) - displayName: 'Release specific version survey-creator-knockout' -# EO set release specific version - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - npm run build - displayName: 'Build CreatorV2 Knockout' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - npm run test - displayName: 'Unit test CreatorV2 Knockout' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - npm run testcafe:ci - displayName: 'Functional test CreatorV2 Knockout' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - npm run testcafe:a11y:ci - displayName: 'A11Y Functional test CreatorV2 Knockout' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/build' - targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-knockout - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-knockout' - ArtifactName: 'SurveyJSCreatorV2BuildKnockout' - publishLocation: 'Container' - - -- job: CreatorV2Angular - dependsOn: CreatorV2Core - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - powershell: | - $env:GIT_REDIRECT_STDERR = '2>&1' - git config --global user.email "kurmanov.work@gmail.com" - git config --global user.name "dmitrykurmanov" - displayName: 'Set up git config' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildAngular' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'SurveyJSCreatorV2BuildCore-$(Build.BuildId)' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildAngular/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npm i - rm node_modules/survey-angular-ui - displayName: 'npm install' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npx puppeteer browsers install chrome - displayName: "install chrome" - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildAngular/packages/survey-angular-ui' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular/node_modules/survey-angular-ui' - OverWrite: true - displayName: 'copy survey-angular-ui in node_modules' - -# set release specific version - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/' - 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' - - - powershell: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npm run release -- --release-as $(SurveyJSVersion) - displayName: 'Release specific version survey-creator-angular' -# EO set release specific version - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npm run build - displayName: 'Build CreatorV2 Angular' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npm run test:single - displayName: 'Unit test CreatorV2 Angular' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular/example/angular-ui - npm i - displayName: 'npm install in example project' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npm run build:example - displayName: 'build example' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npm run testcafe:ci - displayName: 'Functional test CreatorV2 Angular' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular/build' - targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-angular - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-angular' - ArtifactName: 'SurveyJSCreatorV2BuildAngular' - publishLocation: 'Container' - - -- job: CreatorV2Vue - dependsOn: CreatorV2Core - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - powershell: | - $env:GIT_REDIRECT_STDERR = '2>&1' - git config --global user.email "kurmanov.work@gmail.com" - git config --global user.name "dmitrykurmanov" - displayName: 'Set up git config' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildVue3' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'SurveyJSCreatorV2BuildCore-$(Build.BuildId)' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildVue3/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npm i - rm node_modules/survey-vue3-ui - displayName: 'npm install' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npm run remove-package-lock - displayName: 'npm run remove-package-lock' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildVue3/packages/survey-vue3-ui' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue/node_modules/survey-vue3-ui' - OverWrite: true - displayName: 'copy survey-vue3-ui in node_modules' - -# set release specific version - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/' - 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' - - - powershell: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npm run release -- --release-as $(SurveyJSVersion) - displayName: 'Release specific version survey-creator-vue' -# EO set release specific version - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npm run build - displayName: 'Build CreatorV2 Vue' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue/example - npm i - displayName: 'npm install in example project' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npm run build:example:prod - displayName: 'build example' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npm run testcafe:ci - displayName: 'Functional test CreatorV2 Vue' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue/build' - targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-vue - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-vue' - ArtifactName: 'SurveyJSCreatorV2BuildVue' - publishLocation: 'Container' - -- job: CreatorV2JS - dependsOn: CreatorV2Core - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-creator-js-ui | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - powershell: | - $env:GIT_REDIRECT_STDERR = '2>&1' - git config --global user.email "kurmanov.work@gmail.com" - git config --global user.name "dmitrykurmanov" - displayName: 'Set up git config' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildSurveyUI' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'SurveyJSCreatorV2BuildCore-$(Build.BuildId)' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildSurveyUI/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - script: | - cd $(Build.SourcesDirectory)/survey-library/build/survey-js-ui - sed -i 's/"survey-core": .*"/"survey-core": "latest"/g' package.json - displayName: 'Change survey-core dependency version from release next ver to local dependency' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - - # - script: | - # cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - # npm install - # npm run remove-package-lock - # displayName: 'Npm install survey-creator-core' - - # - script: | - # cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - # npm run build - # displayName: 'Build creator v2 core' - - # - script: | - # cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - # npm run test - # displayName: 'Unit tests CreatorV2 Core' - - - task: Npm@1 - displayName: 'Npm install survey-creator-js' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - npx puppeteer browsers install chrome - displayName: "install chrome" - - # update 'file' npm dependencies in case of cache - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules - rm -rf survey-core survey-js-ui @survey - mkdir -p @survey/creator - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'remove symlinks from node_modules' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/survey-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-core in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(Build.SourcesDirectory)/survey-library/build/survey-js-ui - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/survey-js-ui' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-js-ui in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2BuildCore-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/survey-creator-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-creator-core in case of npm cache' - # EO update 'file' npm dependencies in case of cache - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - npm run remove-package-lock - displayName: 'npm run remove-package-lock' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/survey-core' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildSurveyUI/packages/survey-js-ui' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/survey-js-ui' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/@types' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/node_modules/@types' - OverWrite: true - displayName: 'copy @types into library directory' - -# set release specific version - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/' - 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' - - - powershell: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - npm run release -- --release-as $(SurveyJSVersion) - displayName: 'Release specific version survey-creator-js' -# EO set release specific version - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - npm run build - displayName: 'Build CreatorV2 JS' - -# - script: | -# cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js -# npm run test -# displayName: 'Unit test CreatorV2 JS' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - npm run testcafe:ci - displayName: 'Functional test CreatorV2 JS' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - npm run testcafe:a11y:ci - displayName: 'A11Y Functional test CreatorV2 JS' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/build' - targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-js - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-js' - ArtifactName: 'SurveyJSCreatorV2BuildJS' - publishLocation: 'Container' \ No newline at end of file diff --git a/legacy-pipelines/visual-regression-tests.yml b/legacy-pipelines/visual-regression-tests.yml deleted file mode 100644 index 92a3860c15..0000000000 --- a/legacy-pipelines/visual-regression-tests.yml +++ /dev/null @@ -1,1023 +0,0 @@ -# Node.js -# Build a general Node.js project with npm. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - -resources: - repositories: - - repository: EmptyRepo - type: github - endpoint: dmitrykurmanov:admin - name: surveyjs/azure-pipelines-repo-dont-remove-please - -trigger: - batch: true - branches: - include: - - legacy/1.12.15 - tags: - exclude: - - v*.*.* - -pool: - vmImage: 'windows-latest' - -jobs: - -- job: CreatorV2Core - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-creator-core | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM Core - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: Npm@1 - displayName: 'Npm install survey-creator-core' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - # update 'file' npm dependencies in case of cache - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/node_modules - rm -rf survey-core - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'remove survey-core symlink from node_modules' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(Build.SourcesDirectory)/survey-library/build/survey-core - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/node_modules/survey-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-core in case of npm cache' - # EO update 'file' npm dependencies in case of cache - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - npm run remove-package-lock - displayName: 'npm run remove-package-lock' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - npm run build:themes - displayName: 'Build Creator V2 Core themes' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - npm run build:i18n - displayName: 'Build Creator V2 Core i18n' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core - npm run build - displayName: 'Build Creator V2 Core' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-core - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/SurveyJSCreatorV2Build/build/survey-creator-core' - ArtifactName: 'SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId)' - publishLocation: 'Container' - - -- job: CreatorV2React - dependsOn: CreatorV2Core - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - 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: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/react/" - OverWrite: true - displayName: "Copy package.json for cache key (react)" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-creator/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/root/" - OverWrite: true - displayName: "Copy package.json for cache key (root)" - - - task: Cache@2 - inputs: - key: 'npm-cache-creator-react | $(Build.SourcesDirectory)/Temp/react/package.json' - path: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Cache@2 - inputs: - key: 'npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json' - path: $(Build.SourcesDirectory)/survey-creator/node_modules - cacheHitVar: NPM_CACHE_RESTORED_ROOT - displayName: Cache NPM - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildReact' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId)' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildReact/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - script: | - cd $(Build.SourcesDirectory)/survey-library/build/survey-react-ui - sed -i 's/"survey-core": .*"/"survey-core": "latest"/g' package.json - displayName: 'Change survey-core dependency version from release next ver to local dependency' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - - - task: Npm@1 - displayName: 'Npm install root' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-creator - condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-creator - npm run lint - displayName: 'check lint' - - - task: Npm@1 - displayName: 'Npm install survey-creator-react' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npx puppeteer browsers install chrome - displayName: "install chrome" - - # update 'file' npm dependencies in case of cache - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/survey-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-core in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/survey-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-core in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(Build.SourcesDirectory)/survey-library/build/survey-react-ui - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/survey-react-ui' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-react-ui in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/survey-creator-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-creator-core in case of npm cache' - # EO update 'file' npm dependencies in case of cache - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npm run remove-package-lock - displayName: 'npm run remove-package-lock' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npm run remove-package-lock - displayName: 'npm run remove-package-lock' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/survey-core' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildReact/packages/survey-react-ui' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/survey-react-ui' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react/node_modules/@types' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/node_modules/@types' - OverWrite: true - displayName: 'copy @types into library directory' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npm run build - displayName: 'Build CreatorV2 React' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-react - npm run visual-regression-tests:ci - displayName: 'Visual Regression Tests CreatorV2 React' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Creator_React_VRT' - OverWrite: true - condition: always() - displayName: 'copy vrt react artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Creator_React_VRT/' - ArtifactName: 'Creator_React_VRT' - publishLocation: 'Container' - condition: always() - displayName: 'publish vrt react artifacts' - - -- job: CreatorV2Knockout - dependsOn: CreatorV2Core - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - 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: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-creator-knockout | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildKnockout' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId)' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildKnockout/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - script: | - cd $(Build.SourcesDirectory)/survey-library/build/survey-knockout-ui - sed -i 's/"survey-core": .*"/"survey-core": "latest"/g' package.json - displayName: 'Change survey-core dependency version from release next ver to local dependency' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator - npm install devextreme-screenshot-comparer -D - displayName: 'install devextreme-screenshot-comparer to root' - - - task: Npm@1 - displayName: 'Npm install survey-creator-knockout' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - npx puppeteer browsers install chrome - displayName: "install chrome" - - # update 'file' npm dependencies in case of cache - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/survey-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-core in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(Build.SourcesDirectory)/survey-library/build/survey-knockout-ui - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/survey-knockout-ui' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-knockout-ui in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/survey-creator-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-creator-core in case of npm cache' - # EO update 'file' npm dependencies in case of cache - - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - npm run remove-package-lock - displayName: 'npm run remove-package-lock' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/survey-core' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildKnockout/packages/survey-knockout-ui' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout/node_modules/survey-knockout-ui' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - npm run build - displayName: 'Build CreatorV2 Knockout' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-knockout - npm run visual-regression-tests:ci - displayName: 'Visual Regression Tests CreatorV2 Knockout' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Creator_KO_VRT' - OverWrite: true - condition: always() - displayName: 'copy vrt ko artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Creator_KO_VRT/' - ArtifactName: 'Creator_KO_VRT' - publishLocation: 'Container' - condition: always() - displayName: 'publish vrt ko artifacts' - - # ======================= CreatorV2Angular ======================= # - - -- job: CreatorV2Angular - dependsOn: CreatorV2Core - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - 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: '16.x' - displayName: 'Install Node.js' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildAngular' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId)' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildAngular/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator - npm install devextreme-screenshot-comparer -D - displayName: 'install devextreme-screenshot-comparer to root' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npm i - displayName: 'npm install' - - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - rmdir node_modules\survey-angular-ui - displayName: 'delete survey-angular-ui symlink' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildAngular/packages/survey-angular-ui' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular/node_modules/survey-angular-ui' - OverWrite: true - displayName: 'copy survey-angular-ui in node_modules' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npm run build - displayName: 'Build CreatorV2 Angular' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular/example/angular-ui - npm i - displayName: 'npm install in example project' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npm run build:example - displayName: 'build example' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-angular - npm run visual-regression-tests:ci - displayName: 'Visual Regression Tests CreatorV2 Angular' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Creator_Angular_VRT' - OverWrite: true - condition: always() - displayName: 'copy vrt angular artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Creator_Angular_VRT/' - ArtifactName: 'Creator_Angular_VRT' - publishLocation: 'Container' - condition: always() - displayName: 'publish vrt angular artifacts' - - -- job: CreatorV2Vue - dependsOn: CreatorV2Core - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - 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: '16.x' - displayName: 'Install Node.js' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildVue3' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId)' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildVue3/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator - npm install devextreme-screenshot-comparer -D - displayName: 'install devextreme-screenshot-comparer to root' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npm i - displayName: 'npm install' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - rmdir node_modules\survey-vue3-ui - displayName: 'delete survey-vue3-ui symlink' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildVue3/packages/survey-vue3-ui' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue/node_modules/survey-vue3-ui' - OverWrite: true - displayName: 'copy survey-vue3-ui in node_modules' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npm run build - displayName: 'Build CreatorV2 Vue' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue/example - npm i - displayName: 'npm install in example project' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npm run build:example:prod - displayName: 'build example' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-vue - npm run visual-regression-tests:ci - displayName: 'Visual Regression Tests CreatorV2 Vue' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Creator_Vue_VRT' - OverWrite: true - condition: always() - displayName: 'copy vrt vue artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Creator_Vue_VRT/' - ArtifactName: 'Creator_Vue_VRT' - publishLocation: 'Container' - condition: always() - displayName: 'publish vrt vue artifacts' - - -- job: CreatorV2JS - dependsOn: CreatorV2Core - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - 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: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/js-ui/" - OverWrite: true - displayName: "Copy package.json for cache key (js-ui)" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-creator/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/root/" - OverWrite: true - displayName: "Copy package.json for cache key (root)" - - - task: Cache@2 - inputs: - key: 'npm-cache-creator-js-ui | $(Build.SourcesDirectory)/Temp/js-ui/package.json' - path: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Cache@2 - inputs: - key: 'npm-cache-creator-root | $(Build.SourcesDirectory)/Temp/root/package.json' - path: $(Build.SourcesDirectory)/survey-creator/node_modules - cacheHitVar: NPM_CACHE_RESTORED_ROOT - displayName: Cache NPM - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildSurveyUI' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'specific' - project: '44ed9012-3b38-49f8-a488-0e764469a04f' - pipeline: '96' - specificBuildWithTriggering: true - buildVersionToDownload: 'latest' - downloadType: 'single' - artifactName: 'SurveyJSLibraryBuildCoreAngularJquery' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - task: DownloadBuildArtifacts@0 - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId)' - downloadPath: '$(System.ArtifactsDirectory)' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildSurveyUI/packages' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/build' - OverWrite: true - - - script: | - cd $(Build.SourcesDirectory)/survey-library/build/survey-js-ui - sed -i 's/"survey-core": .*"/"survey-core": "latest"/g' package.json - displayName: 'Change survey-core dependency version from release next ver to local dependency' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-core/build' - - - task: Npm@1 - displayName: 'Npm install root' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-creator - condition: ne(variables.NPM_CACHE_RESTORED_ROOT, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-creator - npm run lint - displayName: 'check lint' - - - task: Npm@1 - displayName: 'Npm install survey-creator-js' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - npx puppeteer browsers install chrome - displayName: "install chrome" - - # update 'file' npm dependencies in case of cache - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/survey-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-core in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/survey-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-core in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(Build.SourcesDirectory)/survey-library/build/survey-js-ui - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/survey-js-ui' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-js-ui in case of npm cache' - - - task: CopyFiles@2 - inputs: - SourceFolder: $(System.ArtifactsDirectory)/SurveyJSCreatorV2Build-VRT-Core-$(Build.BuildId) - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/survey-creator-core' - OverWrite: true - condition: ne(variables.NPM_CACHE_RESTORED, 'false') - displayName: 'copy survey-creator-core in case of npm cache' - # EO update 'file' npm dependencies in case of cache - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - npm run remove-package-lock - displayName: 'npm run remove-package-lock' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - npm run remove-package-lock - displayName: 'npm run remove-package-lock' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildCoreAngularJquery/packages/survey-core' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/survey-core' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(System.ArtifactsDirectory)/SurveyJSLibraryBuildSurveyUI/packages/survey-js-ui' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/survey-js-ui' - OverWrite: true - displayName: 'copy build from library for f-f tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js/node_modules/@types' - Contents: '**' - TargetFolder: '$(Build.SourcesDirectory)/survey-library/node_modules/@types' - OverWrite: true - displayName: 'copy @types into library directory' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - npm run build - displayName: 'Build CreatorV2 JS' - - - script: | - cd $(Build.SourcesDirectory)/survey-creator/packages/survey-creator-js - npm run visual-regression-tests:ci - displayName: 'Visual Regression Tests CreatorV2 JS' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/survey-creator/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Creator_JS_VRT' - OverWrite: true - condition: always() - displayName: 'copy vrt JS artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Creator_JS_VRT/' - ArtifactName: 'Creator_JS_VRT' - publishLocation: 'Container' - condition: always() - displayName: 'publish vrt JS artifacts'