diff --git a/.travis.yml b/.travis.yml index 0933743407f0..2b745b1f94ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ before_install: # https://github.com/travis-ci/travis-ci/issues/1066#issuecomment-383489298 script: - sudo dotnet msbuild build.proj /t:BuildNetcore /p:Configuration=$CONFIG || travis_terminate 1 - - sudo dotnet tools/StaticAnalysis/bin/$CONFIG/netcoreapp2.1/StaticAnalysis.Netcore.dll -p src/Package/$CONFIG -r src/Package -u || travis_terminate 1 + - sudo dotnet src/Package/StaticAnalysis/StaticAnalysis.Netcore.dll -p $TRAVIS_BUILD_DIR/src/Package/$CONFIG -r $TRAVIS_BUILD_DIR/src/Package/StaticAnalysis -u || travis_terminate 1 - sudo pwsh -NonInteractive -NoLogo -NoProfile -File tools/TestModuleLoading.ps1 || travis_terminate 1 - sudo dotnet pack src/TestPrerequisites/Common.TestPrerequisites.sln --configuration $CONFIG || travis_terminate 1 - sudo dotnet test src/Azure.PowerShell.Netcore.Test.sln --filter "AcceptanceType=CheckIn&RunType!=DesktopOnly" --configuration $CONFIG --framework netcoreapp2.0 diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.SiteRecovery/Az.RecoveryServices.SiteRecovery.psd1 b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.SiteRecovery/Az.RecoveryServices.SiteRecovery.psd1 deleted file mode 100644 index 459a3739364a..000000000000 --- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.SiteRecovery/Az.RecoveryServices.SiteRecovery.psd1 +++ /dev/null @@ -1,232 +0,0 @@ -# -# Module manifest for module 'Az.RecoveryServices.SiteRecovery' -# -# Generated by: Microsoft Corporation -# -# Generated on: 3/13/2018 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '0.3.0' - -# Supported PSEditions -CompatiblePSEditions = 'Core', 'Desktop' - -# ID used to uniquely identify this module -GUID = '8984d8d5-a901-4048-8f5f-1b1542cb6c9c' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = 'Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Microsoft Azure PowerShell - SiteRecovery service cmdlets for Azure Resource Manager in PowerShell and PowerShell Core' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '5.1' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -DotNetFrameworkVersion = '4.7.2' - -# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Profile'; ModuleVersion = '0.3.0'; }) - -# Assemblies that must be loaded prior to importing this module -RequiredAssemblies = '.\AutoMapper.dll', - '.\Microsoft.Azure.Commands.RecoveryServices.ARM.dll', - '.\Microsoft.Azure.Management.RecoveryServices.dll', - '.\Microsoft.Azure.Management.RecoveryServices.SiteRecovery.dll', - '.\Security.Cryptography.dll' - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -NestedModules = @('.\Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.dll') - -# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = @() - -# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. -CmdletsToExport = 'Edit-AzRecoveryServicesAsrRecoveryPlan', - 'Get-AzRecoveryServicesAsrAlertSetting', - 'Get-AzRecoveryServicesAsrEvent', - 'Get-AzRecoveryServicesAsrFabric', - 'Get-AzRecoveryServicesAsrJob', - 'Get-AzRecoveryServicesAsrNetwork', - 'Get-AzRecoveryServicesAsrNetworkMapping', - 'Get-AzRecoveryServicesAsrPolicy', - 'Get-AzRecoveryServicesAsrProtectableItem', - 'Get-AzRecoveryServicesAsrProtectionContainer', - 'Get-AzRecoveryServicesAsrProtectionContainerMapping', - 'Get-AzRecoveryServicesAsrRecoveryPlan', - 'Get-AzRecoveryServicesAsrRecoveryPoint', - 'Get-AzRecoveryServicesAsrReplicationProtectedItem', - 'Get-AzRecoveryServicesAsrServicesProvider', - 'Get-AzRecoveryServicesAsrStorageClassification', - 'Get-AzRecoveryServicesAsrStorageClassificationMapping', - 'Get-AzRecoveryServicesAsrVaultContext', - 'Get-AzRecoveryServicesAsrvCenter', - 'Import-AzRecoveryServicesAsrVaultSettingsFile', - 'New-AzRecoveryServicesAsrFabric', - 'New-AzRecoveryServicesAsrNetworkMapping', - 'New-AzRecoveryServicesAsrPolicy', - 'New-AzRecoveryServicesAsrProtectableItem', - 'New-AzRecoveryServicesAsrProtectionContainer', - 'New-AzRecoveryServicesAsrProtectionContainerMapping', - 'New-AzRecoveryServicesAsrRecoveryPlan', - 'New-AzRecoveryServicesAsrReplicationProtectedItem', - 'New-AzRecoveryServicesAsrStorageClassificationMapping', - 'New-AzRecoveryServicesAsrvCenter', - 'New-AzRecoveryServicesAsrAzureToAzureDiskReplicationConfig', - 'Remove-AzRecoveryServicesAsrFabric', - 'Remove-AzRecoveryServicesAsrNetworkMapping', - 'Remove-AzRecoveryServicesAsrPolicy', - 'Remove-AzRecoveryServicesAsrProtectionContainer', - 'Remove-AzRecoveryServicesAsrProtectionContainerMapping', - 'Remove-AzRecoveryServicesAsrRecoveryPlan', - 'Remove-AzRecoveryServicesAsrReplicationProtectedItem', - 'Remove-AzRecoveryServicesAsrServicesProvider', - 'Remove-AzRecoveryServicesAsrStorageClassificationMapping', - 'Remove-AzRecoveryServicesAsrvCenter', - 'Restart-AzRecoveryServicesAsrJob', - 'Resume-AzRecoveryServicesAsrJob', - 'Set-AzRecoveryServicesAsrAlertSetting', - 'Set-AzRecoveryServicesAsrReplicationProtectedItem', - 'Set-AzRecoveryServicesAsrVaultContext', - 'Start-AzRecoveryServicesAsrApplyRecoveryPoint', - 'Start-AzRecoveryServicesAsrCommitFailoverJob', - 'Start-AzRecoveryServicesAsrPlannedFailoverJob', - 'Start-AzRecoveryServicesAsrResynchronizeReplicationJob', - 'Start-AzRecoveryServicesAsrSwitchProcessServerJob', - 'Start-AzRecoveryServicesAsrTestFailoverCleanupJob', - 'Start-AzRecoveryServicesAsrTestFailoverJob', - 'Start-AzRecoveryServicesAsrUnplannedFailoverJob', - 'Stop-AzRecoveryServicesAsrJob', - 'Update-AzRecoveryServicesAsrMobilityService', - 'Update-AzRecoveryServicesAsrNetworkMapping', - 'Update-AzRecoveryServicesAsrPolicy', - 'Update-AzRecoveryServicesAsrProtectionDirection', - 'Update-AzRecoveryServicesAsrRecoveryPlan', - 'Update-AzRecoveryServicesAsrServicesProvider', - 'Update-AzRecoveryServicesAsrvCenter' - -# Variables to export from this module -# VariablesToExport = @() - -# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -AliasesToExport = 'Edit-ASRRP', 'Edit-ASRRecoveryPlan', 'Get-ASRAlertSetting', - 'Get-ASREvent', 'Get-ASRFabric', 'Get-ASRJob', 'Get-ASRNetwork', - 'Get-ASRNetworkMapping', 'Get-ASRNotificationSetting', - 'Get-ASRPolicy', 'Get-ASRProtectableItem', - 'Get-ASRProtectionContainer', 'Get-ASRProtectionContainerMapping', - 'Get-ASRRP', 'Get-ASRRecoveryPlan', 'Get-ASRRecoveryPoint', - 'Get-ASRReplicationProtectedItem', 'Get-ASRServicesProvider', - 'Get-ASRStorageClassification', - 'Get-ASRStorageClassificationMapping', 'Set-ASRVaultContext', - 'Set-ASRVaultSettings', 'Get-ASRvCenter', - 'Get-AzRecoveryServicesAsrNotificationSetting', - 'Get-AzRecoveryServicesAsrVaultSettings', 'New-ASRFabric', - 'New-ASRNetworkMapping', 'New-ASRPolicy', 'New-ASRProtectableItem', - 'New-ASRProtectionContainerMapping', 'New-ASRRP', - 'New-ASRRecoveryPlan', 'New-ASRReplicationProtectedItem', - 'New-ASRStorageClassificationMapping', 'New-ASRvCenter', - 'Remove-ASRFabric', 'Remove-ASRNetworkMapping', 'Remove-ASRPolicy', - 'Remove-ASRProtectionContainerMapping', 'Remove-ASRRP', - 'Remove-ASRRecoveryPlan', 'Remove-ASRReplicationProtectedItem', - 'Remove-ASRServicesProvider', - 'Remove-ASRStorageClassificationMapping', 'Remove-ASRvCenter', - 'Restart-ASRJob', 'Resume-ASRJob', 'Set-ASRAlertSetting', - 'Set-ASRNotificationSetting', 'Set-ASRReplicationProtectedItem', - 'Set-ASRVaultContext', 'Set-ASRVaultSettings', - 'Set-AzRecoveryServicesAsrNotificationSetting', - 'Set-AzRecoveryServicesAsrVaultSettings', - 'Start-ASRApplyRecoveryPoint', 'Start-ASRCommitFailover', - 'Start-ASRCommitFailoverJob', 'Start-ASRFO', 'Start-ASRPFO', - 'Start-ASRPlannedFailoverJob', 'Start-ASRResyncJob', - 'Start-ASRResynchronizeReplicationJob', - 'Start-ASRSwitchProcessServerJob', 'Start-ASRTFO', - 'Start-ASRTFOCleanupJob', 'Start-ASRTestFailoverCleanupJob', - 'Start-ASRTestFailoverJob', 'Start-ASRUnplannedFailoverJob', - 'Stop-ASRJob', 'Update-ASRMobilityService', 'Update-ASRPolicy', - 'Update-ASRProtectionDirection', 'Update-ASRRecoveryPlan', - 'Update-ASRServicesProvider', 'Update-ASRvCenter' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure', 'ResourceManager', 'ARM', 'SiteRecovery' - - # A URL to the license for this module. - LicenseUri = 'https://aka.ms/azps-license' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/Azure/azure-powershell' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = 'Initial Release with PowerShell and PowerShell Core Support' - - # Prerelease string of this module - # Prerelease = '' - - # Flag to indicate whether the module requires explicit user acceptance for install/update/save - # RequireLicenseAcceptance = $false - - # External dependent modules of this module - # ExternalModuleDependencies = @() - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery.Netcore.csproj b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery.Netcore.csproj index d28e34e8c714..2efcf8c6e7bc 100644 --- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery.Netcore.csproj +++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery.Netcore.csproj @@ -33,12 +33,6 @@ - - - PreserveNewest - - - true @@ -62,4 +56,4 @@ - \ No newline at end of file + diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Az.RecoveryServices.psd1 b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Az.RecoveryServices.psd1 index 5f06c16b366a..db25124d64dc 100644 --- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Az.RecoveryServices.psd1 +++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Az.RecoveryServices.psd1 @@ -1,5 +1,5 @@ # -# Module manifest for module 'AzureRM.RecoveryServices' +# Module manifest for module 'Az.RecoveryServices' # # Generated by: Microsoft Corporation # @@ -54,7 +54,8 @@ DotNetFrameworkVersion = '4.7.2' RequiredModules = @(@{ModuleName = 'Az.Profile'; ModuleVersion = '0.3.0'; }) # Assemblies that must be loaded prior to importing this module -RequiredAssemblies = '.\Microsoft.Azure.Commands.RecoveryServices.Backup.Models.dll', +RequiredAssemblies = '.\AutoMapper.dll', + '.\Microsoft.Azure.Commands.RecoveryServices.Backup.Models.dll', '.\Microsoft.Azure.Management.RecoveryServices.Backup.dll', '.\Microsoft.Azure.Commands.RecoveryServices.Backup.Helpers.dll', '.\Microsoft.Azure.Commands.RecoveryServices.Backup.Logger.dll', @@ -75,7 +76,7 @@ FormatsToProcess = '.\Microsoft.Azure.Commands.RecoveryServices.Backup.format.ps # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @('.\Microsoft.Azure.Commands.RecoveryServices.ARM.dll', '.\Microsoft.Azure.Commands.RecoveryServices.Backup.dll', - '.\Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.dll') + '.\Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.dll') # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = @() @@ -171,13 +172,49 @@ CmdletsToExport = 'Get-AzRecoveryServicesBackupProperty', 'Restore-AzRecoveryServicesBackupItem', 'Unregister-AzRecoveryServicesBackupManagementServer', 'Get-AzRecoveryServicesBackupRPMountScript', - 'Disable-AzRecoveryServicesBackupRPMountScript' + 'Disable-AzRecoveryServicesBackupRPMountScript', + 'Get-AzRecoveryServicesBackupStatus' # Variables to export from this module # VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -AliasesToExport = 'Get-AzRecoveryServicesBackupProperties' +AliasesToExport = 'Get-AzRecoveryServicesBackupProperties', + 'Edit-ASRRP', 'Edit-ASRRecoveryPlan', 'Get-ASRAlertSetting', + 'Get-ASREvent', 'Get-ASRFabric', 'Get-ASRJob', 'Get-ASRNetwork', + 'Get-ASRNetworkMapping', 'Get-ASRNotificationSetting', + 'Get-ASRPolicy', 'Get-ASRProtectableItem', + 'Get-ASRProtectionContainer', 'Get-ASRProtectionContainerMapping', + 'Get-ASRRP', 'Get-ASRRecoveryPlan', 'Get-ASRRecoveryPoint', + 'Get-ASRReplicationProtectedItem', 'Get-ASRServicesProvider', + 'Get-ASRStorageClassification', + 'Get-ASRStorageClassificationMapping', 'Set-ASRVaultContext', + 'Set-ASRVaultSettings', 'Get-ASRvCenter', + 'Get-AzRecoveryServicesAsrNotificationSetting', + 'Get-AzRecoveryServicesAsrVaultSettings', 'New-ASRFabric', + 'New-ASRNetworkMapping', 'New-ASRPolicy', 'New-ASRProtectableItem', + 'New-ASRProtectionContainerMapping', 'New-ASRRP', + 'New-ASRRecoveryPlan', 'New-ASRReplicationProtectedItem', + 'New-ASRStorageClassificationMapping', 'New-ASRvCenter', + 'Remove-ASRFabric', 'Remove-ASRNetworkMapping', 'Remove-ASRPolicy', + 'Remove-ASRProtectionContainerMapping', 'Remove-ASRRP', + 'Remove-ASRRecoveryPlan', 'Remove-ASRReplicationProtectedItem', + 'Remove-ASRServicesProvider', + 'Remove-ASRStorageClassificationMapping', 'Remove-ASRvCenter', + 'Restart-ASRJob', 'Resume-ASRJob', 'Set-ASRAlertSetting', + 'Set-ASRNotificationSetting', 'Set-ASRReplicationProtectedItem', + 'Set-AzRecoveryServicesAsrNotificationSetting', + 'Set-AzRecoveryServicesAsrVaultSettings', + 'Start-ASRApplyRecoveryPoint', 'Start-ASRCommitFailover', + 'Start-ASRCommitFailoverJob', 'Start-ASRFO', 'Start-ASRPFO', + 'Start-ASRPlannedFailoverJob', 'Start-ASRResyncJob', + 'Start-ASRResynchronizeReplicationJob', + 'Start-ASRSwitchProcessServerJob', 'Start-ASRTFO', + 'Start-ASRTFOCleanupJob', 'Start-ASRTestFailoverCleanupJob', + 'Start-ASRTestFailoverJob', 'Start-ASRUnplannedFailoverJob', + 'Stop-ASRJob', 'Update-ASRMobilityService', 'Update-ASRPolicy', + 'Update-ASRProtectionDirection', 'Update-ASRRecoveryPlan', + 'Update-ASRServicesProvider', 'Update-ASRvCenter' # DSC resources to export from this module # DscResourcesToExport = @() diff --git a/tools/StaticAnalysis/Program.cs b/tools/StaticAnalysis/Program.cs index 824e0dc3d037..601586069913 100644 --- a/tools/StaticAnalysis/Program.cs +++ b/tools/StaticAnalysis/Program.cs @@ -143,7 +143,7 @@ public static void Main(string[] args) } catch(Exception ex) { - analysisLogger.WriteError(ex.ToString()); + analysisLogger?.WriteError(ex.ToString()); throw ex; } finally diff --git a/tools/StaticAnalysis/StaticAnalysis.Netcore.csproj b/tools/StaticAnalysis/StaticAnalysis.Netcore.csproj index b213a0e2836c..2b199058f149 100644 --- a/tools/StaticAnalysis/StaticAnalysis.Netcore.csproj +++ b/tools/StaticAnalysis/StaticAnalysis.Netcore.csproj @@ -3,19 +3,20 @@ Exe netcoreapp2.1 + latest false true + false + $(ProjectDir)..\..\src\Package\StaticAnalysis\ TRACE;DEBUG;NETSTANDARD - latest TRACE;NETSTANDARD - latest diff --git a/tools/Tools.Common/Loggers/AnalysisLogger.cs b/tools/Tools.Common/Loggers/AnalysisLogger.cs index 67c7a0954e72..dbb452f73e23 100644 --- a/tools/Tools.Common/Loggers/AnalysisLogger.cs +++ b/tools/Tools.Common/Loggers/AnalysisLogger.cs @@ -190,7 +190,7 @@ public void CheckForIssues(int maxSeverity) if (hasErrors) { throw new InvalidOperationException(string.Format("One or more errors occurred in validation. " + - "See the analysis repots at {0} for details", + "See the analysis reports at {0} for details", _baseDirectory)); } }