Octo project import says "

I’m trying to import one project that has been exported on antoher server. When I do I get this message The Project must be assigned to a lifecycle. Here’s what I tried:

PS C:\Users\jowe\> octo import --server=https://octopus/api --apiKey=API-key--type=project --filePath=.\bbapi-octopus-export.json
Octopus Deploy Command Line Tool, version 2.5.10.39

Handshaking with Octopus server: https://octopus.episerver.net/api
Handshake successful. Octopus version: 2.6.0.778; API version: 3.0.0
Finding importer 'project'
Beginning the import
Export file successfully loaded
Checking that all environments exist
Checking that all machines exist
Checking that all NuGet Feeds exist
Checking that all Library Variable Sets exist
Checking that the Project Group exist
Beginning import of project 'BBAPI'
Importing Project
Project does not exist, a new project will be created
Error from Octopus server (HTTP 400): There was a problem with your request.

 - The project must be assigned to a lifecycle.

Exit code: -7

Is there an easy way to make them import work on a newer server that has the Lifecycle option?

Maybe just make the import use the default lifecycyle?

Hi Joakim,

We have a bug on GitHub for this issue, https://github.com/OctopusDeploy/Issues/issues/1421, and it is included in our next sprint of work to complete, so there should be a fix for this within the next couple of weeks.

Thank you and kind regards,
Henrik

Is there any way to manually edit the json file to get it to import? If not then we’ll just manually create our project in production if we have to.

Hi Aaron,

You can open the exported JSON file and add LifecycleId: "<IdOfDefaultLifecycleInProduction>", to the exported project, it should then import successfully.

You can of course specify any lifecycle id that exists on your Production server.

Hope that helps!

Thank you and warm regards,
Henrik

I can’t seem to get it to work. Is there a specific location within the file I need to add this line? Right now I’m putting it after the Links property of the Project.

Thanks,
Aaron

Hi Aaron,

Sorry about that, if you put it after the ProjectGroupId property in the JSON that should work.

Thank you and warm regards,
Henrik

I still couldn’t get this to work. I grabbed the default lifecycle import branch off of git and compiled it and got my project imported.