Skip to content

Commit

Permalink
feat: Add gitlab CI/CD pipeline and c2p sync config
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger committed Sep 18, 2024
1 parent 938d5f0 commit c16852c
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -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
127 changes: 127 additions & 0 deletions capella2polarion_config.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c16852c

Please sign in to comment.