Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Import plan - Nullable object must have a value.
-
Hi,
I export a deployment plan, but when I try to import it to another application I get
a Nullable object must have a value exception.
The xml I am trying to import is :
<?xml version="1.0" encoding="utf-8"?> <DeploymentPlan xmlns="http://inedo.com/schemas/buildmaster/2014/05/bmxplan"> <Servers> <Server Id="1" LastModified="2000-01-01T00:00:00Z">DUB6WSD56001</Server> </Servers> <Providers /> <ActionGroup DeploymentPlanActionGroupId="3292" DeploymentPlanActionGroupSequence="1" ActionGroupId="3287" Active="Y" Shared="N" Parallel="N" IterateServers="N" IterateDeployables="N" OnFailureContinue="N"> <Name>Get Labelled Source Version From Perforce</Name> <Description>Actions in this group should label or tag a path in source control and then retrieve code from that path.</Description> <Actions> <Action ActionSequence="1" ServerId="1" RetryCount="0" Active="Y" ResumeNextOnFailure="N" LogFailureAsWarning="N" Name="Get Source from $SCMDir Labeled $ReleaseNumber.$BuildNumber" Description="to $CurrentDirectory"> <Inedo.BuildMaster.Extensibility.Actions.SourceControl.GetLabeledAction Assembly="BuildMasterExtensions"> <Properties UserDefinedLabel="$ReleaseNumber.$BuildNumber" SourcePath="$SCMDir" ClearTargetDirectory="False" ProviderId="7" LogErrorsAsWarnings="False" _ExecutionId="0" OverriddenTargetDirectory="" Timeout="0" /> </Inedo.BuildMaster.Extensibility.Actions.SourceControl.GetLabeledAction> </Action> <Action ActionSequence="2" ServerId="1" RetryCount="0" Active="Y" ResumeNextOnFailure="N" LogFailureAsWarning="N" Name="Set File Attributes" Description="Clear read-only flag on files matching * in (default)."> <Inedo.BuildMaster.Extensibility.Actions.Files.SetFileAttributesAction Assembly="BuildMasterExtensions"> <Properties FileMasks="*" Recursive="True" ReadOnlyState="False" OverriddenSourceDirectory="" Timeout="0" /> </Inedo.BuildMaster.Extensibility.Actions.Files.SetFileAttributesAction> </Action> </Actions> </ActionGroup> <ActionGroup DeploymentPlanActionGroupId="3293" DeploymentPlanActionGroupSequence="2" ActionGroupId="3288" Active="Y" Shared="N" Parallel="N" IterateServers="N" IterateDeployables="N" OnFailureContinue="N"> <Name>Copy the Source as a reference</Name> <Description>So we can record the source used for the build. Note we do not build the source - we deploy from the artifact</Description> <Actions> <Action ActionSequence="1" ServerId="1" RetryCount="0" Active="Y" ResumeNextOnFailure="N" LogFailureAsWarning="N" Name="Synchronize Directory Contents" Description="of $BuildSrcDir\$EnvironmentName\$ApplicationName\ with files and directories from $CurrentDirectory" TargetServerId="1"> <Inedo.BuildMaster.Extensibility.Actions.Files.TransferFilesAction Assembly="BuildMasterExtensions"> <Properties SourceDirectory="" TargetDirectory="$BuildSrcDir\$EnvironmentName\$ApplicationName\" DeleteTarget="True" IncludeFileMasks="*" Timeout="0" /> </Inedo.BuildMaster.Extensibility.Actions.Files.TransferFilesAction> </Action> </Actions> </ActionGroup> <ActionGroup DeploymentPlanActionGroupId="3294" DeploymentPlanActionGroupSequence="3" ActionGroupId="3289" Active="Y" Shared="N" Parallel="N" IterateServers="N" IterateDeployables="N" OnFailureContinue="N"> <Name>Deploy App</Name> <Description>Deploy the artifacts created in the build actions, and then any configuration files needed.</Description> <Actions> <Action ActionSequence="1" ServerId="1" RetryCount="0" Active="Y" ResumeNextOnFailure="N" LogFailureAsWarning="N" Name="Deploy $ApplicationName Artifact" Description="to $BuildDropDir\$EnvironmentName\$ApplicationName\"> <Inedo.BuildMaster.Extensibility.Actions.Artifacts.DeployArtifactAction Assembly="BuildMasterExtensions"> <Properties ArtifactName="$ApplicationName" DeployAsZipFile="False" DoNotClearTargetDirectory="False" LogIndividualFiles="False" OverriddenTargetDirectory="$BuildDropDir\$EnvironmentName\$ApplicationName\" Timeout="0" /> </Inedo.BuildMaster.Extensibility.Actions.Artifacts.DeployArtifactAction> </Action> </Actions> </ActionGroup> </DeploymentPlan>
What is the Issue?
Product: BuildMaster
Version: 4.3.6
-
It looks like the the import is not supplying the correct arguments to the page. As a hacky workaround until we get it in the next maintenance release, you can get this to work by visiting the import URL directly:
http://buildmaster-server/plans/import?applicationId={appId}&environmentId={envId}
(replacing the application and environment IDs with the correct target IDs, which can be found in the URL when selecting that environment's deployment plan in the navigation menu: http://buildmaster-server/applications/{appId}/plans#environment-{envId} )
-
Thanks.
Not sure if it is connected, but when I tried to clone the same application via the duplicate existing application I got a 500 Internal Server Error.
Tim
-
The cloning error would be unrelated. Can you post the error that you got attempting to clone the application? We are scheduling a maintenance release either today or tomorrow and would like to include a fix for that if it's broken as well.
-
Not really much to add. I select the application for duplication and the message appears:
500- Internal server error There is s problem with the resource you are looking for, and it cannot be displayed.
There are no errors in the messages log.
It seems to happen with the simplest of applications. For example, I have a set of old dos scripts that I store on the build server as a central repository. So there are no other servers involved. The application consists of one deployment plan - outlined below. But the duplicate application function cannot copy it.
To be honest I have always found the create application options very buggy. Another example is the Create New .Net Application wizard. Having selected the provider and file, the next button moving onto projects also crashes with the same internal error.
I normally create a standard application and import the xml from another app, amending where required.
Is there somewhere I can look to provide you with more information?
<?xml version="1.0" encoding="utf-8"?>
<DeploymentPlan xmlns="http://inedo.com/schemas/buildmaster/2014/05/bmxplan">
<Servers>
<Server Id="1" LastModified="2000-01-01T00:00:00Z">DUB6WSD56001</Server>
</Servers>
<Providers />
<ActionGroup DeploymentPlanActionGroupId="3197" DeploymentPlanActionGroupSequence="1" ActionGroupId="3192" Active="Y" Shared="N" Parallel="N" IterateServers="N" IterateDeployables="N" OnFailureContinue="N">
<Name>Apply Label to Source Control</Name>
<Description>Applies the label to Source control</Description>
<Actions>
<Action ActionSequence="1" ServerId="1" RetryCount="0" Active="Y" ResumeNextOnFailure="N" LogFailureAsWarning="N" Name="Apply Label" Description="Apply label "%RELNO%.%BLDNO%" to files in %SCMDir%">
<Inedo.BuildMaster.Extensibility.Actions.SourceControl.ApplyLabelAction Assembly="BuildMasterExtensions">
<Properties UserDefinedLabel="%RELNO%.%BLDNO%" SourcePath="%SCMDir%" ProviderId="7" Timeout="0" />
</Inedo.BuildMaster.Extensibility.Actions.SourceControl.ApplyLabelAction>
</Action>
</Actions>
</ActionGroup>
<ActionGroup DeploymentPlanActionGroupId="3198" DeploymentPlanActionGroupSequence="2" ActionGroupId="3193" Active="Y" Shared="N" Parallel="N" IterateServers="N" IterateDeployables="N" OnFailureContinue="N">
<Name>Get Latest Source From Perforce</Name>
<Description>Actions in this group should label or tag a path in source control and then retrieve code from that path.</Description>
<Actions>
<Action ActionSequence="1" ServerId="1" RetryCount="0" Active="Y" ResumeNextOnFailure="N" LogFailureAsWarning="N" Name="Get Labeled" Description="Get Source Labeled '%RELNO%.%BLDNO%' from %SCMDir% to default directory.">
<Inedo.BuildMaster.Extensibility.Actions.SourceControl.GetLabeledAction Assembly="BuildMasterExtensions">
<Properties UserDefinedLabel="%RELNO%.%BLDNO%" SourcePath="%SCMDir%" ProviderId="7" OverriddenTargetDirectory="" Timeout="0" />
</Inedo.BuildMaster.Extensibility.Actions.SourceControl.GetLabeledAction>
</Action>
</Actions>
</ActionGroup>
<ActionGroup DeploymentPlanActionGroupId="3199" DeploymentPlanActionGroupSequence="3" ActionGroupId="3194" Active="Y" Shared="N" Parallel="N" IterateServers="N" IterateDeployables="N" OnFailureContinue="N">
<Name>Copy Scripts into Production</Name>
<Description>Deploy the artifacts</Description>
<Actions>
<Action ActionSequence="1" ServerId="1" RetryCount="0" Active="Y" ResumeNextOnFailure="N" LogFailureAsWarning="N" Name="Create Build Artifact" Description="Create '%APPNAME%' Artifact from (default directory)">
<Inedo.BuildMaster.Extensibility.Actions.Artifacts.CreateArtifactAction Assembly="BuildMasterExtensions">
<Properties ArtifactName="%APPNAME%" OverriddenSourceDirectory="" Timeout="0" />
</Inedo.BuildMaster.Extensibility.Actions.Artifacts.CreateArtifactAction>
</Action>
<Action ActionSequence="2" ServerId="1" RetryCount="0" Active="Y" ResumeNextOnFailure="N" LogFailureAsWarning="N" Name="Deploy Build Artifact" Description="Deploy '%APPNAME%' Artifact to %DeployDosScripts%">
<Inedo.BuildMaster.Extensibility.Actions.Artifacts.DeployArtifactAction Assembly="BuildMasterExtensions">
<Properties ArtifactName="%APPNAME%" DeployAsZipFile="False" DoNotClearTargetDirectory="False" LogIndividualFiles="False" OverriddenTargetDirectory="%DeployDosScripts%" Timeout="0" />
</Inedo.BuildMaster.Extensibility.Actions.Artifacts.DeployArtifactAction>
</Action>
</Actions>
</ActionGroup>
</DeploymentPlan>
-
You'd have to disable the custom errors in all settings, but regardless, we believe the problem was that the clone procedure would fail if the database user did not have ALTER permissions on a certain table (don't worry, we weren't doing anything crazy -- just an identity insert). We've reworked them so that this is no longer a requirement. We'll have a maintenance release out today that should resolve it.