From f3ead36358ac8d6f9a7903f506986f53f2c5691d Mon Sep 17 00:00:00 2001 From: rstratkov Date: Thu, 10 Apr 2025 15:26:02 +0300 Subject: [PATCH 1/2] Initial PR adding azure pipeline --- wc-grid-examples-react.yml | 163 +++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 wc-grid-examples-react.yml diff --git a/wc-grid-examples-react.yml b/wc-grid-examples-react.yml new file mode 100644 index 0000000..fe0a266 --- /dev/null +++ b/wc-grid-examples-react.yml @@ -0,0 +1,163 @@ +trigger: + branches: + include: + - vnext + - master + +# This pipeline is meant to build specific branches for deployment. It's not meant to be a part of PR validation. +pr: none + +parameters: +- name: isVerbose + displayName: 'Get verbose output from steps - where configurable' + type: boolean + default: false +- name: shouldCleanPostExecution + displayName: 'Clean all pipeline dirs after the pipeline finishes?' + type: boolean + default: true + + +name: $(Year:yyyy).$(Month).$(DayOfMonth)-r$(Rev:.r) + +stages: +- stage: Build + pool: + vmImage: ubuntu-latest + + demands: npm + jobs: + - job: BuildSamples + steps: + - checkout: 'self' + clean: true + + - task: NodeTool@0 + displayName: 'Install Node' + inputs: + versionSource: 'spec' + versionSpec: '18.x' + + - task: Bash@3 + displayName: 'Create download artifact per sample (Shell)' + inputs: + targetType: 'inline' + script: | + # Define the root path where projects are located + rootPath="$(Build.SourcesDirectory)/projects" + + # Get all first-level subdirectories in the specified root path + subdirectories=$(find "$rootPath" -mindepth 1 -maxdepth 1 -type d) + + for subdirectory in $subdirectories; do + # Extract the directory name from the path + dirName=$(basename "$subdirectory") + + # Give each sample a version in its package.json file - for traceability + cd "$subdirectory" + echo "Calling npm version command" + npm version $(Build.BuildNumber) --no-git-tag-version + + # Check if the directory name is already camel-case + if [[ "$dirName" =~ ^[A-Z]+[a-z]+([A-Z][a-z]*)*$ ]]; then + # If already camel-case, print it as is + echo "$dirName" + else + # Convert to camel-case (capitalize first letters and remove hyphens) + dirName=$(echo "$dirName" | sed -E 's/(^|-)([a-z])/\U\2/g') + + fi + + echo "Processing directory: $dirName" + + # Define the name for the zip file + zipName="$(Build.ArtifactStagingDirectory)/IgniteUI_Grid_Demos_React_${dirName}_Source.zip" + echo "Creating ZIP: $zipName" + + # Compress the directory into a ZIP file + (cd "$subdirectory" && zip -r "$zipName" .) + done + + echo "All sample projects have been compressed and saved to the artifacts directory." + + - task: PublishPipelineArtifact@1 + displayName: 'Publish Samples Sources zips' + inputs: + targetPath: '$(Build.ArtifactStagingDirectory)' + artifact: 'samplesSourcesZips' + publishLocation: 'pipeline' + + - task: Npm@1 + displayName: 'Register licensed npm registry in .npmrc' + inputs: + verbose: ${{ parameters.isVerbose }} + command: 'custom' + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/' + customEndpoint: 'public proget' + + - task: npmAuthenticate@0 + displayName: '[IG Production ProGet] npm authenticate' + inputs: + workingFile: '$(Build.SourcesDirectory)/.npmrc' + customEndpoint: 'public proget' + + - task: Npm@1 + displayName: 'npm install --legacy-peer-deps' + inputs: + verbose: ${{ parameters.isVerbose }} + command: custom + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'install --legacy-peer-deps' + customEndpoint: 'public proget' + + - task: Npm@1 + displayName: 'Install Ignite UI CLI globally' + inputs: + verbose: ${{ parameters.isVerbose }} + command: custom + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'install -g igniteui-cli' + + - task: Bash@3 + displayName: 'Run Ignite UI Upgrade in Root and All Project Subdirectories' + inputs: + targetType: 'inline' + script: | + echo "Running Ignite UI package upgrade at root level..." + npx ig upgrade-packages --skip-install + + echo "Running Ignite UI package upgrade in all project subdirectories..." + for dir in $(Build.SourcesDirectory)/projects/*/; do + if [ -d "$dir" ]; then + echo "Processing: $dir" + (cd "$dir" && npx ig upgrade-packages --skip-install) + fi + done + + - task: Npm@1 + displayName: 'npm install --legacy-peer-deps' + inputs: + verbose: ${{ parameters.isVerbose }} + command: custom + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'install --legacy-peer-deps' + + - task: Npm@1 + displayName: 'npm run build' + inputs: + verbose: ${{ parameters.isVerbose }} + command: custom + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'run build' + + - task: PublishPipelineArtifact@1 + displayName: 'Publish app' + inputs: + targetPath: '$(Build.SourcesDirectory)/dist' + artifact: 'dist.grid-demos-react' + publishLocation: 'pipeline' + + - ${{ if eq(parameters.shouldCleanPostExecution, true) }}: + - task: PostBuildCleanup@4 + From 3ea732bcd7ff474ec3c6e91261c3366409b74132 Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Thu, 10 Apr 2025 16:02:58 +0300 Subject: [PATCH 2/2] Remove trial to license for now --- wc-grid-examples-react.yml | 46 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/wc-grid-examples-react.yml b/wc-grid-examples-react.yml index fe0a266..8343c36 100644 --- a/wc-grid-examples-react.yml +++ b/wc-grid-examples-react.yml @@ -111,29 +111,29 @@ stages: customCommand: 'install --legacy-peer-deps' customEndpoint: 'public proget' - - task: Npm@1 - displayName: 'Install Ignite UI CLI globally' - inputs: - verbose: ${{ parameters.isVerbose }} - command: custom - workingDir: '$(Build.SourcesDirectory)' - customCommand: 'install -g igniteui-cli' - - - task: Bash@3 - displayName: 'Run Ignite UI Upgrade in Root and All Project Subdirectories' - inputs: - targetType: 'inline' - script: | - echo "Running Ignite UI package upgrade at root level..." - npx ig upgrade-packages --skip-install - - echo "Running Ignite UI package upgrade in all project subdirectories..." - for dir in $(Build.SourcesDirectory)/projects/*/; do - if [ -d "$dir" ]; then - echo "Processing: $dir" - (cd "$dir" && npx ig upgrade-packages --skip-install) - fi - done + # - task: Npm@1 + # displayName: 'Install Ignite UI CLI globally' + # inputs: + # verbose: ${{ parameters.isVerbose }} + # command: custom + # workingDir: '$(Build.SourcesDirectory)' + # customCommand: 'install -g igniteui-cli' + + # - task: Bash@3 + # displayName: 'Run Ignite UI Upgrade in Root and All Project Subdirectories' + # inputs: + # targetType: 'inline' + # script: | + # echo "Running Ignite UI package upgrade at root level..." + # npx ig upgrade-packages --skip-install + + # echo "Running Ignite UI package upgrade in all project subdirectories..." + # for dir in $(Build.SourcesDirectory)/projects/*/; do + # if [ -d "$dir" ]; then + # echo "Processing: $dir" + # (cd "$dir" && npx ig upgrade-packages --skip-install) + # fi + # done - task: Npm@1 displayName: 'npm install --legacy-peer-deps'