From f9e66165eddae8e02bff5423db1bc0a2c8ebb7e5 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Tue, 17 Dec 2024 16:35:47 +0200 Subject: [PATCH 01/43] Set up CI with Azure Pipelines [skip ci] --- azure-devops/azure-pipeline.yml | 130 ++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 azure-devops/azure-pipeline.yml diff --git a/azure-devops/azure-pipeline.yml b/azure-devops/azure-pipeline.yml new file mode 100644 index 0000000000..e90b5f6d47 --- /dev/null +++ b/azure-devops/azure-pipeline.yml @@ -0,0 +1,130 @@ +trigger: + branches: + include: + - master + - vnext + +# This pipeline is meant to build specific branches for deployment. It's not meant to be a part of PR validation. Ensure that this pipeline is reserved for deployment purposes. +pr: none + +name: $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) + +variables: + githubToken: # Add a GitHub token in Libraries + ReplacementText: '@infragistics/igniteui-angular-extras' + +jobs: +- job: CommonSteps + displayName: Common Steps for All Jobs + pool: + vmImage: ubuntu-latest + steps: + - checkout: self + clean: true + fetchTags: true + + - task: NodeTool@0 + displayName: Use Node 20.x + inputs: + versionSpec: 20.x + + - task: Npm@1 + displayName: npm cache clean + continueOnError: true + inputs: + command: custom + workingDir: $(Build.SourcesDirectory) + verbose: false + customCommand: cache clean --force + + - task: Npm@1 + displayName: npm cache verify + inputs: + command: custom + workingDir: $(Build.SourcesDirectory) + verbose: false + customCommand: cache verify + + - task: RegexReplace@3 + displayName: RegEx Find & Replace + inputs: + InputSearchPattern: | + projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts + projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts + projects/app-lob/src/app/app.module.ts + package.json + FindRegex: igniteui-angular-extras + ReplaceRegex: $(ReplacementText) + UseUTF8: false + + - task: Npm@1 + displayName: npm install + inputs: + workingDir: $(Build.SourcesDirectory) + verbose: false + + - task: CmdLine@2 + displayName: Clone submodule + inputs: + script: git clone --recurse-submodules https://github.com/IgniteUI/igniteui-live-editing-samples igniteui-live-editing-samples + workingDirectory: ${{ parameters.workingDir }} + + - task: PublishPipelineArtifact@1 + inputs: + targetPath: '$(Build.SourcesDirectory)' + artifact: 'source-code' + publishLocation: 'pipeline' + +- job: Job_1 + displayName: App CD Build + dependsOn: CommonSteps + pool: + vmImage: ubuntu-latest + steps: + - download: current + artifact: source-code + - template: template.yml + parameters: + customCommand: run generate-live-editing + workingDir: $(Build.SourcesDirectory) + submoduleDir: angular-demos + baseHref: /angular-demos/ + targetFolder: dist/app-lob + findRegex: angular-demos + npmBuildCommand: 'run build-ci' + +- job: Job_2 + displayName: App CRM Build + dependsOn: CommonSteps + pool: + vmImage: ubuntu-latest + steps: + - download: current + artifact: source-code + - template: template.yml + parameters: + customCommand: run generate-live-editing:app-crm + workingDir: $(Build.SourcesDirectory) + submoduleDir: angular-demos-crm + baseHref: /angular-demos-grid-crm/ + targetFolder: dist/app-crm + findRegex: angular-demos + npmBuildCommand: 'run build-ci:app-crm --loglevel verbose' + +- job: Job_3 + displayName: App LOB Build + dependsOn: CommonSteps + pool: + vmImage: ubuntu-latest + steps: + - download: current + artifact: source-code + - template: template.yml + parameters: + customCommand: run generate-live-editing:app-lob + workingDir: $(Build.SourcesDirectory) + submoduleDir: angular-demos-lob + baseHref: /angular-demos-lob/ + targetFolder: dist/app-lob + findRegex: angular-demos + npmBuildCommand: 'run build-ci:app-lob' \ No newline at end of file From ce5a6b648281b33da5e4402307e76a69881f8439 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Tue, 17 Dec 2024 16:40:32 +0200 Subject: [PATCH 02/43] fix(ci): fixing issue with pipe trigger --- azure-devops/azure-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-devops/azure-pipeline.yml b/azure-devops/azure-pipeline.yml index e90b5f6d47..9cc167ab97 100644 --- a/azure-devops/azure-pipeline.yml +++ b/azure-devops/azure-pipeline.yml @@ -1,8 +1,8 @@ trigger: branches: include: - - master - - vnext + - master + - vnext # This pipeline is meant to build specific branches for deployment. It's not meant to be a part of PR validation. Ensure that this pipeline is reserved for deployment purposes. pr: none From dfa6d2fa4110037cc587104aca982a35ca81fce8 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Tue, 17 Dec 2024 17:16:50 +0200 Subject: [PATCH 03/43] fix(ci): modifying ci/cd --- azure-devops/azure-pipeline.yml | 26 +---- azure-devops/templates/cd-template.yml | 144 +++++++++++++++++++++++++ 2 files changed, 149 insertions(+), 21 deletions(-) create mode 100644 azure-devops/templates/cd-template.yml diff --git a/azure-devops/azure-pipeline.yml b/azure-devops/azure-pipeline.yml index 9cc167ab97..45d70021f6 100644 --- a/azure-devops/azure-pipeline.yml +++ b/azure-devops/azure-pipeline.yml @@ -28,23 +28,6 @@ jobs: inputs: versionSpec: 20.x - - task: Npm@1 - displayName: npm cache clean - continueOnError: true - inputs: - command: custom - workingDir: $(Build.SourcesDirectory) - verbose: false - customCommand: cache clean --force - - - task: Npm@1 - displayName: npm cache verify - inputs: - command: custom - workingDir: $(Build.SourcesDirectory) - verbose: false - customCommand: cache verify - - task: RegexReplace@3 displayName: RegEx Find & Replace inputs: @@ -58,8 +41,9 @@ jobs: UseUTF8: false - task: Npm@1 - displayName: npm install + displayName: npm ci inputs: + command: ci workingDir: $(Build.SourcesDirectory) verbose: false @@ -83,7 +67,7 @@ jobs: steps: - download: current artifact: source-code - - template: template.yml + - template: cd-template.yml parameters: customCommand: run generate-live-editing workingDir: $(Build.SourcesDirectory) @@ -101,7 +85,7 @@ jobs: steps: - download: current artifact: source-code - - template: template.yml + - template: cd-template.yml parameters: customCommand: run generate-live-editing:app-crm workingDir: $(Build.SourcesDirectory) @@ -119,7 +103,7 @@ jobs: steps: - download: current artifact: source-code - - template: template.yml + - template: cd-template.yml parameters: customCommand: run generate-live-editing:app-lob workingDir: $(Build.SourcesDirectory) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml new file mode 100644 index 0000000000..cae8b49e1b --- /dev/null +++ b/azure-devops/templates/cd-template.yml @@ -0,0 +1,144 @@ +# template.yml +parameters: + - name: customCommand + type: string + - name: workingDir + type: string + - name: submoduleDir + type: string + - name: baseHref + type: string + - name: targetFolder + type: string + default: 'dist' + - name: findRegex + type: string + - name: npmBuildCommand + type: string + default: '' + - name: runCleanup + type: boolean + default: true + +steps: + # - task: CmdLine@2 + # displayName: Clone submodule + # inputs: + # script: git clone --recurse-submodules https://github.com/IgniteUI/igniteui-live-editing-samples igniteui-live-editing-samples + # workingDirectory: ${{ parameters.workingDir }} + + - task: CmdLine@2 + displayName: Staging - Git checkout branch + condition: eq(variables['Build.SourceBranchName'], 'vNext') + inputs: + script: git checkout vNext + workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples + + - task: CmdLine@2 + displayName: Production - Git checkout branch + condition: and(eq(variables['Build.SourceBranchName'], 'master'), contains(variables['build.reason'], 'CI')) + inputs: + script: git checkout master + workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples + + - script: | + sed -i 's/--configuration production/--base-href=${{ parameters.baseHref }} --configuration production/g' package.json + displayName: 'Update package.json file' + workingDirectory: ${{ parameters.workingDir }} + + - task: Npm@1 + displayName: generate live-editing + inputs: + command: custom + workingDir: ${{ parameters.workingDir }} + verbose: false + customCommand: ${{ parameters.customCommand }} + + - task: CmdLine@2 + displayName: Update to licensed igniteui-angular + inputs: + script: npx ng g @igniteui/angular-schematics:upgrade-packages --skip-install + workingDirectory: ${{ parameters.workingDir }} + + - task: Npm@1 + displayName: ${{ parameters.npmBuildCommand }} + inputs: + command: custom + workingDir: ${{ parameters.workingDir }} + verbose: false + customCommand: ${{ parameters.npmBuildCommand }} + + - task: CopyFiles@2 + displayName: Copy web.config + inputs: + SourceFolder: $(Build.SourcesDirectory) + Contents: web.config + TargetFolder: $(Build.SourcesDirectory)/${{ parameters.targetFolder }} + + - task: RegexReplace@3 + displayName: RegEx Find & Replace + inputs: + InputSearchPattern: $(Build.SourcesDirectory)/${{ parameters.targetFolder }}/web.config + FindRegex: ${{ parameters.findRegex }} + ReplaceRegex: ${{ parameters.submoduleDir }} + UseUTF8: false + + - task: PublishPipelineArtifact@1 + displayName: Publish Artifact + inputs: + targetPath: $(Build.SourcesDirectory)/${{ parameters.targetFolder }} + artifact: $(Build.SourceBranchName)-artifact + publishLocation: pipeline + + - task: Npm@1 + displayName: Staging - Repositorify Angular Demos and LOB Demos + condition: eq(variables['Build.SourceBranchName'], 'vNext') + inputs: + command: custom + workingDir: ${{ parameters.workingDir }} + verbose: false + customCommand: run repositoryfyAngularDemosLob + + - task: Npm@1 + displayName: Production - Repositorify Angular Demos + condition: and(eq(variables['Build.SourceBranchName'], 'master'), contains(variables['build.reason'], 'CI')) + inputs: + command: custom + workingDir: ${{ parameters.workingDir }} + verbose: false + customCommand: run repositoryfyAngularDemosLob:prod + + - task: CmdLine@2 + displayName: Stage changes + inputs: + script: git add . + workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} + + - task: CmdLine@2 + displayName: 'Check if there are any changes to be committed' + inputs: + script: | + # Check for changes + changeCount=$(git status --porcelain | wc -l) + if [ "$changeCount" -eq 0 ]; then + echo "##vso[task.logissue type=warning]No changes to commit." + exit 0 + fi + workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} + + + - task: CmdLine@2 + displayName: Commit changes + inputs: + script: git commit -m "Automated repository update" + workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} + + - task: CmdLine@2 + displayName: Push changes + inputs: + script: git push + workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} + + - task: PostBuildCleanup@4 + displayName: Clean Agent Directories + condition: eq('${{ parameters.runCleanup }}', 'true') \ No newline at end of file From 3b8875bd942a28c64570a496d9cccf485050d720 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Tue, 17 Dec 2024 17:18:33 +0200 Subject: [PATCH 04/43] fix(ci): fixing issue with work dir param --- azure-devops/azure-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/azure-pipeline.yml b/azure-devops/azure-pipeline.yml index 45d70021f6..73a056437b 100644 --- a/azure-devops/azure-pipeline.yml +++ b/azure-devops/azure-pipeline.yml @@ -51,7 +51,7 @@ jobs: displayName: Clone submodule inputs: script: git clone --recurse-submodules https://github.com/IgniteUI/igniteui-live-editing-samples igniteui-live-editing-samples - workingDirectory: ${{ parameters.workingDir }} + workingDirectory: $(Build.SourcesDirectory) - task: PublishPipelineArtifact@1 inputs: From 235c8136b9ce818b13ba15e2325c9615d374ce0a Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Tue, 17 Dec 2024 17:19:49 +0200 Subject: [PATCH 05/43] fix(ci): trying another way to setup path --- azure-devops/azure-pipeline.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-devops/azure-pipeline.yml b/azure-devops/azure-pipeline.yml index 73a056437b..6351e60945 100644 --- a/azure-devops/azure-pipeline.yml +++ b/azure-devops/azure-pipeline.yml @@ -67,7 +67,7 @@ jobs: steps: - download: current artifact: source-code - - template: cd-template.yml + - template: templates/cd-template.yml parameters: customCommand: run generate-live-editing workingDir: $(Build.SourcesDirectory) @@ -85,7 +85,7 @@ jobs: steps: - download: current artifact: source-code - - template: cd-template.yml + - template: templates/cd-template.yml parameters: customCommand: run generate-live-editing:app-crm workingDir: $(Build.SourcesDirectory) @@ -103,7 +103,7 @@ jobs: steps: - download: current artifact: source-code - - template: cd-template.yml + - template: templates/cd-template.yml parameters: customCommand: run generate-live-editing:app-lob workingDir: $(Build.SourcesDirectory) From 6409269f3da0242a536a3290c7f8afa034885142 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Tue, 17 Dec 2024 18:07:23 +0200 Subject: [PATCH 06/43] fix(ci): resolving validation issue --- azure-devops/templates/cd-template.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index cae8b49e1b..0fbca4945d 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -84,11 +84,11 @@ steps: UseUTF8: false - task: PublishPipelineArtifact@1 - displayName: Publish Artifact - inputs: - targetPath: $(Build.SourcesDirectory)/${{ parameters.targetFolder }} - artifact: $(Build.SourceBranchName)-artifact - publishLocation: pipeline + displayName: Publish Artifact + inputs: + targetPath: $(Build.SourcesDirectory)/${{ parameters.targetFolder }} + artifact: $(Build.SourceBranchName)-artifact + publishLocation: pipeline - task: Npm@1 displayName: Staging - Repositorify Angular Demos and LOB Demos From 37dc23163bafff54ca37fa15d3e99eb6e4d97e3b Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Tue, 17 Dec 2024 18:26:58 +0200 Subject: [PATCH 07/43] fix(ci): replacing tasks that doesn't work on ubuntu --- azure-devops/azure-pipeline.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-devops/azure-pipeline.yml b/azure-devops/azure-pipeline.yml index 6351e60945..d4a74c34b7 100644 --- a/azure-devops/azure-pipeline.yml +++ b/azure-devops/azure-pipeline.yml @@ -28,17 +28,17 @@ jobs: inputs: versionSpec: 20.x - - task: RegexReplace@3 - displayName: RegEx Find & Replace + - task: ReplaceInFilesTextByText@2 inputs: - InputSearchPattern: | + parameterSearchDirectory: '$(Build.SourcesDirectory)' + parameterSearchText: 'igniteui-angular-extras' + parameterReplaceText: '$(ReplacementText)' + parameterTypeOfSearch: 'filesList' + parameterFilesList: | projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts projects/app-lob/src/app/app.module.ts package.json - FindRegex: igniteui-angular-extras - ReplaceRegex: $(ReplacementText) - UseUTF8: false - task: Npm@1 displayName: npm ci From a607fcc881ee8446fe5b4c126e5d6e456010bede Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Wed, 18 Dec 2024 17:55:24 +0200 Subject: [PATCH 08/43] fix(ci): moving code to pws script --- azure-devops/azure-pipeline.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/azure-devops/azure-pipeline.yml b/azure-devops/azure-pipeline.yml index d4a74c34b7..6053c814f1 100644 --- a/azure-devops/azure-pipeline.yml +++ b/azure-devops/azure-pipeline.yml @@ -28,17 +28,20 @@ jobs: inputs: versionSpec: 20.x - - task: ReplaceInFilesTextByText@2 + - task: PowerShell@2 + displayName: 'Replace text in files using PowerShell' inputs: - parameterSearchDirectory: '$(Build.SourcesDirectory)' - parameterSearchText: 'igniteui-angular-extras' - parameterReplaceText: '$(ReplacementText)' - parameterTypeOfSearch: 'filesList' - parameterFilesList: | - projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts - projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts - projects/app-lob/src/app/app.module.ts - package.json + targetType: 'inline' + script: | + # List of files to update + $files = @( + "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts", + "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts", + "projects/app-lob/src/app/app.module.ts", + "package.json") + foreach ($file in $files) { + (Get-Content -Path $file) -replace 'igniteui-angular-extras', '$(ReplacementText)' | Set-Content -Path $file + } - task: Npm@1 displayName: npm ci From 1bb87807898e6b2d2ed591a3722455d312eb0687 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Wed, 18 Dec 2024 18:17:58 +0200 Subject: [PATCH 09/43] fix(ci): try to fix licensing --- azure-devops/azure-pipeline.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/azure-devops/azure-pipeline.yml b/azure-devops/azure-pipeline.yml index 6053c814f1..b5e1242e4d 100644 --- a/azure-devops/azure-pipeline.yml +++ b/azure-devops/azure-pipeline.yml @@ -29,7 +29,7 @@ jobs: versionSpec: 20.x - task: PowerShell@2 - displayName: 'Replace text in files using PowerShell' + displayName: 'Replace with licensed angular-extras' inputs: targetType: 'inline' script: | @@ -44,11 +44,20 @@ jobs: } - task: Npm@1 - displayName: npm ci + displayName: 'Register licensed npm registry in .npmrc' inputs: - command: ci + command: 'custom' + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/' + customEndpoint: 'public proget' + + - task: Npm@1 + displayName: npm install + inputs: + command: install workingDir: $(Build.SourcesDirectory) verbose: false + customEndpoint: 'public proget' - task: CmdLine@2 displayName: Clone submodule From d73f804d15b848190ae4fc44af220e401f18b3ef Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Wed, 18 Dec 2024 18:25:12 +0200 Subject: [PATCH 10/43] fix(ci): check the process env --- gulpfile.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 304603da3f..c3ca50285c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -247,6 +247,8 @@ const copyGitHooks = async (cb) => { return; } + console.log(process.env); + const gitHooksDir = './.git/hooks/'; const defaultCopyHookDir = gitHooksDir + 'scripts/'; const dirs = [ From 617338b27c6c6af221753a6211025cd86a7ae612 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Thu, 2 Jan 2025 17:25:24 +0200 Subject: [PATCH 11/43] fix(ci): splitting pipelines --- azure-devops/app-cd.yml | 80 +++++++++++++++++++ .../{azure-pipeline.yml => app-crm-cd-yml} | 55 +------------ azure-devops/app-lob-cd.yml | 80 +++++++++++++++++++ 3 files changed, 164 insertions(+), 51 deletions(-) create mode 100644 azure-devops/app-cd.yml rename azure-devops/{azure-pipeline.yml => app-crm-cd-yml} (66%) create mode 100644 azure-devops/app-lob-cd.yml diff --git a/azure-devops/app-cd.yml b/azure-devops/app-cd.yml new file mode 100644 index 0000000000..f32f8ea0b7 --- /dev/null +++ b/azure-devops/app-cd.yml @@ -0,0 +1,80 @@ +trigger: + branches: + include: + - master + - vnext + +# This pipeline is meant to build specific branches for deployment. It's not meant to be a part of PR validation. Ensure that this pipeline is reserved for deployment purposes. +pr: none + +name: $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) + +pool: + vmImage: ubuntu-latest + +variables: + githubToken: # Add a GitHub token in Libraries + ReplacementText: '@infragistics/igniteui-angular-extras' + +steps: + - checkout: self + clean: true + fetchTags: true + + - task: NodeTool@0 + displayName: Use Node 20.x + inputs: + versionSpec: 20.x + + - task: PowerShell@2 + displayName: 'Replace with licensed angular-extras' + inputs: + targetType: 'inline' + script: | + # List of files to update + $files = @( + "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts", + "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts", + "projects/app-lob/src/app/app.module.ts", + "package.json") + foreach ($file in $files) { + (Get-Content -Path $file) -replace 'igniteui-angular-extras', '$(ReplacementText)' | Set-Content -Path $file + } + + - task: Npm@1 + displayName: 'Register licensed npm registry in .npmrc' + inputs: + command: 'custom' + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/' + customEndpoint: 'public proget' + + - task: Npm@1 + displayName: npm install + inputs: + command: install + workingDir: $(Build.SourcesDirectory) + verbose: false + customEndpoint: 'public proget' + + - task: CmdLine@2 + displayName: Clone submodule + inputs: + script: git clone --recurse-submodules https://github.com/IgniteUI/igniteui-live-editing-samples igniteui-live-editing-samples + workingDirectory: $(Build.SourcesDirectory) + + - task: PublishPipelineArtifact@1 + inputs: + targetPath: '$(Build.SourcesDirectory)' + artifact: 'source-code' + publishLocation: 'pipeline' + + - template: templates/cd-template.yml + parameters: + customCommand: run generate-live-editing + workingDir: $(Build.SourcesDirectory) + submoduleDir: angular-demos + baseHref: /angular-demos/ + targetFolder: dist/app-lob + findRegex: angular-demos + npmBuildCommand: 'run build-ci' diff --git a/azure-devops/azure-pipeline.yml b/azure-devops/app-crm-cd-yml similarity index 66% rename from azure-devops/azure-pipeline.yml rename to azure-devops/app-crm-cd-yml index b5e1242e4d..21d41d830a 100644 --- a/azure-devops/azure-pipeline.yml +++ b/azure-devops/app-crm-cd-yml @@ -1,4 +1,3 @@ -trigger: branches: include: - master @@ -9,16 +8,14 @@ pr: none name: $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) +pool: + vmImage: ubuntu-latest + variables: githubToken: # Add a GitHub token in Libraries ReplacementText: '@infragistics/igniteui-angular-extras' -jobs: -- job: CommonSteps - displayName: Common Steps for All Jobs - pool: - vmImage: ubuntu-latest - steps: +steps: - checkout: self clean: true fetchTags: true @@ -71,32 +68,6 @@ jobs: artifact: 'source-code' publishLocation: 'pipeline' -- job: Job_1 - displayName: App CD Build - dependsOn: CommonSteps - pool: - vmImage: ubuntu-latest - steps: - - download: current - artifact: source-code - - template: templates/cd-template.yml - parameters: - customCommand: run generate-live-editing - workingDir: $(Build.SourcesDirectory) - submoduleDir: angular-demos - baseHref: /angular-demos/ - targetFolder: dist/app-lob - findRegex: angular-demos - npmBuildCommand: 'run build-ci' - -- job: Job_2 - displayName: App CRM Build - dependsOn: CommonSteps - pool: - vmImage: ubuntu-latest - steps: - - download: current - artifact: source-code - template: templates/cd-template.yml parameters: customCommand: run generate-live-editing:app-crm @@ -106,21 +77,3 @@ jobs: targetFolder: dist/app-crm findRegex: angular-demos npmBuildCommand: 'run build-ci:app-crm --loglevel verbose' - -- job: Job_3 - displayName: App LOB Build - dependsOn: CommonSteps - pool: - vmImage: ubuntu-latest - steps: - - download: current - artifact: source-code - - template: templates/cd-template.yml - parameters: - customCommand: run generate-live-editing:app-lob - workingDir: $(Build.SourcesDirectory) - submoduleDir: angular-demos-lob - baseHref: /angular-demos-lob/ - targetFolder: dist/app-lob - findRegex: angular-demos - npmBuildCommand: 'run build-ci:app-lob' \ No newline at end of file diff --git a/azure-devops/app-lob-cd.yml b/azure-devops/app-lob-cd.yml new file mode 100644 index 0000000000..af995eb1c1 --- /dev/null +++ b/azure-devops/app-lob-cd.yml @@ -0,0 +1,80 @@ +trigger: + branches: + include: + - master + - vnext + +# This pipeline is meant to build specific branches for deployment. It's not meant to be a part of PR validation. Ensure that this pipeline is reserved for deployment purposes. +pr: none + +name: $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) + +pool: + vmImage: ubuntu-latest + +variables: + githubToken: # Add a GitHub token in Libraries + ReplacementText: '@infragistics/igniteui-angular-extras' + +steps: + - checkout: self + clean: true + fetchTags: true + + - task: NodeTool@0 + displayName: Use Node 20.x + inputs: + versionSpec: 20.x + + - task: PowerShell@2 + displayName: 'Replace with licensed angular-extras' + inputs: + targetType: 'inline' + script: | + # List of files to update + $files = @( + "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts", + "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts", + "projects/app-lob/src/app/app.module.ts", + "package.json") + foreach ($file in $files) { + (Get-Content -Path $file) -replace 'igniteui-angular-extras', '$(ReplacementText)' | Set-Content -Path $file + } + + - task: Npm@1 + displayName: 'Register licensed npm registry in .npmrc' + inputs: + command: 'custom' + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/' + customEndpoint: 'public proget' + + - task: Npm@1 + displayName: npm install + inputs: + command: install + workingDir: $(Build.SourcesDirectory) + verbose: false + customEndpoint: 'public proget' + + - task: CmdLine@2 + displayName: Clone submodule + inputs: + script: git clone --recurse-submodules https://github.com/IgniteUI/igniteui-live-editing-samples igniteui-live-editing-samples + workingDirectory: $(Build.SourcesDirectory) + + - task: PublishPipelineArtifact@1 + inputs: + targetPath: '$(Build.SourcesDirectory)' + artifact: 'source-code' + publishLocation: 'pipeline' + + - template: templates/cd-template.yml + parameters: + customCommand: run generate-live-editing:app-lob + workingDir: $(Build.SourcesDirectory) + submoduleDir: angular-demos-lob + baseHref: /angular-demos-lob/ + targetFolder: dist/app-lob + findRegex: angular-demos + npmBuildCommand: 'run build-ci:app-lob' From ec6664f7ed59f099e222a86ce2ab11664d3347d7 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Thu, 2 Jan 2025 18:39:20 +0200 Subject: [PATCH 12/43] fix(cd): fixing sed command --- azure-devops/app-cd.yml | 8 +------- azure-devops/app-crm-cd-yml | 8 +------- azure-devops/app-lob-cd.yml | 8 +------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/azure-devops/app-cd.yml b/azure-devops/app-cd.yml index f32f8ea0b7..02c2b444f2 100644 --- a/azure-devops/app-cd.yml +++ b/azure-devops/app-cd.yml @@ -63,18 +63,12 @@ steps: script: git clone --recurse-submodules https://github.com/IgniteUI/igniteui-live-editing-samples igniteui-live-editing-samples workingDirectory: $(Build.SourcesDirectory) - - task: PublishPipelineArtifact@1 - inputs: - targetPath: '$(Build.SourcesDirectory)' - artifact: 'source-code' - publishLocation: 'pipeline' - - template: templates/cd-template.yml parameters: customCommand: run generate-live-editing workingDir: $(Build.SourcesDirectory) submoduleDir: angular-demos - baseHref: /angular-demos/ + baseHref: \/angular-demos\/ targetFolder: dist/app-lob findRegex: angular-demos npmBuildCommand: 'run build-ci' diff --git a/azure-devops/app-crm-cd-yml b/azure-devops/app-crm-cd-yml index 21d41d830a..af1763bda8 100644 --- a/azure-devops/app-crm-cd-yml +++ b/azure-devops/app-crm-cd-yml @@ -62,18 +62,12 @@ steps: script: git clone --recurse-submodules https://github.com/IgniteUI/igniteui-live-editing-samples igniteui-live-editing-samples workingDirectory: $(Build.SourcesDirectory) - - task: PublishPipelineArtifact@1 - inputs: - targetPath: '$(Build.SourcesDirectory)' - artifact: 'source-code' - publishLocation: 'pipeline' - - template: templates/cd-template.yml parameters: customCommand: run generate-live-editing:app-crm workingDir: $(Build.SourcesDirectory) submoduleDir: angular-demos-crm - baseHref: /angular-demos-grid-crm/ + baseHref: \/angular-demos-grid-crm\/ targetFolder: dist/app-crm findRegex: angular-demos npmBuildCommand: 'run build-ci:app-crm --loglevel verbose' diff --git a/azure-devops/app-lob-cd.yml b/azure-devops/app-lob-cd.yml index af995eb1c1..ef990eb103 100644 --- a/azure-devops/app-lob-cd.yml +++ b/azure-devops/app-lob-cd.yml @@ -63,18 +63,12 @@ steps: script: git clone --recurse-submodules https://github.com/IgniteUI/igniteui-live-editing-samples igniteui-live-editing-samples workingDirectory: $(Build.SourcesDirectory) - - task: PublishPipelineArtifact@1 - inputs: - targetPath: '$(Build.SourcesDirectory)' - artifact: 'source-code' - publishLocation: 'pipeline' - - template: templates/cd-template.yml parameters: customCommand: run generate-live-editing:app-lob workingDir: $(Build.SourcesDirectory) submoduleDir: angular-demos-lob - baseHref: /angular-demos-lob/ + baseHref: \/angular-demos-lob\/ targetFolder: dist/app-lob findRegex: angular-demos npmBuildCommand: 'run build-ci:app-lob' From fdc94b3f48b08231473f6447ae2396d8d1e1a69e Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Thu, 2 Jan 2025 19:15:04 +0200 Subject: [PATCH 13/43] fix(cd): check like this --- azure-devops/app-cd.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-devops/app-cd.yml b/azure-devops/app-cd.yml index 02c2b444f2..8699ffc573 100644 --- a/azure-devops/app-cd.yml +++ b/azure-devops/app-cd.yml @@ -56,6 +56,8 @@ steps: workingDir: $(Build.SourcesDirectory) verbose: false customEndpoint: 'public proget' + env: + AZURE_PIPELINES: true - task: CmdLine@2 displayName: Clone submodule From 69d4a94366637b951538abef69e36e63b55c4c3a Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Fri, 3 Jan 2025 14:39:37 +0200 Subject: [PATCH 14/43] fix(cd): changing step for licensed --- azure-devops/templates/cd-template.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 0fbca4945d..c64a1c1c0c 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -54,11 +54,20 @@ steps: verbose: false customCommand: ${{ parameters.customCommand }} - - task: CmdLine@2 + - script: | + find . -type f -exec sed -i 's/igniteui-angular/@infragistics\/igniteui-angular/g' {} + displayName: Update to licensed igniteui-angular + condition: succeeded() + + - task: Npm@1 + displayName: npm install inputs: - script: npx ng g @igniteui/angular-schematics:upgrade-packages --skip-install - workingDirectory: ${{ parameters.workingDir }} + command: install + workingDir: $(Build.SourcesDirectory) + verbose: false + customEndpoint: 'public proget' + env: + AZURE_PIPELINES: true - task: Npm@1 displayName: ${{ parameters.npmBuildCommand }} From 2cb9f8459e183726eaa6874df9e431c2d887b3e5 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Fri, 3 Jan 2025 14:52:25 +0200 Subject: [PATCH 15/43] fix(cd): modifying sed command to properly handle quotes --- azure-devops/templates/cd-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index c64a1c1c0c..37937cfb39 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -55,7 +55,7 @@ steps: customCommand: ${{ parameters.customCommand }} - script: | - find . -type f -exec sed -i 's/igniteui-angular/@infragistics\/igniteui-angular/g' {} + + find . -type f -exec sed -i 's/\'igniteui-angular\'/\'@infragistics\/igniteui-angular\'/g; s/"igniteui-angular"/"@infragistics\/igniteui-angular"/g' {} + displayName: Update to licensed igniteui-angular condition: succeeded() From a38c7dc8c61c3054b2b10451f049c9f5a88314a8 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Fri, 3 Jan 2025 15:18:12 +0200 Subject: [PATCH 16/43] fix(cd): trying this escape --- azure-devops/templates/cd-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 37937cfb39..55b27266df 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -55,7 +55,7 @@ steps: customCommand: ${{ parameters.customCommand }} - script: | - find . -type f -exec sed -i 's/\'igniteui-angular\'/\'@infragistics\/igniteui-angular\'/g; s/"igniteui-angular"/"@infragistics\/igniteui-angular"/g' {} + + find . -type f -exec sed -i 's/'\''igniteui-angular'\''/'\''@infragistics\/igniteui-angular'\''/g; s/"igniteui-angular"/"@infragistics\/igniteui-angular"/g' {} + displayName: Update to licensed igniteui-angular condition: succeeded() From 1f6cf3de5945ecf95b002ef83041b70827b67875 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Fri, 3 Jan 2025 15:43:28 +0200 Subject: [PATCH 17/43] fix(cd): Replacing sed with pwsh script --- azure-devops/templates/cd-template.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 55b27266df..eb32bd374c 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -54,10 +54,16 @@ steps: verbose: false customCommand: ${{ parameters.customCommand }} - - script: | - find . -type f -exec sed -i 's/'\''igniteui-angular'\''/'\''@infragistics\/igniteui-angular'\''/g; s/"igniteui-angular"/"@infragistics\/igniteui-angular"/g' {} + - displayName: Update to licensed igniteui-angular - condition: succeeded() + - task: PowerShell@2 + displayName: 'Replace with licensed igniteui-angular' + inputs: + targetType: 'inline' + script: | + # List of files to update + Get-ChildItem -Path . -Recurse -File | ForEach-Object { + (Get-Content -Path $file) -replace '''igniteui-angular''', '''@infragistics/igniteui-angular''' | Set-Content -Path $file + (Get-Content -Path $file) -replace '"igniteui-angular"', '"@infragistics/igniteui-angular"' | Set-Content -Path $file + } - task: Npm@1 displayName: npm install From cfa795a9d6151be042ca171f64974ca0782cd505 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Fri, 3 Jan 2025 15:56:48 +0200 Subject: [PATCH 18/43] fix(cd): if this works I am a donkey --- azure-devops/templates/cd-template.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index eb32bd374c..b6618e6333 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -59,10 +59,24 @@ steps: inputs: targetType: 'inline' script: | - # List of files to update - Get-ChildItem -Path . -Recurse -File | ForEach-Object { - (Get-Content -Path $file) -replace '''igniteui-angular''', '''@infragistics/igniteui-angular''' | Set-Content -Path $file - (Get-Content -Path $file) -replace '"igniteui-angular"', '"@infragistics/igniteui-angular"' | Set-Content -Path $file + $mainDirectory = "." + $subDirs = @("projects", "src") + $oldStrings = @("'igniteui-angular'", """igniteui-angular""") # Strings to replace + $newStrings = @("'@infragistics/igniteui-angular'", """@infragistics/igniteui-angular""") + $files = Get-ChildItem -Path $mainDirectory -File + foreach ($subDir in $subDirs) { + $subDirPath = Join-Path -Path $mainDirectory -ChildPath $subDir + if (Test-Path $subDirPath) { + $files += Get-ChildItem -Path $subDirPath -File -Recurse + } + } + foreach ($file in $files) { + $filePath = $file.FullName + $content = Get-Content -Path $filePath -Raw + for ($i = 0; $i -lt $oldStrings.Count; $i++) { + $content = $content -replace [regex]::Escape($oldStrings[$i]), $newStrings[$i] + } + Set-Content -Path $filePath -Value $content } - task: Npm@1 From 17d78bfd20701094405d6afae5113b0fb1dfdb66 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Fri, 3 Jan 2025 16:10:59 +0200 Subject: [PATCH 19/43] fix(cd): adding debug info --- azure-devops/templates/cd-template.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index b6618e6333..8d158fcf3b 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -71,10 +71,12 @@ steps: } } foreach ($file in $files) { + Write-Host "Processing file: $($file.FullName)" -ForegroundColor Green $filePath = $file.FullName $content = Get-Content -Path $filePath -Raw for ($i = 0; $i -lt $oldStrings.Count; $i++) { $content = $content -replace [regex]::Escape($oldStrings[$i]), $newStrings[$i] + Write-Host "Replacing: $($oldStrings[$i]) with $($newStrings[$i])" -ForegroundColor Green } Set-Content -Path $filePath -Value $content } From 0ec8a945573918abd6c234dea1e1a33a3858053f Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Fri, 3 Jan 2025 16:21:12 +0200 Subject: [PATCH 20/43] fix(cd): final try for replacement --- azure-devops/templates/cd-template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 8d158fcf3b..0113b2f6da 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -61,8 +61,8 @@ steps: script: | $mainDirectory = "." $subDirs = @("projects", "src") - $oldStrings = @("'igniteui-angular'", """igniteui-angular""") # Strings to replace - $newStrings = @("'@infragistics/igniteui-angular'", """@infragistics/igniteui-angular""") + $oldStrings = @("'igniteui-angular'", "igniteui-angular/", """igniteui-angular""") # Strings to replace + $newStrings = @("'@infragistics/igniteui-angular'", "@infragistics/igniteui-angular/" ,"""@infragistics/igniteui-angular""") $files = Get-ChildItem -Path $mainDirectory -File foreach ($subDir in $subDirs) { $subDirPath = Join-Path -Path $mainDirectory -ChildPath $subDir From 3357a5d97b1dd9c0650924a61fa3605af78d3f05 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Fri, 3 Jan 2025 17:12:09 +0200 Subject: [PATCH 21/43] fix(cd): trying to replace wrong step --- azure-devops/app-crm-cd-yml | 1 + azure-devops/templates/cd-template.yml | 15 ++++----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/azure-devops/app-crm-cd-yml b/azure-devops/app-crm-cd-yml index af1763bda8..6d97ea0578 100644 --- a/azure-devops/app-crm-cd-yml +++ b/azure-devops/app-crm-cd-yml @@ -1,3 +1,4 @@ +trigger: branches: include: - master diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 0113b2f6da..d3026784de 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -106,13 +106,10 @@ steps: Contents: web.config TargetFolder: $(Build.SourcesDirectory)/${{ parameters.targetFolder }} - - task: RegexReplace@3 - displayName: RegEx Find & Replace - inputs: - InputSearchPattern: $(Build.SourcesDirectory)/${{ parameters.targetFolder }}/web.config - FindRegex: ${{ parameters.findRegex }} - ReplaceRegex: ${{ parameters.submoduleDir }} - UseUTF8: false + - script: | + sed -i 's/${{ parameters.findRegex }}/${{ parameters.submoduleDir }}/g' $(Build.SourcesDirectory)/${{ parameters.targetFolder }}/web.config + displayName: 'Update web.config file' + workingDirectory: ${{ parameters.workingDir }} - task: PublishPipelineArtifact@1 displayName: Publish Artifact @@ -169,7 +166,3 @@ steps: inputs: script: git push workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} - - - task: PostBuildCleanup@4 - displayName: Clean Agent Directories - condition: eq('${{ parameters.runCleanup }}', 'true') \ No newline at end of file From c5152bfe6e4fdc9a28070999406e2bca6f0eadf4 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Mon, 6 Jan 2025 10:13:06 +0200 Subject: [PATCH 22/43] fix(cd): authenticate repositorify --- azure-devops/app-cd.yml | 2 +- azure-devops/templates/cd-template.yml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/azure-devops/app-cd.yml b/azure-devops/app-cd.yml index 8699ffc573..8ea80a5c04 100644 --- a/azure-devops/app-cd.yml +++ b/azure-devops/app-cd.yml @@ -71,6 +71,6 @@ steps: workingDir: $(Build.SourcesDirectory) submoduleDir: angular-demos baseHref: \/angular-demos\/ - targetFolder: dist/app-lob + targetFolder: dist/app findRegex: angular-demos npmBuildCommand: 'run build-ci' diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index d3026784de..214ef1aa5f 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -158,7 +158,11 @@ steps: - task: CmdLine@2 displayName: Commit changes inputs: - script: git commit -m "Automated repository update" + script: | + git config user.name "tfsbuild" + git config user.email "tfsbuild@infragistics.com" + git add . + git commit -m "Automated repository update" workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} - task: CmdLine@2 From 5e120ee0dd8f469e4720fb5930a82e86508a0f02 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Mon, 6 Jan 2025 10:42:07 +0200 Subject: [PATCH 23/43] fix(cd): only execute commit and push if changes are detected --- azure-devops/templates/cd-template.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 214ef1aa5f..36f2ff3d62 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -151,12 +151,15 @@ steps: if [ "$changeCount" -eq 0 ]; then echo "##vso[task.logissue type=warning]No changes to commit." exit 0 + else + echo "##vso[task.setvariable variable=changesDetected;isOutput=true]true" fi workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} - task: CmdLine@2 displayName: Commit changes + condition: eq(dependencies.CheckChanges.outputs['CheckChanges.changesDetected'], 'true') inputs: script: | git config user.name "tfsbuild" @@ -167,6 +170,7 @@ steps: - task: CmdLine@2 displayName: Push changes + condition: eq(dependencies.CheckChanges.outputs['CheckChanges.changesDetected'], 'true') inputs: script: git push workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} From 7443619432370e29c61ec70a8de7b6cf9fc5b8b4 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Mon, 6 Jan 2025 13:53:48 +0200 Subject: [PATCH 24/43] fix(cd): fixing conditions --- azure-devops/templates/cd-template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 36f2ff3d62..2194637366 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -159,7 +159,7 @@ steps: - task: CmdLine@2 displayName: Commit changes - condition: eq(dependencies.CheckChanges.outputs['CheckChanges.changesDetected'], 'true') + condition: eq(variables['changesDetected'], 'true') inputs: script: | git config user.name "tfsbuild" @@ -170,7 +170,7 @@ steps: - task: CmdLine@2 displayName: Push changes - condition: eq(dependencies.CheckChanges.outputs['CheckChanges.changesDetected'], 'true') + condition: eq(variables['changesDetected'], 'true') inputs: script: git push workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} From 7c7405eee44f2ab33bdc24a452fde505ec50c5f2 Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Mon, 6 Jan 2025 17:22:34 +0200 Subject: [PATCH 25/43] Explicitly set the userconfig npmrc location --- azure-devops/templates/cd-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 2194637366..024f9216dc 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -97,7 +97,7 @@ steps: command: custom workingDir: ${{ parameters.workingDir }} verbose: false - customCommand: ${{ parameters.npmBuildCommand }} + customCommand: '${{ parameters.npmBuildCommand }} --userconfig=$(Build.SourcesDirectory)\.npmrc' - task: CopyFiles@2 displayName: Copy web.config From 608d6870cf74ce4a0bee455647af07d8cd8c471e Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Mon, 6 Jan 2025 17:43:11 +0200 Subject: [PATCH 26/43] Try running the ng update scematics --- azure-devops/templates/cd-template.yml | 58 +++++++++++++++----------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 024f9216dc..271f3b8c45 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -54,32 +54,42 @@ steps: verbose: false customCommand: ${{ parameters.customCommand }} - - task: PowerShell@2 - displayName: 'Replace with licensed igniteui-angular' +# - task: PowerShell@2 +# displayName: 'Replace with licensed igniteui-angular' +# inputs: +# targetType: 'inline' +# script: | +# $mainDirectory = "." +# $subDirs = @("projects", "src") +# $oldStrings = @("'igniteui-angular'", "igniteui-angular/", """igniteui-angular""") # Strings to replace +# $newStrings = @("'@infragistics/igniteui-angular'", "@infragistics/igniteui-angular/" ,"""@infragistics/igniteui-angular""") +# $files = Get-ChildItem -Path $mainDirectory -File +# foreach ($subDir in $subDirs) { +# $subDirPath = Join-Path -Path $mainDirectory -ChildPath $subDir +# if (Test-Path $subDirPath) { +# $files += Get-ChildItem -Path $subDirPath -File -Recurse +# } +# } +# foreach ($file in $files) { +# Write-Host "Processing file: $($file.FullName)" -ForegroundColor Green +# $filePath = $file.FullName +# $content = Get-Content -Path $filePath -Raw +# for ($i = 0; $i -lt $oldStrings.Count; $i++) { +# $content = $content -replace [regex]::Escape($oldStrings[$i]), $newStrings[$i] +# Write-Host "Replacing: $($oldStrings[$i]) with $($newStrings[$i])" -ForegroundColor Green +# } +# Set-Content -Path $filePath -Value $content +# } + + - task: CmdLine@2 inputs: - targetType: 'inline' script: | - $mainDirectory = "." - $subDirs = @("projects", "src") - $oldStrings = @("'igniteui-angular'", "igniteui-angular/", """igniteui-angular""") # Strings to replace - $newStrings = @("'@infragistics/igniteui-angular'", "@infragistics/igniteui-angular/" ,"""@infragistics/igniteui-angular""") - $files = Get-ChildItem -Path $mainDirectory -File - foreach ($subDir in $subDirs) { - $subDirPath = Join-Path -Path $mainDirectory -ChildPath $subDir - if (Test-Path $subDirPath) { - $files += Get-ChildItem -Path $subDirPath -File -Recurse - } - } - foreach ($file in $files) { - Write-Host "Processing file: $($file.FullName)" -ForegroundColor Green - $filePath = $file.FullName - $content = Get-Content -Path $filePath -Raw - for ($i = 0; $i -lt $oldStrings.Count; $i++) { - $content = $content -replace [regex]::Escape($oldStrings[$i]), $newStrings[$i] - Write-Host "Replacing: $($oldStrings[$i]) with $($newStrings[$i])" -ForegroundColor Green - } - Set-Content -Path $filePath -Value $content - } + echo "NPM_CONFIG_REGISTRY is set to: $NPM_CONFIG_REGISTRY" + + npx ng g @igniteui/angular-schematics:upgrade-packages --skip-install + failOnStderr: true + env: + NPM_CONFIG_REGISTRY: $(Build.SourcesDirectory)/.npmrc - task: Npm@1 displayName: npm install From ec6c55a2ed629c20225eefc3d801afd1afef5fac Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Mon, 6 Jan 2025 17:51:00 +0200 Subject: [PATCH 27/43] Add explicit authentication to the npm feed - required --- azure-devops/app-cd.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/azure-devops/app-cd.yml b/azure-devops/app-cd.yml index 8ea80a5c04..b04c94e7c6 100644 --- a/azure-devops/app-cd.yml +++ b/azure-devops/app-cd.yml @@ -49,6 +49,11 @@ steps: customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/' customEndpoint: 'public proget' + - task: npmAuthenticate@0 + inputs: + workingFile: '$(Build.SourcesDirectory)\.npmrc' + customEndpoint: 'public proget' + - task: Npm@1 displayName: npm install inputs: From 917bb435dcc63d3b9f0117f42424e958d749be79 Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Mon, 6 Jan 2025 17:57:10 +0200 Subject: [PATCH 28/43] Create empty .npmrc file in the project root dir --- azure-devops/app-cd.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-devops/app-cd.yml b/azure-devops/app-cd.yml index b04c94e7c6..a484055313 100644 --- a/azure-devops/app-cd.yml +++ b/azure-devops/app-cd.yml @@ -49,6 +49,12 @@ steps: customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/' customEndpoint: 'public proget' + - task: CmdLine@2 + displayName: 'Create empty .npmrc file in the project root dir' + inputs: + script: 'touch $(Build.SourcesDirectory)\.npmrc' + failOnStderr: true + - task: npmAuthenticate@0 inputs: workingFile: '$(Build.SourcesDirectory)\.npmrc' From 9e08c1118396ab52119cadc0e33d104c3ddeefa6 Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Mon, 6 Jan 2025 17:58:48 +0200 Subject: [PATCH 29/43] fix file path delimiters --- azure-devops/app-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-devops/app-cd.yml b/azure-devops/app-cd.yml index a484055313..a0b2207698 100644 --- a/azure-devops/app-cd.yml +++ b/azure-devops/app-cd.yml @@ -52,12 +52,12 @@ steps: - task: CmdLine@2 displayName: 'Create empty .npmrc file in the project root dir' inputs: - script: 'touch $(Build.SourcesDirectory)\.npmrc' + script: 'touch $(Build.SourcesDirectory)/.npmrc' failOnStderr: true - task: npmAuthenticate@0 inputs: - workingFile: '$(Build.SourcesDirectory)\.npmrc' + workingFile: '$(Build.SourcesDirectory)/.npmrc' customEndpoint: 'public proget' - task: Npm@1 From fbf725d698b7fbf474d03647d092d6c59b98c781 Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Mon, 6 Jan 2025 18:04:26 +0200 Subject: [PATCH 30/43] Fix env var name - whoops --- azure-devops/templates/cd-template.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 271f3b8c45..7cffd160ea 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -84,12 +84,13 @@ steps: - task: CmdLine@2 inputs: script: | - echo "NPM_CONFIG_REGISTRY is set to: $NPM_CONFIG_REGISTRY" + echo "NPM_CONFIG_USERCONFIG is set to: $NPM_CONFIG_USERCONFIG" + cat $NPM_CONFIG_USERCONFIG npx ng g @igniteui/angular-schematics:upgrade-packages --skip-install failOnStderr: true env: - NPM_CONFIG_REGISTRY: $(Build.SourcesDirectory)/.npmrc + NPM_CONFIG_USERCONFIG: $(Build.SourcesDirectory)/.npmrc - task: Npm@1 displayName: npm install From fe8eb18ad3cf409d62ff1e512c0a18d7ce6d8509 Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Mon, 6 Jan 2025 18:09:35 +0200 Subject: [PATCH 31/43] Try using the userconfig npmrc cmd param instead of the env variable --- azure-devops/templates/cd-template.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 7cffd160ea..27222ea0ac 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -82,15 +82,11 @@ steps: # } - task: CmdLine@2 + displayName: 'Update packages trial->licensed using angular schematics' inputs: script: | - echo "NPM_CONFIG_USERCONFIG is set to: $NPM_CONFIG_USERCONFIG" - cat $NPM_CONFIG_USERCONFIG - - npx ng g @igniteui/angular-schematics:upgrade-packages --skip-install + npx ng g @igniteui/angular-schematics:upgrade-packages --skip-install --userconfig=$(Build.SourcesDirectory)\.npmrc failOnStderr: true - env: - NPM_CONFIG_USERCONFIG: $(Build.SourcesDirectory)/.npmrc - task: Npm@1 displayName: npm install From c7019313ac6e016574e29a04bfefb18bf6c82fae Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Mon, 6 Jan 2025 18:15:25 +0200 Subject: [PATCH 32/43] Update cd-template.yml for Azure Pipelines --- azure-devops/templates/cd-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 27222ea0ac..d6c37a2306 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -85,7 +85,7 @@ steps: displayName: 'Update packages trial->licensed using angular schematics' inputs: script: | - npx ng g @igniteui/angular-schematics:upgrade-packages --skip-install --userconfig=$(Build.SourcesDirectory)\.npmrc + npx ng g @igniteui/angular-schematics:upgrade-packages --skip-install --userconfig=$(Build.SourcesDirectory)\.npmrc failOnStderr: true - task: Npm@1 From 3a19631392db668b52301c1e2e894f781d595f75 Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Mon, 6 Jan 2025 18:15:52 +0200 Subject: [PATCH 33/43] Update cd-template.yml for Azure Pipelines --- azure-devops/templates/cd-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index d6c37a2306..3f41a4608f 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -85,7 +85,7 @@ steps: displayName: 'Update packages trial->licensed using angular schematics' inputs: script: | - npx ng g @igniteui/angular-schematics:upgrade-packages --skip-install --userconfig=$(Build.SourcesDirectory)\.npmrc + npx --userconfig=$(Build.SourcesDirectory)\.npmrc ng g @igniteui/angular-schematics:upgrade-packages --skip-install failOnStderr: true - task: Npm@1 From 3f243db0e1b6c7a4ff1cc331365502b76ca73d32 Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Tue, 7 Jan 2025 11:48:58 +0200 Subject: [PATCH 34/43] Fix where we start working on the npmrc file we need --- azure-devops/app-cd.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-devops/app-cd.yml b/azure-devops/app-cd.yml index a0b2207698..e8de7900fa 100644 --- a/azure-devops/app-cd.yml +++ b/azure-devops/app-cd.yml @@ -41,6 +41,12 @@ steps: (Get-Content -Path $file) -replace 'igniteui-angular-extras', '$(ReplacementText)' | Set-Content -Path $file } + - task: CmdLine@2 + displayName: 'Create empty .npmrc file in the project root dir' + inputs: + script: 'touch $(Build.SourcesDirectory)/.npmrc' + failOnStderr: true + - task: Npm@1 displayName: 'Register licensed npm registry in .npmrc' inputs: @@ -49,12 +55,6 @@ steps: customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/' customEndpoint: 'public proget' - - task: CmdLine@2 - displayName: 'Create empty .npmrc file in the project root dir' - inputs: - script: 'touch $(Build.SourcesDirectory)/.npmrc' - failOnStderr: true - - task: npmAuthenticate@0 inputs: workingFile: '$(Build.SourcesDirectory)/.npmrc' From 237a17de54dc96c88bc4f2dc55ed60d220edc5b1 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Tue, 7 Jan 2025 11:59:58 +0200 Subject: [PATCH 35/43] fix(cd): proper naming for artefact and zipping --- azure-devops/templates/cd-template.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 3f41a4608f..b73b3cce27 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -118,11 +118,19 @@ steps: displayName: 'Update web.config file' workingDirectory: ${{ parameters.workingDir }} + - script: | + sourcePath="$(Build.SourcesDirectory)/${{ parameters.targetFolder }}" + destinationZip="$(Build.ArtifactStagingDirectory)/output.zip" + cd "$sourcePath" + zip -r "$destinationZip" ./ + displayName: 'Zip build output' + + - task: PublishPipelineArtifact@1 displayName: Publish Artifact inputs: - targetPath: $(Build.SourcesDirectory)/${{ parameters.targetFolder }} - artifact: $(Build.SourceBranchName)-artifact + targetPath: $(Build.ArtifactStagingDirectory)/output.zip + artifact: {{ parameters.submoduleDir }}-artifact publishLocation: pipeline - task: Npm@1 From 934d49d01e8f6c026fe658489593c41ffb925a42 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Tue, 7 Jan 2025 12:01:03 +0200 Subject: [PATCH 36/43] fix(cd): fixing issue with chars --- azure-devops/templates/cd-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index b73b3cce27..7b8e5f384a 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -130,7 +130,7 @@ steps: displayName: Publish Artifact inputs: targetPath: $(Build.ArtifactStagingDirectory)/output.zip - artifact: {{ parameters.submoduleDir }}-artifact + artifact: '{{ parameters.submoduleDir }}-artifact' publishLocation: pipeline - task: Npm@1 From 7fcc82e6a6a1fe72b2439b7409a8fa48cdd98dbc Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Tue, 7 Jan 2025 13:44:34 +0200 Subject: [PATCH 37/43] fix(cd): adding proper char for parameter --- azure-devops/templates/cd-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 7b8e5f384a..65c1c3a2b9 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -130,7 +130,7 @@ steps: displayName: Publish Artifact inputs: targetPath: $(Build.ArtifactStagingDirectory)/output.zip - artifact: '{{ parameters.submoduleDir }}-artifact' + artifact: '${{ parameters.submoduleDir }}-artifact' publishLocation: pipeline - task: Npm@1 From 4859ede6149c7830f91b96cbd4f1b9101e2e7f23 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Wed, 15 Jan 2025 17:22:15 +0200 Subject: [PATCH 38/43] chore(ci): removing console log --- gulpfile.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index c3ca50285c..304603da3f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -247,8 +247,6 @@ const copyGitHooks = async (cb) => { return; } - console.log(process.env); - const gitHooksDir = './.git/hooks/'; const defaultCopyHookDir = gitHooksDir + 'scripts/'; const dirs = [ From d1eec648594ac56ebaca0ce567d301b063ad9e1b Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Mon, 20 Jan 2025 18:58:33 +0200 Subject: [PATCH 39/43] fix(ci): adding auth changes for other pipes --- azure-devops/app-crm-cd-yml | 13 +++++++++++++ azure-devops/app-lob-cd.yml | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/azure-devops/app-crm-cd-yml b/azure-devops/app-crm-cd-yml index 6d97ea0578..5319654018 100644 --- a/azure-devops/app-crm-cd-yml +++ b/azure-devops/app-crm-cd-yml @@ -41,6 +41,12 @@ steps: (Get-Content -Path $file) -replace 'igniteui-angular-extras', '$(ReplacementText)' | Set-Content -Path $file } + - task: CmdLine@2 + displayName: 'Create empty .npmrc file in the project root dir' + inputs: + script: 'touch $(Build.SourcesDirectory)/.npmrc' + failOnStderr: true + - task: Npm@1 displayName: 'Register licensed npm registry in .npmrc' inputs: @@ -49,6 +55,11 @@ steps: customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/' customEndpoint: 'public proget' + - task: npmAuthenticate@0 + inputs: + workingFile: '$(Build.SourcesDirectory)/.npmrc' + customEndpoint: 'public proget' + - task: Npm@1 displayName: npm install inputs: @@ -56,6 +67,8 @@ steps: workingDir: $(Build.SourcesDirectory) verbose: false customEndpoint: 'public proget' + env: + AZURE_PIPELINES: true - task: CmdLine@2 displayName: Clone submodule diff --git a/azure-devops/app-lob-cd.yml b/azure-devops/app-lob-cd.yml index ef990eb103..29daee6190 100644 --- a/azure-devops/app-lob-cd.yml +++ b/azure-devops/app-lob-cd.yml @@ -41,6 +41,12 @@ steps: (Get-Content -Path $file) -replace 'igniteui-angular-extras', '$(ReplacementText)' | Set-Content -Path $file } + - task: CmdLine@2 + displayName: 'Create empty .npmrc file in the project root dir' + inputs: + script: 'touch $(Build.SourcesDirectory)/.npmrc' + failOnStderr: true + - task: Npm@1 displayName: 'Register licensed npm registry in .npmrc' inputs: @@ -49,6 +55,11 @@ steps: customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/' customEndpoint: 'public proget' + - task: npmAuthenticate@0 + inputs: + workingFile: '$(Build.SourcesDirectory)/.npmrc' + customEndpoint: 'public proget' + - task: Npm@1 displayName: npm install inputs: @@ -56,6 +67,8 @@ steps: workingDir: $(Build.SourcesDirectory) verbose: false customEndpoint: 'public proget' + env: + AZURE_PIPELINES: true - task: CmdLine@2 displayName: Clone submodule From 9f2287e4fba34e482ee06b563b03d94bf9470c7a Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Thu, 23 Jan 2025 15:16:52 +0200 Subject: [PATCH 40/43] fix(lob): including proper replacement for extras --- azure-devops/app-cd.yml | 1 + azure-devops/app-crm-cd-yml | 1 + azure-devops/app-lob-cd.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/azure-devops/app-cd.yml b/azure-devops/app-cd.yml index e8de7900fa..66b1cd6578 100644 --- a/azure-devops/app-cd.yml +++ b/azure-devops/app-cd.yml @@ -35,6 +35,7 @@ steps: $files = @( "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts", "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts", + "projects/app-lob/src/app/data-analysis-dock-manager/data-analysis-dock-manager.component.ts", "projects/app-lob/src/app/app.module.ts", "package.json") foreach ($file in $files) { diff --git a/azure-devops/app-crm-cd-yml b/azure-devops/app-crm-cd-yml index 5319654018..e885d29c35 100644 --- a/azure-devops/app-crm-cd-yml +++ b/azure-devops/app-crm-cd-yml @@ -35,6 +35,7 @@ steps: $files = @( "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts", "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts", + "projects/app-lob/src/app/data-analysis-dock-manager/data-analysis-dock-manager.component.ts", "projects/app-lob/src/app/app.module.ts", "package.json") foreach ($file in $files) { diff --git a/azure-devops/app-lob-cd.yml b/azure-devops/app-lob-cd.yml index 29daee6190..d714975889 100644 --- a/azure-devops/app-lob-cd.yml +++ b/azure-devops/app-lob-cd.yml @@ -35,6 +35,7 @@ steps: $files = @( "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts", "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts", + "projects/app-lob/src/app/data-analysis-dock-manager/data-analysis-dock-manager.component.ts", "projects/app-lob/src/app/app.module.ts", "package.json") foreach ($file in $files) { From 004e060005f96f0ab901028b757139df6370abe8 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Thu, 23 Jan 2025 15:30:43 +0200 Subject: [PATCH 41/43] fix(lob): correct file path --- azure-devops/app-cd.yml | 2 +- azure-devops/app-crm-cd-yml | 2 +- azure-devops/app-lob-cd.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-devops/app-cd.yml b/azure-devops/app-cd.yml index 66b1cd6578..2b38066d65 100644 --- a/azure-devops/app-cd.yml +++ b/azure-devops/app-cd.yml @@ -35,7 +35,7 @@ steps: $files = @( "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts", "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts", - "projects/app-lob/src/app/data-analysis-dock-manager/data-analysis-dock-manager.component.ts", + "projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.ts", "projects/app-lob/src/app/app.module.ts", "package.json") foreach ($file in $files) { diff --git a/azure-devops/app-crm-cd-yml b/azure-devops/app-crm-cd-yml index e885d29c35..290a8b0900 100644 --- a/azure-devops/app-crm-cd-yml +++ b/azure-devops/app-crm-cd-yml @@ -35,7 +35,7 @@ steps: $files = @( "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts", "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts", - "projects/app-lob/src/app/data-analysis-dock-manager/data-analysis-dock-manager.component.ts", + "projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.ts", "projects/app-lob/src/app/app.module.ts", "package.json") foreach ($file in $files) { diff --git a/azure-devops/app-lob-cd.yml b/azure-devops/app-lob-cd.yml index d714975889..a09be2ce0b 100644 --- a/azure-devops/app-lob-cd.yml +++ b/azure-devops/app-lob-cd.yml @@ -35,7 +35,7 @@ steps: $files = @( "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts", "projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.component.ts", - "projects/app-lob/src/app/data-analysis-dock-manager/data-analysis-dock-manager.component.ts", + "projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.ts", "projects/app-lob/src/app/app.module.ts", "package.json") foreach ($file in $files) { From 936fd4b46cd1daf4ddf6980af00d69a278ef1724 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Thu, 23 Jan 2025 16:37:38 +0200 Subject: [PATCH 42/43] fix(crm): removing crm from codesandbox repos --- azure-devops/app-cd.yml | 1 + azure-devops/app-crm-cd-yml | 1 + azure-devops/app-lob-cd.yml | 1 + azure-devops/templates/cd-template.yml | 12 ++++++------ igniteui-live-editing-samples | 1 + 5 files changed, 10 insertions(+), 6 deletions(-) create mode 160000 igniteui-live-editing-samples diff --git a/azure-devops/app-cd.yml b/azure-devops/app-cd.yml index 2b38066d65..c7602df741 100644 --- a/azure-devops/app-cd.yml +++ b/azure-devops/app-cd.yml @@ -86,3 +86,4 @@ steps: targetFolder: dist/app findRegex: angular-demos npmBuildCommand: 'run build-ci' + repositoryfy: true diff --git a/azure-devops/app-crm-cd-yml b/azure-devops/app-crm-cd-yml index 290a8b0900..e8ba442a0d 100644 --- a/azure-devops/app-crm-cd-yml +++ b/azure-devops/app-crm-cd-yml @@ -86,3 +86,4 @@ steps: targetFolder: dist/app-crm findRegex: angular-demos npmBuildCommand: 'run build-ci:app-crm --loglevel verbose' + repositoryfy: false diff --git a/azure-devops/app-lob-cd.yml b/azure-devops/app-lob-cd.yml index a09be2ce0b..4c85da2a85 100644 --- a/azure-devops/app-lob-cd.yml +++ b/azure-devops/app-lob-cd.yml @@ -86,3 +86,4 @@ steps: targetFolder: dist/app-lob findRegex: angular-demos npmBuildCommand: 'run build-ci:app-lob' + repositoryfy: true diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 65c1c3a2b9..3ccc4c437a 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -125,7 +125,6 @@ steps: zip -r "$destinationZip" ./ displayName: 'Zip build output' - - task: PublishPipelineArtifact@1 displayName: Publish Artifact inputs: @@ -135,7 +134,7 @@ steps: - task: Npm@1 displayName: Staging - Repositorify Angular Demos and LOB Demos - condition: eq(variables['Build.SourceBranchName'], 'vNext') + condition: and(eq(variables['Build.SourceBranchName'], 'vNext'), eq(variables['repositoryfy'], 'true')) inputs: command: custom workingDir: ${{ parameters.workingDir }} @@ -144,7 +143,7 @@ steps: - task: Npm@1 displayName: Production - Repositorify Angular Demos - condition: and(eq(variables['Build.SourceBranchName'], 'master'), contains(variables['build.reason'], 'CI')) + condition: and(eq(variables['Build.SourceBranchName'], 'master'), contains(variables['build.reason'], 'CI'), eq(variables['repositoryfy'], 'true')) inputs: command: custom workingDir: ${{ parameters.workingDir }} @@ -153,12 +152,14 @@ steps: - task: CmdLine@2 displayName: Stage changes + condition: eq(variables['repositoryfy'], 'true') inputs: script: git add . workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} - task: CmdLine@2 displayName: 'Check if there are any changes to be committed' + condition: eq(variables['repositoryfy'], 'true') inputs: script: | # Check for changes @@ -171,10 +172,9 @@ steps: fi workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} - - task: CmdLine@2 displayName: Commit changes - condition: eq(variables['changesDetected'], 'true') + condition: and(eq(variables['changesDetected'], 'true'), eq(variables['repositoryfy'], 'true')) inputs: script: | git config user.name "tfsbuild" @@ -185,7 +185,7 @@ steps: - task: CmdLine@2 displayName: Push changes - condition: eq(variables['changesDetected'], 'true') + condition: and(eq(variables['changesDetected'], 'true'), eq(variables['repositoryfy'], 'true')) inputs: script: git push workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }} diff --git a/igniteui-live-editing-samples b/igniteui-live-editing-samples new file mode 160000 index 0000000000..5d44b505e9 --- /dev/null +++ b/igniteui-live-editing-samples @@ -0,0 +1 @@ +Subproject commit 5d44b505e91c7fad77951fb86b7a5cd3062cd1aa From 2e366cf22bf3f7df0a7163fda88abd49eaf1a3e0 Mon Sep 17 00:00:00 2001 From: Stamen Stoychev Date: Thu, 23 Jan 2025 16:41:49 +0200 Subject: [PATCH 43/43] fix(tmpl): adding the correct param to template --- azure-devops/templates/cd-template.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-devops/templates/cd-template.yml b/azure-devops/templates/cd-template.yml index 3ccc4c437a..0c4967e608 100644 --- a/azure-devops/templates/cd-template.yml +++ b/azure-devops/templates/cd-template.yml @@ -19,6 +19,9 @@ parameters: - name: runCleanup type: boolean default: true + - name: repositoryfy + type: boolean + default: false steps: # - task: CmdLine@2