Skip to content

Commit c1db7a5

Browse files
Created Azure DevOps build pipeline & updated npm packages to fresh versions (#374)
* Initial draft of the build pipeline * Fix paths in the build pipeline * Trigger the build pipeline for the current feature branch * Trying to figure out how to do npm authentication in the pipeline * Skip the 'npm authenticate' step for now * Fix paths in the build pipeline's steps * Update build-pipeline.yml for Azure Pipelines * Increase the verbosity of npm because of the strange error we are getting * Remove silly verbosity of the npm install command - troubleshooting done * Add path mapping for the trial and licensed igniteui-dockmanager * Build pipeline: Fix path to output dir * Ran 'npm audit fix' and got the following updates: Json5 2.2.1 -> 2.2.3 1.0.1 -> 1.0.2 ua-parser-js 0.7.32 -> 0.7.33 * Experiment: add 'npm audit fix' To both resolve some vulnerabilities & to see how this operation will behave as a part of an automated pipeline * Make the call to npm audit fix just as advisory - do not apply it * Remove invocation of 'npm audit fix' * Fresh update to the npm packages in the package-lock.json - for the sake of using newer and more awesome & secure versions of them * Updated version of the Samples Browser and bumped versions of the following dependencies: @types/eslint 8.21.0 -> 8.21.1 @types/trusted-types 2.0.2 -> 2.0.3 caniuse-lite 1.0.30001451 -> 1.0.30001452 core-js 3.27.2 -> 3.28.0 core-js-compat 3.27.2 -> 3.28.0 electron-to-chromium 1.4.295 -> 1.4.296 eslint 8.21.0 -> 8.21.1 * Fix name of the Samples Browser artifact * Adapt to latest changes in the vnext branch * Copy web.config into the dist dir * using CDN assets --------- Co-authored-by: HUSSAR-mtrela <[email protected]>
1 parent b2540a9 commit c1db7a5

File tree

9 files changed

+119
-7
lines changed

9 files changed

+119
-7
lines changed

azure-pipelines/build-pipeline.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
trigger:
2+
branches:
3+
include:
4+
- vnext
5+
- master
6+
- btraykov/azure-pipeline
7+
8+
pr:
9+
branches:
10+
exclude:
11+
- '*' # must quote since "*" is a YAML reserved character; we want a string
12+
13+
parameters:
14+
- name: isVerbose
15+
displayName: 'Get verbose output from steps - where configurable'
16+
type: boolean
17+
default: false
18+
19+
name: $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
20+
21+
stages:
22+
- stage: Build
23+
pool:
24+
name: BuildAgentOnPrem
25+
demands: npm
26+
jobs:
27+
- job: BuildSamples
28+
steps:
29+
- checkout: 'self'
30+
path: $(Build.Repository.Name)
31+
32+
- task: NodeTool@0
33+
displayName: 'Install Node'
34+
inputs:
35+
versionSource: 'spec'
36+
versionSpec: '16.x'
37+
38+
- task: Npm@1
39+
displayName: 'Register licensed npm registry in .npmrc'
40+
inputs:
41+
command: 'custom'
42+
workingDir: '$(Build.SourcesDirectory)'
43+
customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/'
44+
customEndpoint: 'public proget'
45+
46+
- task: Npm@1
47+
displayName: 'npm ci'
48+
inputs:
49+
command: custom
50+
workingDir: '$(Build.SourcesDirectory)'
51+
verbose: ${{ parameters.isVerbose }}
52+
customCommand: ci
53+
54+
- task: PowerShell@2
55+
displayName: 'Uninstall all IG trial packages & re-install their licensed variations'
56+
inputs:
57+
failOnStderr: true
58+
showWarnings: true
59+
workingDirectory: '$(Build.SourcesDirectory)'
60+
targetType: 'inline'
61+
script: |
62+
Get-Content -Path .\.npmrc
63+
64+
$packageJson = Get-Content -Raw .\package.json | ConvertFrom-Json
65+
$npmUninstallPackages = "npm uninstall --save "
66+
$npmInstallPackages = "npm install "
67+
68+
$packageJson.dependencies.PSObject.Properties | `
69+
Where-Object {
70+
$_.Name.StartsWith("igniteui-webcomponents-") -or $_.Name.StartsWith("igniteui-dockmanager") `
71+
} | `
72+
ForEach-Object { `
73+
$npmUninstallPackages += $_.Name + " "
74+
$npmInstallPackages += "@infragistics/" + $_.Name + "@" + $_.Value + " "
75+
}
76+
77+
Write-Host $npmUninstallPackages
78+
Write-Host $npmInstallPackages
79+
80+
Invoke-Expression -Command “$npmUninstallPackages”
81+
Invoke-Expression -Command “$npmInstallPackages”
82+
83+
- task: Npm@1
84+
displayName: 'npm run build'
85+
inputs:
86+
command: custom
87+
workingDir: '$(Build.SourcesDirectory)'
88+
verbose: ${{ parameters.isVerbose }}
89+
customCommand: 'run build'
90+
91+
- task: CopyFiles@2
92+
displayName: 'Copy web.config into the dist dir'
93+
inputs:
94+
SourceFolder: '$(Build.SourcesDirectory)/browser'
95+
Contents: 'web.config'
96+
TargetFolder: '$(Build.SourcesDirectory)/browser/dist'
97+
98+
- task: ArchiveFiles@2
99+
displayName: 'Package samples browser'
100+
inputs:
101+
verbose: ${{ parameters.isVerbose }}
102+
rootFolderOrFile: '$(Build.SourcesDirectory)/browser/dist'
103+
includeRootFolder: false
104+
archiveType: 'zip'
105+
archiveFile: '$(Build.ArtifactStagingDirectory)/WebComponentsSamples.zip'
106+
replaceExistingArchive: true
107+
108+
- task: PublishPipelineArtifact@1
109+
displayName: 'Publish pipeline artifact'
110+
inputs:
111+
targetPath: '$(Build.ArtifactStagingDirectory)/WebComponentsSamples.zip'
112+
artifact: 'WebComponentsSamplesBrowser'

browser/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<div class="nav-content" >
2727

2828
<!-- <div class="nav-logo">
29-
<img src="/assets/icons/favicon.png" width="20px" height="20px">
29+
<img src="https://static.infragistics.com/xplatform/images/browsers/wc.png" width="20px" height="20px">
3030
<div >SAMPLES BROWSER</div>
3131
</div> -->
3232

-9.27 KB
Binary file not shown.

browser/src/assets/icons/logo.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

browser/src/assets/images/comingSoon.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)