PCM Development/Build Infrastructure/Build Tools

Aus SDQ-Wiki

Scripts

Branch Protection

Each master/main branch of the repositories of MDSD-Tools or Palladio Simulator is protected from directly committing changes to the branch. Contributing to a master/main branch is only done via pull requests.

Disableing Branch Proctection for Administrators

For e.g. release, some changes are best done in batches, using scripts. For these kinds of changes, the branch protection rules need to be briefly adjusted, so the rule does not include administrators.

A script to disable the branch protection for administrators can be found here Link to SVN.

It is important to directly enable branch protection for administrators after changes are made.

Creating new Branch Protection Rules

In case new branch protection rules need to be created for all repositories, the same script from above can be used. Using the GraphQLquery language, branch protection rules can be created, even for branches that do not already exist.

However, changing branch protection rules with GraphQL, using a script is not straightforward. When changes to rules need to be made, use the old API, which is also used for disabling branch protection for administrators.

Batch Execution of Changes

Scripts can be found here (LINK to SVN) and adapted as needed.