Moving a project between two factories
The export / import feature has been developed to migrate a project from one redpesk factory to another.
The export creates a
.zip archive that you download, and then you import this archive where you want to have the same/new project.
The archive from the export contains all the metadata of the project and his applications, but builds and tests for instance are not exported.
So you will have to re-build the project in the new factory.
In addition, the project’s members are not saved in the project archive.
- For now, we don’t support the import of project with dependencies
- For now, the export / import is available only for a standard project
In order to export follow these steps:
- Go on “Projects” tab
- Click on the project you want to export
- Then go on under “ACTIONS” tab
- Then scroll down up to “Export project” section
- Click on “GENERATE EXPORT”
- At the end click on “DOWNLOAD EXPORT”
It is also possible to export a project from redpesk command line, alias
rp-cli. In order to do that you only need the slug of the project you want to export and the directory where you want to download the project archive.
In order to get the slug of your project, you can use the
rp-cli projects list as below.
$ rp-cli projects list
ID Slug Name Version Type
73027643-f827-40c4-ad13-86748c0b99b6 iot-project IOT Project [Not set] standard
1fd09a37-cf76-4ce0-9833-b7c346381aa6 my-new-project New project [Not set] standard
b1a06375-0d28-4091-b9d6-4603cebe85dd redpesk-ci Redpesk CI [Not set] standard
77a6df2a-918a-4fff-a108-8c5f0ab4dc80 redpesk-industrial Redpesk Industrial [Not set] standard
74c88f7a-3f5a-4072-bb29-2291fa8bc05a redpesk-industrial-image Redpesk Industrial Image [Not set] standard
Then, run the following command (adapt the target repository to your configuration):
$ rp-cli projects export start redpesk-industrial -d /tmp/
-- Project export requested by user --
Requesting export of project "redpesk-industrial"... [OK]
Waiting for export to be complete... [OK]
Downloading the archive... [OK]
Path to the exported project archive: /tmp/redpesk-industrial_export_archive.zip
As said by
rp-cli, the project is saved in the given directory.
For now, the exported project must be imported in a factory which has the same distribution(s) as the original project.
In order to import follow these steps:
- Go on ”+ PROJECT”
- Click on “Import project”
- Click on “UPLOAD PROJECT FROM A FILE”
- Select your *_export_archive.zip you have downloaded above
- Click on “Open”
- Click on “UPLOAD FILE”
- At the end click on “IMPORT PROJECT”
Now you can build your new imported project!
As for export, it is possible to import a project from
rp-cli. In order to do that you only need to pass the project archive to
rp-cli in the following command line.
$ rp-cli projects import start --file /tmp/redpesk-industrial_export_archive.zip
-- Project import requested by user --
Uploading the project archive... [OK]
Requesting for project import... [OK]
Waiting for import to be complete... [OK]
If everything is “[OK]” you are now able to see your project in the webUI or with
rp-cli, using the
rp-cli projects list command.