Summary
You need to change an object’s project when exporting and importing it across different servers.
Solution
Here’s an example that involves exporting an importing a procedure:
1. In order to export the DSL from one project you can do it with:
cd /CloudBeesCDInstallPath/bin ./ectool login admin ./ectool generateDsl --path /projects/yourProject/procedures/yourProcedure > procedure.dsl
2. After generating the procedure.dsl
file, you can change the original project with the new one by changing the literal projectName = 'OriginalProject'
to projectName = 'DestinationProject'
. For example:
sed -i "s/projectName = 'OriginalProject'/projectName = 'DestinationProject'/g" procedure.dsl
3. Once changed, you should copy this file to the new cluster and import the DSL by executing:
cd /CloudBeesCDInstallPath/bin ./ectool login admin ./ectool evalDsl --dslFile procedure.dsl