Managing projects
Share project
To share a project with other users or teams, open the project and navigate to the Overview page and then select the Share project capability at the top right of the page. Then you are asked to enter the following information for sharing the project as an asset:
- Asset Name: The display name of the asset (required)
- Asset Catalog: The catalog name in which you want to share this asset (required)
- Version: The version of this asset (e.g. 1.0.0). Each version will be represented as its own asset in the selected catalog (required)
- Tags: Tags that allow other users to search for (optional)
- Contributed By: Name or organization (required)
- Description: Description of the asset (optional)
- Replace existing version: If enabled, it will replace the existing version of this asset. By default, it is disabled (optional)
Confirming the entries will create an asset in the selected asset catalog, which can be reused by other users having access to this asset catalog.
The Share project button will only be enabled for user's having either of the below mentioned accesses:
- admin access in Git and dc_developer in Solution Designer.
- write access in Git and dc_developer in Solution Designer.
- write access in Git and dc_analyst in Solution Designer.
Export an Asset as a zip file
This feature allows user to download an asset as a zip file and then share this asset to a different cluster without having a direct connection between two systems/cluster. To Download an asset as a zip file, user need to use the api interface for k5-asset-manager. By default the external route for service is disabled and can be enabled by updating the configuration in Extended configuration. Once the route is enabled use the api "/export" with GET method and following parameters:
- catalogAlias: Alias of the asset catalog where asset is available
- acronym: Acronym for the asset that need to be exported
- version: asset version to be exported
Curl for api call:
curl -X 'GET' \
'{{K5_ASSET_MANAGER_BASE_URL}}/api/v1/{{catalogAlias}}/assets/{{acronym}}/{{version}}/export' \
-H 'accept: application/json; charset=utf-8' \
-H 'Authorization: Bearer {{Bearer_Token}}'
Once this api request is successful, the asset will be available to download as a zip file.
Import Asset from Zip
This feature allows user to use the zip file of an asset exported with Export Asset and import it as a new asset in a different designer/cluster. To import an asset from a zip file, user need to use the api interface for k5-asset-manager. By default the external route for service is disabled and can be enabled by updating the configuration in Extended configuration.
Use the api "/importAsset" with GET method and following parameters:
- file: zip file from previous step
- catalogAlias: Alias of the asset catalog in new designer where asset has to be shared
- gitProviderAlias: git provider alias in the new designer where user want to store the asset
- groupKey: groupKey in the new designer where user want to store the asset
- repositoryKey: repositoryKey in the new designer where user want to store the asset, this can be same as acronym of original asset only if it's already not used by a different service project in the designer where we want to import the asset. Multiple versions of same asset can use the same acronym.
Curl for api call:
curl -X 'POST' \
'{{K5_ASSET_MANAGER_BASE_URL}}/api/v1/{{catalogAlias}}/assets/importAsset' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {{Bearer_Token}}' \
-H 'Content-Type: multipart/form-data' \
-F 'file={{ASSET_ZIP}};type=application/zip' \
-F 'gitProviderAlias={{GIT_PROVIDER_ALIAS}}' \
-F 'groupKey={{GROUP_KEY}}' \
-F 'repositoryKey={{REPOSITORY_KEY}}'
Once this API operation is successful, the asset should be available to use in the catalog {{catalogAlias}}
with the acronym specified in the request.
Import Service Project from GIT repository
In case you have an already existing Service Project in a connected GIT repository, you can now simply import it to the Solution Designer. Either in a Workspace you click on Add project and then select Create project from repository or in the Project Overview you select in the DropDown Creat project from repository.
In the action you have to provide the following data:
- Project Acronym: used for the project in the GIT repository
- Git Provider: select the Git provider where the project is stored
- Repository Group: select the repository group where the project is located
After clicking Create the project will be created in the Solution Designer.
As a pre-requisite for the import the files in the connected GIT repository must comply with the structure of the projects.
If the project acronym already exists in the Solution Designer or the project cannot be found in the repository, a error message is shown.
Project configuration files in service projects
In each service project, there is a project configuration file created automatically in the root directory. It holds meta data about the project, as well as project specific configurations e.g. which extensions are enabled.
For projects, created with version 4.1.0 or earlier, the project configuration is stored in the file solution.yml.
After version 4.1.0, projects that are based on a Java Spring Boot Stack, also allow the file k5-project.yml to hold advanced project configuration. It unlocks additional capabilities, e.g. the disabling of extensions in the project. Nevertheless, projects having a solution.yml
file are still valid. If both solution.yml
and k5-project.yml
files are provided, the precedence will be given to k5-project.yml
.
Please consider, that a commit via the Solution Designer will automatically migrate your solution.yml
into a k5-project.yml
.
For more information and the dataformat please see Project configuration files
Delete project
To delete a service project or a single branch of a service project, open it in Solution Designer, navigate to the Overview page and select the Delete project or the Delete current branch capability. Then you are asked to confirm the deletion.
Delete is only shown if the user has the needed privileges granted in the Git repository.
When deleting a service project, multiple steps are done in order to clean up the project properly. The following list shows the data that is cleaned up while deleting:
- Artifacts of the project in the database
- Cached data related to that project
- Git repository with its data
- All deployments of the service project that are deployed via a deploy pipeline
Restoring a deleted project is not possible.
When deleting a single branch of a service project, you have the option to check wether the branch should be deleted only locally, or if also the related remote branch in the repository should be deleted.
The following list shows the data that is cleaned up while deleting:
- Artifacts of the project in the database
- Cached data related to that project
- Git repository with its data (optional)
Restoring a deleted project is not possible.