CI/CD Project
Thibault
Posts: 7 New member
Hi,
I'm trying to create a database release and deploy it through Octopus.
Unfortunately, after extracting the build to the location, the create database release step cannot find the specified package.
Deploy of package (Download Database Package):
I'm trying to create a database release and deploy it through Octopus.
Unfortunately, after extracting the build to the location, the create database release step cannot find the specified package.
Deploy of package (Download Database Package):
10:02:02 Info | Deploying package: D:\Octopus\Tentacles\SQL_UAT\Files\AccountsDb.Metering@S1.0.4@1BD081527BDE4E4699D858E245E52DCC.nupkg<br>10:02:03 Verbose | Extracting package to: D:\Octopus\Tentacles\SQL_UAT\Applications\UAT\AccountsDb.Metering\1.0.4<br>10:02:03 Verbose | Extracted 2 files<br>10:02:03 Verbose | The package has been installed to: D:\Octopus\Tentacles\SQL_UAT\Applications\UAT\AccountsDb.Metering\1.0.4<br>10:02:03 Verbose | If you would like the package to be installed to an alternative location, please use the 'Custom installation directory' feature<br>10:02:03 Verbose | Adding journal entry:<br>10:02:03 Verbose | <Deployment Id="5f2c8327-200a-412d-b096-e2eb25d05302" EnvironmentId="Environments-2" TenantId="" ProjectId="Projects-1406" InstalledOn="2020-07-06 08:02:03" RetentionPolicySet="Environments-2/Projects-1406/Step-Download Database Package/Machines-642/<default>" ExtractedTo="D:\Octopus\Tentacles\SQL_UAT\Applications\UAT\AccountsDb.Metering\1.0.4" CustomInstallationDirectory="D:\Octopus\Tentacles\SQL_UAT\Applications\UAT\AccountsDb.Metering\1.0.4" WasSuccessful="True"><br>10:02:03 Verbose | <Package PackageId="AccountsDb.Metering" PackageVersion="1.0.4" DeployedFrom="D:\Octopus\Tentacles\SQL_UAT\Files\AccountsDb.Metering@S1.0.4@1BD081527BDE4E4699D858E245E52DCC.nupkg" /><br>10:02:03 Verbose | </Deployment>Error in Create database release
10:03:08 Info | Path: D:\Octopus\Tentacles\SQL_UAT\Applications\UAT\AccountsDb.Metering\1.0.4<br>10:03:08 Error | Import-DatabaseBuildArtifact : The file or folder is not a valid build artifact: 'D:\Octopus\Tentacles\SQL_UAT\Applicat<br>10:03:08 Error | ions\UAT\AccountsDb.Metering\1.0.4'<br>10:03:08 Error | At D:\Octopus\Tentacles\SQL_UAT\Work\20200706080207-708781-98\Script.ps1:288 char:26<br>10:03:08 Error | + ... portedBuildArtifact = Import-DatabaseBuildArtifact -Path $packagePath<br>10:03:08 Error | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>10:03:08 Error | + CategoryInfo : InvalidData: (D:\Octopus\Tent....Metering\1.0.4:String) [Import-DatabaseBuildArtifact],<br>10:03:08 Error | TerminatingException<br>10:03:08 Error | + FullyQualifiedErrorId : InvalidBuildArtifact,RedGate.Versioning.Automation.PowerShell.Commands.ImportDatabaseBui<br>10:03:08 Error | ldArtifactCommand<br>10:03:08 Verbose | Process C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in D:\Octopus\Tentacles\SQL_UAT\Work\20200706080207-708781-98 exited with code 1<br>10:03:19 Verbose | Updating manifest with output variables<br>10:03:19 Verbose | Updating manifest with action evaluated variables<br>10:03:19 Fatal | The remote script failed with exit code 1<br>10:03:19 Fatal | The action Redgate - Create Database Release on VMWAUTSQLA01 Jumpbox UAT failedAny help would be greatly appreciated.
Thanks in advance!
[Edit] I added the log file to be sure.
Tagged:
Best Answer
-
DanC Posts: 637 Gold 5Hi @Thibault
Thanks for confirming that for me! so from the logs it looks like you're potentially using the wrong Runner type as it's looking for a SQL Source Control project.Validating SQL Source Control project 'D:\TeamCity\BuildAgent1\work\98432a360a2ad247'.
Could you check that's the case for me?
The following documentation should help: https://documentation.red-gate.com/sca/deploying-database-changes/add-ons/teamcity/use-the-teamcity-plugin-with-a-sql-change-automation-projectKind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
Answers
Sorry to hear you're experience this issue!
I've noticed that the two paths are slightly different and end up cutting off after "\Octopus\Tentacles\SQL_UAT"
Can you verify if that's the case?
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
"D:\Octopus\Tentacles\SQL_UAT\Applications\UAT\AccountsDb.Metering\1.0.4"
this path seems to be the same everywhere.
Or am I missing one?
Apologies, Ignore my last remark I got confused with the pathing.
So looking at the logs it looks like the following is occurring
- Deploying package: \Octopus\Tentacles\SQL_UAT\Files\AccountsDb.Metering@S1.0.4@1BD081527BDE4E4699D858E245E52DCC.nupkg
- Extracting package to: \Octopus\Tentacles\SQL_UAT\Applications\UAT\AccountsDb.Metering\1.0.4
- The package has been installed to: \Octopus\Tentacles\SQL_UAT\Applications\UAT\AccountsDb.Metering\1.0.4
- Path: \Octopus\Tentacles\SQL_UAT\Applications\UAT\AccountsDb.Metering\1.0.4
- The file or folder is not a valid build artifact: 'D:\Octopus\Tentacles\SQL_UAT\Applications\UAT\AccountsDb.Metering\1.0.4'
If you go to that folder location does the package exist and is it a ".nupkg"?
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
I don't know how to fix this.
That's very odd and I suspect there's something going on with the package creation.
Can I ask how you're creating the package?
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
Thanks for that, could you send me TeamCity logs for the creation of that package?
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
Thanks for sharing that with me!
Can I check with you, are you using a SQL Source Control project as the source?
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
Ah brilliant, glad you managed to find the issue!
You're most welcome and if you have any other issues don't hesitate to contact us at Redgate Support!
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?