FusionForge

Forge command line/6.1

From FusionForge Wiki
Revision as of 14:49, 1 November 2017 by Nerville (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page in other versions: master


FusionForge provides a php script forge located in ~/bin/ which supports general commands to perform such as plugins activation/deactivate and some import/export features.

This script has a basic internal help:

 ./forge help

Plugin Activation/Deactivation

It provides the capability to activate or deactivate forge-wide a plugin.
To activate:

 ./forge pluginActivate <name_of_the_plugin>

To deactivate:

 ./forge pluginDeactivate <name_of_the_plugin>

Import/Export functions

File Format

Import & export functions support 2 file formats:

  • json (default)
  • raw: this format is pure PHP Array.

The export functions echo information on stdout. To generate a file, redirect the stdout to a file.

Get binary data to an export element

By default, all export function does not retrive any binary data (documents, artifact attachments, etc.). To retrieve the binary data, use the getZipDump function. This function generates a zip with all binary data as described in the parameter file.

 ./forge getZipDump <parameter_file> [json|raw]

How to generate import files

The easiest way to generate import files is to use export functions, i.e: use userDump to generate the json file, then modify this file to reflect the needs and use it as import file.

User

To export an existing user:

 ./forge userDump <user_id> [json|raw]

To import an user:

 ./forge userImport <file> [json|raw]

Sample import json file:

 {
     "data_array": {
         "user_name": "admin",
         "email": "root@localhost.localdomain",
         "firstname": "Forge",
         "lastname": "Admin",
         "theme_id": "5",
         "password": "Inject123$",
     }
 }

The command line supports user by user import only. To import multiple users, create one file per user then loop on the files to call the forge userImport function.

Project

The forge command line supports import and export project.

To export a project:

 ./forge groupDump <group_id> [json|raw]

To import a project:

 ./forge groupImport <file> [json|raw]

The command line supports project by project import only. To import multiple projects, you need to loop on the groupImport function.

Document Management

The forge command line supports document, folder or the full document management import/export.

To export a document:

To import a document:

To export a folder:

To import a folder:

To export the full document management:

To import the full document management:

Tracker

The forge command line supports artifact or tracker export/import.

To export an artifact:

 ./forge artifactDump <artifact_id> [json|raw]

To import an artifact:

 ./forge artifactImport <file> [json|raw]

To export a tracker:

 ./forge trackerDump <tracker_id> [json|raw]

To import a tracker:

 ./forge trackerImport <file> [json|raw]

File Release System

Project Management

Survey

Forums