The integrator can deploy projects specified in a json file by downloading the artifacts of the specified job (default is `release`).
### Config
The config (json) file can look like the following:
```json
{
"apis":[
{
"name":"Coscine.Api.Project",
"version":"v1.3.0",
"url":"coscine/api/project"
},
{
"name":"Coscine.Api.User",
"version":"v1.1.0",
"url":"coscine/api/user"
},
{
"name":"Coscine.STS",
"version":"v1.2.1",
"url":"coscine/api/sts"
}
],
"apps":[
{
"name":"usersview",
"version":"v1.0.2",
"url":"coscine/app/usersview"
},
{
"name":"resourceview",
"version":"v1.0.1",
"url":"coscine/app/resourceview"
},
{
"name":"projectview",
"version":"v1.2.1",
"url":"coscine/app/projectview"
},
{
"name":"project2",
"version":"v1.3.1",
"url":"coscine/app/project"
},
{
"name":"login",
"version":"v1.1.0",
"url":"coscine/app/login"
}
]
}
```
Make sure to have the names prefix free (hence project2 and projectview).
The name must be the executable name for apis.
The above example would deploy all specified versions and remove any integrations wich is currently deployed, but not specified.
The version describes the tag or branch for the job artifacts.
When using a branch, also specifiy the job name.
Example for prerelease:
```json
{
"name":"login",
"version":"Topic-123/BranchNameTest",
"url":"coscine/app/login",
"job":"pre_release"
}
```
```
The artifacts of the job `pre_release` will be downloaded and used instead of the default job `release`. The job needs to be added to the pipeline definition of each project and run manually(see this [.gitlab-ci.yml](.gitlab-ci.yml) under `pre_release`).
Example for migrator:
```json
{
"scripts":[
{
"name":"Migrations",
"version":"v1.3.0",
"url":"coscine/cs/migrations",
"job":"cake:Release",
"scriptType":"Powershell.exe",
"command":"DEST_PATH\\Migrator.exe --migrate_up"
}
]
}
"DEST_PATH" will be replaced by the path of the downloaded and extracted folder.
scriptType defines the core command. Here we will use powershell to run the following command.
command takes in the arguments for script type. Here starting an executable with powershell.
Start the integrator by running integrator.exe and specify the json file with `--s` or `--source` and the destination of the integrations with `--d`" or `--destination`.
Use `-h` or `--help` for help.
Use `--purge` to force a redeploy of all integrations.
The parameter `--source` and `--destination` are mandatory, `--purge` is optional.