diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e117909 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# `.gitattributes` reclassify `.st` files as iec-st: +** linguist-vendored +# *.ppjs linguist-language=ST diff --git a/.github/workflows/github-action-release-ae.yml b/.github/workflows/github-action-release-ae.yml deleted file mode 100644 index fc619c6..0000000 --- a/.github/workflows/github-action-release-ae.yml +++ /dev/null @@ -1,120 +0,0 @@ -name: release-package -on: workflow_dispatch -env: - PROJECT_NAME: ae-sortingline - SCOPE: simatic-ax - ACTIONS_REPO: simatic-ax/actions - ACTIONS_LOCAL: ./actions - VERSIONING_TOOL_REPO: simatic-ax/simatic_versioning - -jobs: - versioning: - name: "Bump the version of the package according to the conventional commit" - runs-on: ubuntu-latest - steps: - - name: "Clone repository for CI workflows" - uses: actions/checkout@v3 - with: - repository: ${{ env.ACTIONS_REPO }} - token: ${{ secrets.CI_KIT_TOKEN }} - path: ./actions - - name: "Get the latest version of the package" - run: | - echo "@simatic-ax:registry=https://npm.pkg.github.com/" >> .npmrc - echo "//npm.pkg.github.com/:_authToken=${{ secrets.CI_KIT_TOKEN }}" >> .npmrc - echo "always-auth = true" >> .npmrc - cat .npmrc - echo "VERSION=$(npm show @${{ env.SCOPE }}/template-${{ env.PROJECT_NAME }} version --registry=https://npm.pkg.github.com --scope=${{ env.SCOPE }})" >> $GITHUB_ENV - echo $VERSION - - name: "Check contents of actions folder" - run: tree -d ./actions - - - name: "Get latest simatic-versioning executable" - uses: dsaltares/fetch-gh-release-asset@master - with: - repo: ${{ env.VERSIONING_TOOL_REPO }} - file: "conventional-commit" - token: ${{ secrets.CI_KIT_TOKEN }} - - - id: bump - name: "Bump version" - run: | - sudo chmod +x ./conventional-commit - ./conventional-commit -c "fix(test): fix something" -v "${{ env.VERSION }}" >> .version - cat .version - - - name: "Upload version" - uses: actions/upload-artifact@v3 - with: - name: version - path: .version - - create_template: - name: "Create template" - runs-on: ubuntu-latest - needs: versioning - - steps: - - name: "Clone private AX github actions" - uses: actions/checkout@v3 - with: - repository: simatic-ax/actions - token: ${{ secrets.CI_KIT_TOKEN }} - path: ./actions - - - name: "Install apax and dependencies" - uses: ./actions/.github/actions/setup-apax-runner - with: - apax-access-token: ${{ secrets.APAX_TOKEN }} - - - name: "Login to AX registry" - run: apax login --password ${{ secrets.APAX_TOKEN }} - - - name: "Login to GitHb registry" - run: | - apax login \ - --registry "https://npm.pkg.github.com" \ - --password ${{ secrets.CI_KIT_TOKEN }} - - - name: "Download artifact with version" - uses: actions/download-artifact@v3 - with: - name: version - - - name: "Create an empty template" - run: | - mkdir simatic-ax-${{ env.PROJECT_NAME }} - cd simatic-ax-${{ env.PROJECT_NAME }} - mkdir template - VERSION=$(cat ../.version) - echo name: "'@simatic-ax/template-${{ env.PROJECT_NAME }}'" >> apax.yml - echo version: $VERSION >> apax.yml - echo type: generic >> apax.yml - cat apax.yml - cd .. - - - name: "Clone the library repository into the template folder" - uses: actions/checkout@v3 - with: - path: ./simatic-ax-${{ env.PROJECT_NAME }}/template - - - name: "Set the version in the application example" - run: | - cd simatic-ax-${{ env.PROJECT_NAME }}/template - echo update apax.yml in template - VERSION=$(cat ../../.version) - echo version: $VERSION - apax version $VERSION - - - name: "Pack" - run: | - cd ./simatic-ax-${{ env.PROJECT_NAME }} - cat apax.yml - apax pack 2>.package.err 1>.signature - - - name: "Publish" - run: | - echo publishing package to https://npm.pkg.github.com - cd ./simatic-ax-${{ env.PROJECT_NAME }} - PACKAGE="$(grep -oP '(?<=\").+.apax\.tgz(?=\")' .package.err)" - apax publish --package $PACKAGE --registry https://npm.pkg.github.com diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..7796d00 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,19 @@ +name: linter checks +on: + push: + +jobs: + linter: + name: "Linter Checks" + runs-on: ubuntu-latest + + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Check markdown files + uses: avto-dev/markdown-lint@v1 + with: + args: '**/*.md' + ignore: ./LICENSE.md diff --git a/.github/workflows/release-applicationexample.yml b/.github/workflows/release-applicationexample.yml new file mode 100644 index 0000000..702609a --- /dev/null +++ b/.github/workflows/release-applicationexample.yml @@ -0,0 +1,16 @@ +on: + push: + # Pattern matched against refs/tags + tags: + - "*" + +jobs: + release-apax-lib: + uses: simatic-ax/actions/.github/workflows/apax-publish-applicationexample.yml@stable + secrets: + APAX_TOKEN: ${{ secrets.APAX_TOKEN }} + DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} + + with: + VERSION: ${{ github.ref_name }} + PROJECT_NAME: ae-sortingline \ No newline at end of file diff --git a/.markdownlint.yml b/.markdownlint.yml new file mode 100644 index 0000000..95479c5 --- /dev/null +++ b/.markdownlint.yml @@ -0,0 +1,11 @@ +# markdownlint YAML configuration +--- + +# Default state for all rules +default: true + +# ignored rules +line-length: false +no-inline-html: false +first-line-h1: false +no-emphasis-as-header: false \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..7bdce72 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +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 @BeckerStS @kruegerfelix \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md index 63d21d5..dce28a1 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -10,9 +10,7 @@ Siemens AG and/or a subsidiary of Siemens AG ("Siemens") provides You royalty-fr 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. +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 @@ -22,19 +20,23 @@ For additional information on industrial security measures that may be implement 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. -**2. Open Source License for Software in source code and generated source code** +**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 shall apply for such 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 + MIT License + + Copyright 2022 Siemens AG -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. -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 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. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of 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. -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. +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** @@ -52,10 +54,10 @@ Siemens shall make available to You, at Your request, the Open Source Software s 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. -Royalty-Free Software License Version 1.0 – 11.04.2022 - **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.1 – 30.09.2022 diff --git a/apax.yml b/apax.yml index 85b2296..a5c39b4 100644 --- a/apax.yml +++ b/apax.yml @@ -29,7 +29,7 @@ scripts: - apax build - apax load devDependencies: - "@ax/sdk": 2.0.3 + "@ax/sdk": 3.0.2 "@simatic-ax/snippetscollection": 0.0.13 "@ax/hwld": 0.4.98 registries: