Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Improves the documentation for a clearer understanding #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

## Unreleased
### Added
- A GitHub workflow that automatically triggers the execution of a renovate bot
- A GitHub workflow that lets the user manually trigger the execution of a renovate bot
### Changed

### Fixed
- Minor changes in the user documentation for better understanding
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These owners will be the default owners for everything in the repo.
# Unless a later match takes precedence, the listed user will be
# requested for review when someone opens a pull request.
* @sjuergen @ReinerSchinkoethe @theBadT @dschafhauser @Stefan-J-Hanke
* @sjuergen @ReinerSchinkoethe @theBadT @BeckerStS
67 changes: 67 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
**Royalty-free Software provided by Siemens on sharing platforms for developers/users of Siemens products**

**1. General information: Software in source code and object code**

**1.1 Use of the Software**

Siemens AG and/or a subsidiary of Siemens AG ("Siemens") provides You royalty-free container images, application examples, sample code and software development kits ("Software") through sharing platforms (e.g. GitHub, DockerHub, NuGet, etc.). The Software shall only be used for the development and test of software which can be used with Siemens products ("intended purpose"). The Software is non-binding and makes no claim to completeness or functionality. The Software merely offers help with typical tasks and provides an environment for developing and testing applications and other software. You Yourself are responsible for the proper and safe operation of Your products in accordance with applicable regulations and must also check the function of the results of the Software and customize Your products. Siemens reserves the right to make changes to the Software at any time without notice. Software may be provided in object code and/or source code format. Unless explicitly granted in the open source license according to article 2, You shall not decompile, translate, extract, modify or distribute the Software.

**1.2 Security information**

Siemens provides products and solutions with industrial security functions that support the secure operation of plants, systems, machines and networks.

In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept. Siemens' products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines and networks. Such systems, machines and components should only be connected to an enterprise network or the internet if and to the extent such a connection is necessary and only when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.

For additional information on industrial security measures that may be implemented, please visit
<https://www.siemens.com/industrialsecurity>.

**1.3 Compliance with Export Control Regulations**

You shall comply with all applicable sanctions, embargoes and (re-)export control regulations, and, in any event, with those of the European Union and the United States of America (collectively "Export Regulations"). In particular, the information, software and documentation provided by Siemens (collectively "Licensed Material") shall not be used, accessed or transferred, unless permitted by the Export Regulations or respective governmental licenses or approvals, (i) in or to any location prohibited by or subject to comprehensive sanctions (currently Russia, Cuba, Iran, North Korea, Syria, and the Crimea region of Ukraine, Donetsk and Luhansk regions of Ukraine) or license requirements according to the Export Regulations; (ii) by or to any individual or entity designated on a sanctioned party list of the Export Regulations; (iii) for any purpose prohibited by the Export Regulations (e.g. use in connection with armaments, nuclear technology or weapons); or (iv) to upload any content unless it is noncontrolled (e .g. in the EU: AL = N; in the U.S.: ECCN = N or EAR99). If required to enable authorities or Siemens to conduct export control checks, You, upon request by Siemens, shall promptly provide Siemens with all information pertaining to You, the intended use and the location of use of the Licensed Material. Siemens shall not be obligated to fulfill this Agreement if such fulfillment is prevented by any impediments arising out of national or international foreign trade or customs requirements or any embargoes or other sanctions.

**1.4 Hyperlinks and third party content**

The Software and / or the documentation may contain hyperlinks to the web pages of third parties or references to third party content. Siemens shall have no liability for the contents of such web pages and does not make representations about or endorse such web pages or their contents as its own, as Siemens does not control the information on such web pages and is not responsible for the contents and information given thereon. The use of such web pages shall be Your sole risk.

**2. Open Source License for Software provided in source code and the generated source code**

In case the Software contains or generates source code the following open source license (Open license terms) shall apply for such source code:

MIT License

Copyright 2022 Siemens AG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

To the extent there is a conflict between this terms and conditions and the Open License Terms, the Open License Terms shall prevail over this terms and conditions with regard to source code.

You acknowledge and agree that Siemens provides no warranties, express or implied, for the open source software itself. Siemens shall have no liability nor shall Siemens provide any indemnification whatsoever in respect of Your distribution or modification of the open source software.

**3. Software provided in object code**

For all portions of the Software that are provided in object code format the following conditions shall apply ("Royalty-Free Siemens Software Conditions"):

**3.1 License Grant**

Siemens grants You the royalty-free, non-exclusive, non-sublicensable and non-transferable right to use, have used the Software by technically trained personnel and for the intended purpose only.

**3.2 Included third-party software components**

Insofar as Open Source Software is included in the Software, such Open Source Software is listed in the Readme_OSS file of the Software. You are entitled to use the Open Source Software in accordance with the respective applicable license conditions of the Open Source Software. These OSS license conditions are included with Software and shall prevail over these Royalty-Free Siemens Software Conditions. The Open Source Software license conditions shall have priority also in relation to the proprietary Siemens components insofar as the Open Source Software license conditions grant You certain rights of use on the basis of the connection of OSS components with proprietary Siemens components.

Siemens shall make available to You, at Your request, the Open Source Software source code in return for payment of a fee to compensate for expenses insofar as the license conditions of the Open Source Software require such release of the source code.

The Software may, in addition to Open Source Software, contain other licensed software, i.e. software which was not developed by Siemens itself, but which Siemens has obtained from third parties, e.g. Microsoft Ireland Operations Ltd, under a license. If You shall receive in such case the conditions of the respective licensor of the licensed software in the Readme_OSS file, these shall apply to the liability of the licensor in relation to You. In terms of the liability of Siemens to You, these Royalty-Free Siemens Software Conditions shall apply in each case.

**3.3 Disclaimer of liability**

Siemens shall not assume any liability, for any legal reason whatsoever, including, without limitation, liability for the usability, availability, completeness and freedom from defects of the Software as well as for the Licensed Material and any damage caused thereby. This shall not apply in cases of mandatory liability, for example product liability law or in cases of intent, gross negligence, or culpable loss of life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for damages arising from a breach of material contractual obligations shall however be limited to the foreseeable damage typical of the type of agreement, unless liability arises from intent or gross negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions do not imply any change in the burden of proof to Your detriment. You shall indemnify Siemens against existing or future claims of third parties in this connection except where Siemens is mandatorily liable.

By using the Software and the Licensed Material, You acknowledge that Siemens cannot be held liable for any damage beyond the liability provisions described.

Royalty-Free Software License Version 1.2 – 26.07.2023
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Renovate configuration
![main](https://docs.renovatebot.com/assets/images/mend-renovate-cli-banner.jpg)

The [renovate CLI](https://docs.renovatebot.com/) can be used to automatically update dependencies in your project, once new versions of them have been released or whenever you see need.
The [renovate CLI](https://docs.renovatebot.com/) can be used to automatically update dependencies in your project, once new versions of them have been released or whenever you see need. Please note, that every execution of the renovate bot will be carried out within the GitHub infrastructure, in case not configured otherwise.

To support the user in setting up the required infrastructure, two things are being offered:
- A workflow that automatically detects and applies updates of a dependency
- A GitHub workflow that automatically detects and applies updates a apax dependency
- The execution happens for all repositories within the SIMATIC AX GitHub organization
- Schedule: Once, every Sunday
- A workflow that enables the maintainer of a repository to manually trigger the detection and application of dependency updates
- A GitHub workflow that enables the maintainer of a repository to manually trigger the detection and application of dependency updates.

## Types of dependencies

The current configuration allows to detect an update with respect to the following types of dependencies:
- SIMATIC AX dependencies
- dependencies
- devDependencies

Once the Renovate bot discovered newly available versions of a dependency, it'll automatically set up a pull request wherein the updates have been applied. This supports the user in deciding if and when to update dependencies of a project.

Expand All @@ -19,19 +26,22 @@ The Renovate workflow defined inside this repository can be reused inside workfl
name: my-renovate-call

on:
*my_trigger*:
schedule:
# schedules the action to be executed on the 1st of every month
- cron: '* * 1 * 1'

jobs:
my-renovate-call:
uses: simatic-ax/renovate-config/.github/workflows/reusable-renovate-workflow.yml@main
secrets: inherit
with:
renovate_reposetory_filter: "simatic-ax/*my_repository_name*"
renovate_repository_filter: "simatic-ax/<my_repository_name>"
```

This will configure a GitHub workflow, named my-renovate-call whose job simply references and executes the workflow provided by **THIS** repository to run the Renovate bot inside a CI pipeline of your own repository.
This will configure a GitHub workflow, named "my-renovate-call" whose job simply references and executes the workflow provided by **THIS** repository to run the Renovate bot inside a CI pipeline of your own repository.

Further information on how to facilitate GitHub actions and workflows can be found [here](https://docs.github.com/en/actions).
Further information on how to facilitate GitHub actions and workflows can be found [here](https://docs.github.com/en/actions).
Information regarding the usage of triggers can be found [here](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs).

# General structure

Expand All @@ -56,10 +66,12 @@ The automatic execution of the Renovate bot includes the following major steps:

### Manual execution

The manual execution does the exact same thing, except it offers a button to the user to run the Renovate bot manually whenever required.
The manual execution does the exact same thing, except it offers a button to the user to run the Renovate bot manually whenever required. To execute a GitHub action manually, simply navigate to the "Actions" tab within your repository, pick the action of the left side and execute "Run workflow".

## Renovate configuration

**DISCLAIMER**: We don't expect you to actively alter the provided configuration, since it has been configured already to support the most common usecases when using SIMATIC AX. However, following you'll find a more technical description of what could be configured additionally. In case you don't plan any customization or are not in need of setting up a renovate bot for own, feel free to skip this part.

### Entry point

The [renovate-entrypoint.sh](./Global-Config/renovate-entrypoint.sh) serves as an entry point for the Renovate bot. By adapting the file the user may control the installation of required prerequisites dependening on his own requirements. In its current implementation the script installs apax inside the image that is running the Renovate bot. This is required in order for the Renovate bot to communicate with the SIMATIC AX registry and check package versions.
Expand All @@ -86,9 +98,9 @@ For more detailed information regarding the configuration, see the [official ren
One may either simply use the existing configuration, or extend it wherever necessary. In case you require additional parameterization of the Renovate bot, or in case you'd like to override an existing setting, adapt the [renovate.json](./renovate.json) inside your own repository. Once done, the set of settings to configure the bot will be an aggregation of the globally defined [renovate-global-config.js](./Global-Config/renovate-global-config.js) and the renovate.json file inside the respective repository.

The following example of a renovate.json configuration will:
- overwrites the handling of minor and major version while updating
- extend the global configuration, such that a dashboard will be shown inside the update pull request
- overwrites the handling of minor and major version while updating.


```json
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
Expand Down