diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f2a4442 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,26 @@ +include: + - remote: https://raw.githubusercontent.com/DSD-DBS/capella-dockerimages/${CAPELLA_DOCKER_IMAGES_REVISION}/ci-templates/gitlab/diagram-cache.yml + - remote: https://raw.githubusercontent.com/DSD-DBS/py-capellambse/${CAPELLAMBSE_REVISION}/ci-templates/gitlab/model-badge.yml + - project: se-toolchain/capella-tools/rm-bridge/capella-polarion-mirror + ref: main + file: "/ci-templates/gitlab/synchronise_elements.yml" + +default: + tags: + - docker + +workflow: + rules: + - if: $CI_COMMIT_BRANCH == "main" + +generate-model-badge: + image: $DOCKER_REGISTRY/base + +variables: + CAPELLA_VERSION: 7.0.0 + ENTRYPOINT: "In-Flight Entertainment System.aird" + CAPELLA2POLARION_PROJECT_ID: inflighttest + CAPELLA2POLARION_MODEL_JSON: '{"path": "In-Flight Entertainment System.aird", "diagram_cache": "./diagram_cache"}' + CAPELLA2POLARION_CONFIG: capella2polarion_config.yaml + CAPELLA2POLARION_DEBUG: 1 + CAPELLAMBSE_PUSH_MODEL_BADGE: 0 diff --git a/capella2polarion_config.yaml b/capella2polarion_config.yaml new file mode 100644 index 0000000..a862d25 --- /dev/null +++ b/capella2polarion_config.yaml @@ -0,0 +1,127 @@ +# Copyright DB Netz AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +"*": # All layers + "*": # All class types + links: + - parent # Specify workitem links + - description_reference # Custom attribute + Class: + links: + - state_machines + serializer: + add_tree_diagram: + render_params: # All defaults + edgeRouting: POLYLINE + algorithm: LAYERED + direction: DOWN + partitioning: true + edgeLabelSide: SMART_DOWN + Diagram: + serializer: diagram + links: + - diagram_elements + - polarion_role: parent + capella_attr: target + Constraint: + serializer: linked_text_as_description + +sa: + SystemComponent: + - links: + - allocated_functions + serializer: add_context_diagram + - is_actor: true + polarion_type: systemActor + - is_actor: false + polarion_type: systemComponent + SystemFunction: + links: + - polarion_role: input_exchanges + capella_attr: inputs.exchanges + include: + Exchange items: exchange_items + - polarion_role: output_exchanges + capella_attr: outputs.exchanges + include: + Exchange items: exchange_items + - polarion_role: realized_functions + capella_attr: realized_functions + serializer: + add_context_diagram: + filters: + - SHOW_EX_ITEMS # functional exchange name and exchange item name + ComponentExchange: + links: + - allocated_functional_exchanges + serializer: add_context_diagram + FunctionalExchange: + links: + - exchange_items + ExchangeItem: + Capability: + polarion_type: systemCapability + serializer: + include_pre_and_post_condition: + add_context_diagram: + render_params: + display_symbols_as_boxes: true + links: + - involved_functions + - constraints + FunctionalChain: + polarion_type: functionalChain + links: + - polarion_role: involves + capella_attr: involved_functions + link_field: involved_functions + +la: + LogicalComponent: + - serializer: + add_context_diagram: + render_params: + display_parent_relation: true + include_inner_objects: true + - links: + - allocated_functions + - is_actor: true + polarion_type: logicalActor + - is_actor: false + polarion_type: logicalComponent + CapabilityRealization: + serializer: include_pre_and_post_condition + links: + - constraints + LogicalFunction: + polarion_type: logicalFunction + serializer: + add_context_diagram: + filters: + - SHOW_EX_ITEMS + links: + - polarion_role: input_exchanges + capella_attr: inputs.exchanges + include: + Exchange Items: exchange_items + - polarion_role: output_exchanges + capella_attr: outputs.exchanges + include: + Exchange Items: exchange_items + - realized_functions + ComponentExchange: + polarion_type: logicalComponentExchange + serializer: add_context_diagram + links: + - allocated_functional_exchanges + FunctionalExchange: + polarion_type: logicalFunctionalExchange + links: + - exchange_items + ExchangeItem: + FunctionalChain: + polarion_type: functionalChain + links: + - polarion_role: involves + capella_attr: involved_functions + link_field: involved_functions