Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.0.0 #325

Merged
merged 79 commits into from
Jul 26, 2023
Merged
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
5281ff1
chore!: upgrade dotnet command line api dependencies to the latest beta
m-s- Feb 28, 2023
d26d209
chore: upgrade dotnet/templating dependency to latest v6
m-s- Mar 2, 2023
519aa02
chore: upgrade several nuget dependencies
m-s- Mar 3, 2023
06ad621
chore: upgrade System.IO.Abstractions nugets
m-s- Mar 3, 2023
d9f35b1
refactor!: invoke execution via Parser instead of RootCommand, with a…
m-s- Mar 6, 2023
cf41659
feat: support scaffolding apps in `cmf init`
m-s- Mar 9, 2023
8eebd69
test: increase test coverage for pack and assemble
ricardofslp Mar 16, 2023
9d60396
refactor!: revert Consistency Check
jrk94 Mar 21, 2023
500118c
chore(plugin): bump template cli core dependency (#287)
jrk94 Mar 27, 2023
c59345f
feat(new): allow scaffolding HTML packages for MES v10
m-s- Mar 20, 2023
fb676f8
chore: migrate GenerateBasedOnTemplates to csharp to remove Powershel…
m-s- Mar 23, 2023
f9f0f96
feat(build): support @angular/cli managed HTML package
m-s- Mar 9, 2023
0fb4c91
chore: use npx for invoking ng, so we don't require installation
m-s- Mar 20, 2023
8090bee
feat(bump): support @angular/cli managed HTML packages
joaoopereira Mar 22, 2023
b6b77dc
chore(pipelines)!: improvements on CI-Release and CD-Containers
joaoopereira Feb 28, 2023
eb1f5d2
refactor(pipelines)!: move all environment related variables to Build…
joaoopereira Mar 2, 2023
05be07b
chore: add ISOLocation to project-config
joaoopereira Mar 28, 2023
731b738
feat(pipelines)!: add Authentication Variables closes #253
joaoopereira Mar 6, 2023
438f820
chore(pipelines): small fixes on improvements
joaoopereira Mar 28, 2023
a037440
refactor: move TemplaceCommand to Core
joaoopereira Mar 31, 2023
7a9e2c8
feat: scaffold a reference doc package for MES v10
m-s- Mar 24, 2023
91406d5
fix: missing MES version token replacement in new Feature command
m-s- Mar 29, 2023
b06b5b0
chore: support latest version of ngx-schematics
m-s- Mar 29, 2023
807564c
feat: build MES v10 help packages
m-s- Mar 30, 2023
c4c9802
fixup! feat(new): allow scaffolding HTML packages for MES v10
m-s- Mar 30, 2023
a2d3ab8
Merge remote-tracking branch 'origin/main' into development
m-s- Apr 4, 2023
ff7450a
chore: change deprecated System.IO.Abstraction methods to the newer e…
m-s- Apr 4, 2023
41cb620
refactor: read project-config as a versioned object instead of a Json…
m-s- Apr 4, 2023
e969d3b
test: test the new project-config mechanism
m-s- Apr 5, 2023
35f76dc
chore: fix plugin scaffolding template
joaoopereira Apr 3, 2023
34940ba
chore: remove stale documentation
m-s- Apr 5, 2023
d29ee9f
chore: move documentation to the code branch
m-s- Apr 5, 2023
02583f4
chore: bump to 4.0.0-0
m-s- Apr 10, 2023
114a53f
refactor(pipelines)!: deprecate pipelines scaffolding
joaoopereira Apr 11, 2023
cd4558c
chore: bump to 4.0.0-1
joaoopereira Apr 12, 2023
b8b11af
fix(plugins): pass null to NPMClient if no registry was specified
m-s- Apr 17, 2023
7293ca9
refactor(installation): remove temporary zip file from github releases
m-s- Apr 17, 2023
67df93a
chore(init): fix typo in project-config
joaoopereira Apr 17, 2023
ec688f4
docs(refactor): deprecate pipelines scaffolding
joaoopereira Apr 17, 2023
a69836e
chore(docs): make pdf export optional
joaoopereira Apr 17, 2023
2f3bb51
refactor: support pre-release ngxSchematics and yeoman generators
m-s- Apr 18, 2023
4ba5e6f
refactor(plugins)!: bypass System.CommandLine API when invoking plugins
m-s- Apr 18, 2023
1793658
docs: remove repositoryUrl from cmf init
joaoopereira May 2, 2023
1f9f14c
chore: remove powershell runtime as it's no longer needed
m-s- Apr 20, 2023
60f0328
refactor(build): remove .NET bundling from bundle (testing) builds
m-s- Apr 20, 2023
d9e24fa
feat: add validate start/end methods command
Apr 19, 2023
5802fe8
chore: do not process methods without input object
Apr 19, 2023
a2d41f1
chore: validate method name
Apr 19, 2023
952c130
chore: change factory to singleton and processors to transient
Apr 20, 2023
49d9d5b
chore: fix typo
m-s- Apr 26, 2023
aee6c86
chore: replace values with tokens in index.html, ngsw.json and assets…
m-s- Apr 26, 2023
9216048
chore: bump to 4.0.0-2
joaoopereira May 8, 2023
7c98f98
docs: fix scaffolding typo
joaoopereira May 16, 2023
debdd2f
chore: avoid exception when envar is already set
joaoopereira May 16, 2023
e9223b8
chore: bump to 4.0.0-3
joaoopereira May 16, 2023
1109ad2
feat(LBOs): automatically link LBOs when building UI packages
m-s- May 29, 2023
08102a9
feat(help packages): add token placer as we do for html
m-s- May 25, 2023
ed5ec3a
refactor(LBOs)!: remove deprecated LBO generation script
m-s- May 29, 2023
a32053d
chore: remove nullable notation where not needed
m-s- May 29, 2023
1ca6dea
chore: bump to 4.0.0-4
m-s- May 30, 2023
e983ebb
chore: log warning instead of information on development version checks
joaoopereira Jun 5, 2023
70a5d3e
chore(new html): build app and define config settings after new
joaoopereira Jun 13, 2023
8216a71
fix(build): use package name instead of workspace key for token replacer
m-s- Jun 22, 2023
67ecd4d
chore: bump to 4.0.0-5
m-s- Jun 22, 2023
defda80
chore: bump to 4.0.0-6
m-s- Jun 29, 2023
a024784
feat(new): add Support for New IoT V10
jrk94 Apr 11, 2023
01428ea
fix: change on V9 IoT Build Process
jrk94 Jun 30, 2023
d7cbd37
chore: bump to 4.0.0-7
m-s- Jul 3, 2023
7264300
fix: iot for versions lesser than v835 (#319)
jrk94 Jul 3, 2023
353404a
chore: bump to 4.0.0-8
m-s- Jul 3, 2023
20fcfcb
fix: guard DevTasksVersion
jrk94 Jul 6, 2023
9bbd982
fix: reference Nuget.Versioning directly, as we use it for SemanticVe…
m-s- Jul 13, 2023
7d55d0a
chore: bump to 4.0.0-9
m-s- Jul 13, 2023
2823196
chore: reduce log messages verbosity
joaoopereira Jul 11, 2023
58b9fb8
chore(refactor): improve RelatedPackages logic
joaoopereira Jul 11, 2023
b5a2212
chore: bump to 4.0.0-10
m-s- Jul 17, 2023
8668f8a
chore(new IoT): set RelatedPackages with RelativePath
joaoopereira Jul 24, 2023
edcdfab
test(new IoT): merged v9 and v10 tests
joaoopereira Jul 25, 2023
400118d
chore: release v4.0.0
m-s- Jul 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(pipelines)!: improvements on CI-Release and CD-Containers
BREAKING CHANGE: split all tasks in small pipeline templates that can be reused
joaoopereira committed Mar 31, 2023
commit b6b77dcfac782f9a55a646963e83a01cd55cf3ec
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Clean Agent Directories
steps:
- pwsh: Remove-Item $(Build.SourcesDirectory)\* -Recurse -Force -Verbose
displayName: Clean Sources Directory
condition: always()
- pwsh: Remove-Item $(Build.SourcesDirectory)\* -Recurse -Force -Verbose
displayName: Clean Sources Directory
condition: always()

- pwsh: Remove-Item $(Build.ArtifactStagingDirectory)\* -Recurse -Force -Verbose
displayName: Clean Artifact Staging Directory
condition: always()
- pwsh: Remove-Item $(Build.ArtifactStagingDirectory)\* -Recurse -Force -Verbose
displayName: Clean Artifact Staging Directory
condition: always()

- pwsh: Remove-Item $(Build.BinariesDirectory)\* -Recurse -Force -Verbose
displayName: Clean Binaries Directory
condition: always()
- pwsh: Remove-Item $(Build.BinariesDirectory)\* -Recurse -Force -Verbose
displayName: Clean Binaries Directory
condition: always()

- pwsh: Remove-Item $(Common.TestResultsDirectory)\* -Recurse -Force -Verbose
displayName: Clean Test Results Directory
condition: always()
- pwsh: Remove-Item $(Common.TestResultsDirectory)\* -Recurse -Force -Verbose
displayName: Clean Test Results Directory
condition: always()
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copy and mount MES ISO
steps:
- powershell: |
$iso = Get-Item "$(ISOImagePath)"
$destPath = "$(CandidatePackages)/../isos/"
$destIso = "$destPath/" + $iso.Name
if (-Not (Test-Path $destIso)) {
New-Item -Type Directory -Path $destPath -Force -Verbose
Copy-Item -Path $iso -Destination $destIso -Force -Verbose
}
$ImagePath = $destIso
# Mount the ISO, without having a drive letter auto-assigned
if (!(Get-DiskImage -ImagePath $ImagePath).Attached) {
Mount-DiskImage -ImagePath $ImagePath -PassThru
}
$driveLetter = (Get-DiskImage -ImagePath $ImagePath | Get-Volume).DriveLetter + ":/"
Set-Location -Path $driveLetter
Write-Output "##vso[task.setvariable variable=DriveLetter]$driveLetter"
displayName: Copy and mount MES ISO
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
parameters:
configurationDir: $(Build.ArtifactStagingDirectory)/Configurations
packageDir: ''

steps:
# Copy dependencies.json to Configurations~
- task: CopyFiles@2
displayName: Copy dependencies.json to Configurations
inputs:
SourceFolder: ${{ parameters.packageDir }}
Contents: |
dependencies.json
FlattenFolders: true
TargetFolder: ${{ parameters.configurationDir }}

# Remove dependencies.json
- task: DeleteFiles@1
displayName: Remove dependencies.json from source
inputs:
SourceFolder: ${{ parameters.packageDir }}
Contents: dependencies.json

# Copy global.json and cmfpackage.json to Configurations
- task: CopyFiles@2
displayName: Copy global.json and cmfpackage.json to Configurations
inputs:
Contents: |
global.json
cmfpackage.json
FlattenFolders: true
TargetFolder: ${{ parameters.configurationDir }}

# Copy Runsettings to Configurations
- task: CopyFiles@2
displayName: Copy Runsettings to Configurations
inputs:
Contents: |
**/*.runsettings
TargetFolder: ${{ parameters.configurationDir }}/Runsettings
flattenFolders: true

# Copy EnvironmentConfigs to Configurations
- task: CopyFiles@2
displayName: Copy EnvironmentConfigs to Configurations
inputs:
SourceFolder: EnvironmentConfigs
Contents: |
*.json
TargetFolder: $(Build.ArtifactStagingDirectory)/Configurations/EnvironmentConfigs

# Copy LBOs to Configurations
- task: CopyFiles@2
displayName: Copy LBOs to Configurations
inputs:
SourceFolder: Libs/LBOs/NetStandard
Contents: |
Cmf.LightBusinessObjects.dll
TargetFolder: $(Build.ArtifactStagingDirectory)/Configurations/LBOs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
steps:
# Clean deploy folder
- task: DeleteFiles@1
displayName: Clean $(CandidatePackages) folder
inputs:
SourceFolder: $(CandidatePackages)
Contents: "**"

# Download Configurations Artifacts
- task: DownloadBuildArtifacts@0
displayName: Download Configurations
inputs:
buildType: specific
project: $(System.TeamProject)
pipeline: CI-Publish
specificBuildWithTriggering: true
buildVersionToDownload: specific
buildId: $(resources.pipeline.CIPublish.runID)
downloadType: single
artifactName: Configurations
downloadPath: $(CandidatePackages)

# Download Package Artifacts
- task: DownloadBuildArtifacts@0
displayName: Download Package
inputs:
buildType: specific
project: $(System.TeamProject)
pipeline: CI-Publish
specificBuildWithTriggering: true
buildVersionToDownload: specific
buildId: $(resources.pipeline.CIPublish.runID)
downloadType: single
artifactName: Package
downloadPath: $(CandidatePackages)

# Download Tests Artifacts
- task: DownloadBuildArtifacts@0
displayName: Download Tests
inputs:
buildType: specific
project: $(System.TeamProject)
pipeline: CI-Publish
specificBuildWithTriggering: true
buildVersionToDownload: specific
buildId: $(resources.pipeline.CIPublish.runID)
downloadType: single
artifactName: Tests
downloadPath: $(CandidatePackages)
continueOnError: true
32 changes: 32 additions & 0 deletions cmf-cli/resources/template_feed/init/Builds/.tasks/drop-db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Drop Database
parameters:
<<<<<<< Updated upstream
DB: ''
=======
DB: ''
DBName: $(EnvConfig.Product.SystemName)
ServerName: $(EnvConfig.PackageProduct.Database.${{parameters.DB}}.Database.Server)

>>>>>>> Stashed changes
steps:
- task: SqlDacpacDeploymentOnMachineGroup@0
displayName: Drop ${{parameters.DB}} database
inputs:
TaskType: sqlInline
InlineSql: |
IF EXISTS (SELECT name from sys.databases WHERE (name = N'${{parameters.DBName}}'))
BEGIN
EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'${{parameters.DBName}}'
ALTER DATABASE [${{parameters.DBName}}] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE IF EXISTS ${{parameters.DBName}}
END;
ServerName: ${{parameters.ServerName}}
DatabaseName: master
AuthScheme: sqlServerAuthentication
<<<<<<< Updated upstream
SqlUsername: $(EnvConfig.PackageProduct.Database.${{ parameters.DB}}.Database.User)
SqlPassword: $(EnvConfig.PackageProduct.Database.${{ parameters.DB}}.Database.Password)
=======
SqlUsername: $(Database${{parameters.DB}}User)
SqlPassword: $(Database${{parameters.DB}}Password)
>>>>>>> Stashed changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
steps:
# set node version
- template: use-node-version.yml

- pwsh: npm install --no-save @criticalmanufacturing/cli@$(CmfCliVersion) --registry $(CmfCliRepository)
displayName: Install cmf-cli@$(CmfCliVersion)
workingDirectory: $(Agent.TempDirectory)
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
steps:
# set node version
- template: use-node-version.yml

- pwsh: npm install --no-save @criticalmanufacturing/cmf-pipeline@$(CmfPipelineVersion) --registry $(CmfPipelineRepository)
displayName: Install cmf-pipeline@$(CmfPipelineVersion)
workingDirectory: $(Agent.TempDirectory)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
steps:
# set node version
- template: use-node-version.yml

- pwsh: npm install --no-save @criticalmanufacturing/portal --registry ${{ variables.CmfCliRepository }}
displayName: Install cmf-portal
workingDirectory: $(Agent.TempDirectory)
46 changes: 46 additions & 0 deletions cmf-cli/resources/template_feed/init/Builds/.tasks/load-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Load EnvironmentConfig and Package Info
steps:
- pwsh: |
# Load PackageInfo
$PackageId = "${{ variables.RootPackageIdToInstall }}"
if($PackageId)
{
$PackageVersion = (Get-Item "$(CandidatePackages)/Package/$PackageId*").BaseName -replace "$PackageId."
}
else
{
$CmfPackageJsonFile = Get-Item "$(CandidatePackages)//Configurations/cmfpackage.json"
$CmfPackageJson = Get-Content -Raw -Path $CmfPackageJsonFile | ConvertFrom-Json
$PackageId = $CmfPackageJson."packageId"
$PackageVersion = $CmfPackageJson."version"
}
$PackageToInstall = "$PackageId@$PackageVersion"
# Load file location to variable
$file = "$(CandidatePackages)/Configurations/EnvironmentConfigs/$(EnvironmentConfigName)"
Write-Output "##vso[task.setvariable variable=ConfigPath;isOutput=true]$file"
# Load file to variable
$configString = Get-Content "$file" | out-string
Write-Output "##vso[task.setvariable variable=ConfigString;isOutput=true]$configString"
# Load each property to variable
if (Test-Path -Path $file -PathType Leaf) {
$envConfig = $configString | ConvertFrom-Json
$envConfig.PSObject.Properties | ForEach-Object {
if (-not($_.Value -eq "" -or $_.Value -eq $nil -or
($_.Value.GetType().FullName -eq "System.Management.Automation.PSCustomObject"))) {
# we need to remove the [] to avoid errors when trying to access the variable
$var = ($_.Name).Replace("[","").Replace("]","");
Write-Output "##vso[task.setvariable variable=$($var);isOutput=true]$($_.Value)"
}
}
} else {
Write-Output "$file not found"
}
Write-Output "##vso[task.setvariable variable=PackageToInstall;isOutput=true]$PackageToInstall"
Write-Output "##vso[task.setvariable variable=PackageId;isOutput=true]$PackageId"
Write-Output "##vso[task.setvariable variable=PackageVersion;isOutput=true]$PackageVersion"
name: EnvConfig
displayName: Load EnvironmentConfig and PackageInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
steps:
- pwsh: |
$CmfPackageJsonFile = Get-Item ./cmfpackage.json
$CmfPackageJson = Get-Content -Raw -Path $CmfPackageJsonFile | ConvertFrom-Json
$PackageId = $CmfPackageJson."packageId"
$PackageVersion = $CmfPackageJson."version"
$Package = "$PackageId@$PackageVersion"
Write-Output "##vso[task.setvariable variable=Name;isOutput=true]$Package"
Write-Output "##vso[task.setvariable variable=Id;isOutput=true]$PackageId"
Write-Output "##vso[task.setvariable variable=Version;isOutput=true]$PackageVersion"
name: Package
displayName: Get package details
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
steps:
- pwsh: |
$envConfig = Get-Content "$(EnvConfig.ConfigPath)" | Out-String | ConvertFrom-Json
$envConfig.ENV_MANAGER_BOOT_PACKAGE = $(EnvConfig.PackageToInstall)
$envConfig | ConvertTo-Json -Depth 10 | set-content "$(Agent.TempDirectory)/install-package.json"
$(Agent.TempDirectory)/node_modules/@criticalmanufacturing/portal/bin/cmf-portal.exe deploy `
--name "$(CustomerEnvironmentName)" `
--customer-infrastructure-name "DS Integration Environments" `
--parameters "$(Agent.TempDirectory)/install-package.json" `
--license "$(LicenseName)" `
--site "$(SiteName)" `
--target "$(DeploymentTarget)" `
--package="$(DeploymentPackage)" `
--terminateOtherVersions --verbose
displayName: Customization Installation

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
steps:
- pwsh: |
$testMasterDataFilter = "$(TestMasterDataFilter)"
if(!$testMasterDataFilter)
{
$testMasterDataFilter = "*MasterData*"
}
$masterDataFiles = "$(CandidatePackages)/Tests/$testMasterDataFilter.zip"
Get-ChildItem $masterDataFiles | foreach {
$PackageId = [regex]::split($_.BaseName, ".[0-9]+.[0-9]+.[0-9]+")[0];
$PackageVersion = ($_.BaseName-replace "$PackageId." );
$PackageToInstall = "$PackageId@$PackageVersion"
$envConfig = Get-Content "$(EnvConfig.ConfigPath)" | Out-String | ConvertFrom-Json
$envConfig.ENV_MANAGER_BOOT_PACKAGE = $(EnvConfig.PackageToInstall)
$envConfig | ConvertTo-Json -Depth 10 | set-content "$(Agent.TempDirectory)/install-package.json"
$(Agent.TempDirectory)/node_modules/@criticalmanufacturing/portal/bin/cmf-portal.exe deploy `
--name "$(CustomerEnvironmentName)" `
--customer-infrastructure-name "DS Integration Environments" `
--parameters "$(Agent.TempDirectory)/install-package.json" `
--license "$(LicenseName)" `
--site "$(SiteName)" `
--target "$(DeploymentTarget)" `
--package="$(DeploymentPackage)" `
--terminateOtherVersions --verbose
}
displayName: MasterData Loading

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
steps:
- pwsh: $(Agent.TempDirectory)/node_modules/@criticalmanufacturing/portal/bin/cmf-portal.exe login --token $(CustomerPortalPAT) --verbose
displayName: Portal Login
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
parameters:
- name: path # name of the parameter; required
type: string # data type of the parameter; required
- name: path
type: string
default: false

steps:
- task: PowerShell@2
displayName: 'Check if reportgenerator is to be executed'
inputs:
targetType: 'inline'
script: |
$count = (Get-ChildItem -Path ".\**\coverage.cobertura.xml" -Recurse | Measure-Object).Count
if ($count -gt 0) {
Write-Host "##vso[task.setvariable variable=generateCoverageReport]Yes" #set variable doThing to Yes
}
- pwsh: |
$count = (Get-ChildItem -Path ".\**\coverage.cobertura.xml" -Recurse | Measure-Object).Count
if ($count -gt 0) {
Write-Host "##vso[task.setvariable variable=generateCoverageReport]Yes" #set variable doThing to Yes
}
displayName: Check if reportgenerator is to be executed

# install dotnet tools
- pwsh: dotnet tool restore
displayName: Restore .NET tools

- script: 'dotnet tool run dotnet-coverage merge -o "${{ parameters.path }}/Merged.Cobertura.xml" -f "Cobertura" -r "coverage.cobertura.xml"'
displayName: 'Run reportgenerator'
# run dotnet-coverage
- pwsh: dotnet tool run dotnet-coverage merge -o "${{ parameters.path }}/Merged.Cobertura.xml" -f "Cobertura" -r "coverage.cobertura.xml"
displayName: Run reportgenerator
condition: and(succeeded(), eq(variables.generateCoverageReport, 'Yes'))

# Publish test results
@@ -31,4 +33,4 @@ steps:
displayName: Publishing Code Coverage
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '${{ parameters.path }}/Merged.Cobertura.xml'
summaryFileLocation: '${{ parameters.path }}/Merged.Cobertura.xml'
Loading