diff --git a/.github/README.md b/.github/README.md index c5b4ffa4e..16321efc9 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,9 +1,8 @@ -[open-issues]: https://github.com/it-at-m/refarch-templates/issues -[new-issue]: https://github.com/it-at-m/refarch-templates/issues/new/choose -[milestones]: https://github.com/it-at-m/refarch-templates/milestones -[project-board]: https://github.com/orgs/it-at-m/projects/16 -[documentation]: https://refarch.oss.muenchen.de/templates +[open-issues]: https://github.com/it-at-m/sps-test/issues +[new-issue]: https://github.com/it-at-m/sps-test/issues/new/choose +[project-board]: https://github.com/orgs/it-at-m/projects/19 +[documentation]: https://github.com/it-at-m/sps-test/ [contribution-documentation]: https://refarch.oss.muenchen.de/contribute [itm-opensource]: https://opensource.muenchen.de/ [license]: ../LICENSE @@ -11,9 +10,8 @@ [refarch-documentation]: https://refarch.oss.muenchen.de/ -[refarch-code]: https://github.com/it-at-m/refarch -[spring-documentation]: https://spring.io/ -[vuejs-documentation]: https://vuejs.org/ +[refarch-templates]: https://github.com/it-at-m/refarch-templates +[lhm_actions]: https://github.com/it-at-m/lhm_actions [getting-started-documentation]: https://refarch.oss.muenchen.de/templates/getting-started [develop-documentation]: https://refarch.oss.muenchen.de/templates/develop [document-documentation]: https://refarch.oss.muenchen.de/templates/document @@ -23,31 +21,30 @@ [documentation-shield]: https://img.shields.io/badge/documentation-blue?style=for-the-badge [new-issue-shield]: https://img.shields.io/badge/new%20issue-blue?style=for-the-badge [made-with-love-shield]: https://img.shields.io/badge/made%20with%20%E2%9D%A4%20by-it%40M-yellow?style=for-the-badge -[license-shield]: https://img.shields.io/github/license/it-at-m/refarch-templates?style=for-the-badge +[license-shield]: https://img.shields.io/github/license/it-at-m/sps-test?style=for-the-badge -# RefArch Templates +# SPS Test (a fork of RefArch Templates) [![Documentation][documentation-shield]][documentation] [![New issue][new-issue-shield]][new-issue] [![Made with love by it@M][made-with-love-shield]][itm-opensource] [![GitHub license][license-shield]][license] -This project acts as a template and provides starter files for web application projects based on the RefArch (reference architecture) of it@M. +This project if a fork forked of [it-at-m/refarch-templates][refarch-templates]. It is named SPS which is an abbreviation for **S**oftware**p**roduktions**s**traße - +it@m internally used for their CI/CD Pipelines and everything what's going with it. -To learn more about the architecture itself, checkout its [documentation][refarch-documentation] or [code][refarch-code]. - -The templates are based on [Spring][spring-documentation] and [Vue.js][vuejs-documentation]. +sps-test is used to test it@m's GitHub Actions implemented in repository [it-at-m/lhm_actions][lhm_actions] +and RefArch template workflows implemented in repository [it-at-m/refarch-templates][refarch-templates]. ## Usages -To get set up and learn more about the templates, please check out the [Getting Started][getting-started-documentation] page. +If you want to setup and learn more about the RefArch templates, please check out the [Getting Started][getting-started-documentation] page. Also check the respective pages with suggestions on how to [develop][develop-documentation], [document][document-documentation] and [organize][organize-documentation] your project. ## Roadmap -See the [open issues][open-issues] for a full list of proposed features (and known issues). -To get a better overview on what's currently being worked on, check out our [project board][project-board]. -We often also plan our issues in [milestones][milestones]. +To get a better overview on what's currently being worked on it@m's GitHub Actions and RefArch Templates Workflows, +check out our [project board][project-board]. ## Contributing diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index e0ec4b59a..3e3d9e8c3 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -3,6 +3,9 @@ name: actionlint on: pull_request: + schedule: + - cron: "5 4 * * 1-5" + timezone: "Europe/Berlin" jobs: actionlint: @@ -11,3 +14,16 @@ jobs: contents: read steps: - uses: it-at-m/lhm_actions/action-templates/actions/action-actionlint@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 + + handlefailure: + needs: + - actionlint + runs-on: ubuntu-latest + permissions: {} + if: failure() && (github.event_name == 'schedule' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) + steps: + - name: Notify Webex + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"markdown" : "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ github.workflow }} failed"}' \ + "https://webexapis.com/v1/webhooks/incoming/${{ secrets.WEBEX_TOKEN }}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 856a9bdd8..31a0fc5d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,10 @@ on: pull_request: push: branches: - - "main" + - "sps-test-main" + schedule: + - cron: "10 4 * * 1-5" + timezone: "Europe/Berlin" jobs: # JOB to run change detection @@ -74,3 +77,17 @@ jobs: registry-username: ${{ github.actor }} image-tags: | type=raw,value=dev + + handlefailure: + needs: + - build-check-changed-files + - build + runs-on: ubuntu-latest + permissions: {} + if: failure() && (github.event_name == 'schedule' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) + steps: + - name: Notify Webex + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"markdown" : "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ github.workflow }} failed"}' \ + "https://webexapis.com/v1/webhooks/incoming/${{ secrets.WEBEX_TOKEN }}" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 72006de77..848019b9f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -16,7 +16,10 @@ on: pull_request: push: branches: - - "main" # Runs on main in order to keep the regular scanning by GitHub working + - "sps-test-main" + schedule: + - cron: "15 4 * * 1-5" + timezone: "Europe/Berlin" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -88,3 +91,19 @@ jobs: with: codeql-language: python codeql-query: ${{ env.analysis-query }} + + handlefailure: + needs: + - codeql-check-changed-files + - codeql-java + - codeql-javascript-typescript-vue + - codeql-python + runs-on: ubuntu-latest + permissions: {} + if: failure() && (github.event_name == 'schedule' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) + steps: + - name: Notify Webex + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"markdown" : "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ github.workflow }} failed"}' \ + "https://webexapis.com/v1/webhooks/incoming/${{ secrets.WEBEX_TOKEN }}" diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 47c25c8a4..44310609f 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -12,3 +12,16 @@ jobs: pull-requests: write steps: - uses: it-at-m/lhm_actions/action-templates/actions/action-dependency-review@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 + + handlefailure: + needs: + - dependency-review + runs-on: ubuntu-latest + permissions: {} + if: failure() && (github.event_name == 'schedule' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) + steps: + - name: Notify Webex + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"markdown" : "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ github.workflow }} failed"}' \ + "https://webexapis.com/v1/webhooks/incoming/${{ secrets.WEBEX_TOKEN }}" diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index b0a15f608..40c5773e6 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -5,7 +5,7 @@ on: # Runs on pushes to any branch when changes are made to docs or workflow push: branches: - - main + - sps-test-main paths: - "docs/**" - ".github/workflows/deploy-docs.yml" @@ -13,6 +13,9 @@ on: paths: - "docs/**" - ".github/workflows/deploy-docs.yml" + schedule: + - cron: "25 4 * * 1-5" + timezone: "Europe/Berlin" jobs: deploy-docs: @@ -25,3 +28,16 @@ jobs: - uses: it-at-m/lhm_actions/action-templates/actions/action-build-docs@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 # Only deploy documentation from the main branch to prevent unauthorized changes - uses: it-at-m/lhm_actions/action-templates/actions/action-deploy-docs@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 + + handlefailure: + needs: + - deploy-docs + runs-on: ubuntu-latest + permissions: {} + if: failure() && (github.event_name == 'schedule' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) + steps: + - name: Notify Webex + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"markdown" : "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ github.workflow }} failed"}' \ + "https://webexapis.com/v1/webhooks/incoming/${{ secrets.WEBEX_TOKEN }}" diff --git a/.github/workflows/dockercompose-healthcheck.yml b/.github/workflows/dockercompose-healthcheck.yml index d35d17ffe..7774cad4d 100644 --- a/.github/workflows/dockercompose-healthcheck.yml +++ b/.github/workflows/dockercompose-healthcheck.yml @@ -3,6 +3,9 @@ name: dockercompose-healthcheck on: pull_request: + schedule: + - cron: "30 4 * * 1-5" + timezone: "Europe/Berlin" jobs: dockercompose-healthcheck: @@ -14,3 +17,16 @@ jobs: with: skip-exited: true # required for keycloakmigration init container compose-file-path: "./stack/" + + handlefailure: + needs: + - dockercompose-healthcheck + runs-on: ubuntu-latest + permissions: {} + if: failure() && (github.event_name == 'schedule' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) + steps: + - name: Notify Webex + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"markdown" : "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ github.workflow }} failed"}' \ + "https://webexapis.com/v1/webhooks/incoming/${{ secrets.WEBEX_TOKEN }}" diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 124534c03..f6da04abb 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -1,7 +1,10 @@ # Workflow to assign appropriate labels to PRs name: pr-labeler on: - - pull_request_target + pull_request_target: + schedule: + - cron: "35 4 * * 1-5" + timezone: "Europe/Berlin" jobs: pr-labeler: @@ -12,3 +15,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: it-at-m/lhm_actions/action-templates/actions/action-pr-labeler@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 + + handlefailure: + needs: + - pr-labeler + runs-on: ubuntu-latest + permissions: {} + if: failure() && (github.event_name == 'schedule' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) + steps: + - name: Notify Webex + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"markdown" : "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ github.workflow }} failed"}' \ + "https://webexapis.com/v1/webhooks/incoming/${{ secrets.WEBEX_TOKEN }}" diff --git a/.github/workflows/release-maven.yml b/.github/workflows/release-maven.yml index 8583da5cd..34f17be89 100644 --- a/.github/workflows/release-maven.yml +++ b/.github/workflows/release-maven.yml @@ -19,6 +19,14 @@ on: options: # Add or modify paths according to your project structure - backend - eai +# schedule: +# - cron: "40 4 * * 1-5" +# timezone: "Europe/Berlin" + +env: + DEFAULT_RELEASE_VERSION: "0.0.3" + DEFAULT_DEVELOPMENT_VERSION: "0.0.4-SNAPSHOT" + DEFAULT_APP_PATH: "backend" jobs: release-maven-artifact: @@ -33,9 +41,9 @@ jobs: - id: release-maven-artifact uses: it-at-m/lhm_actions/action-templates/actions/action-maven-release@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 with: - app-path: ${{ inputs.app-path }} - releaseVersion: ${{ inputs.release-version }} - developmentVersion: ${{ inputs.development-version }} + app-path: ${{ inputs.app-path || env.DEFAULT_APP_PATH }} + releaseVersion: ${{ inputs.release-version || env.DEFAULT_RELEASE_VERSION }} + developmentVersion: ${{ inputs.development-version || env.DEFAULT_DEVELOPMENT_VERSION }} use-pr: "true" # the following variables are necessary to publish the packages to maven central # docs: https://it-at-m.github.io/lhm_actions/workflows.html#maven-central @@ -53,11 +61,11 @@ jobs: steps: - uses: it-at-m/lhm_actions/action-templates/actions/action-build-image@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 with: - path: ${{ inputs.app-path }} + path: ${{ github.event.inputs.app-path || env.DEFAULT_APP_PATH }} artifact-name: ${{ needs.release-maven-artifact.outputs.ARTIFACT_NAME }} - image-name: ${{ inputs.app-path }} + image-name: ${{ inputs.app-path || env.DEFAULT_APP_PATH }} image-tags: | - type=semver,pattern={{version}},value=${{ inputs.release-version }} + type=semver,pattern={{version}},value=${{ inputs.release-version || env.DEFAULT_RELEASE_VERSION }} type=raw,value=latest registry-username: ${{ github.actor }} registry-password: ${{ secrets.GITHUB_TOKEN }} @@ -71,6 +79,21 @@ jobs: - uses: it-at-m/lhm_actions/action-templates/actions/action-create-github-release@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 with: artifact-name: ${{ needs.release-maven-artifact.outputs.ARTIFACT_NAME }} - artifact-path: ${{ inputs.app-path }}/target/*.jar - tag-name: ${{ inputs.app-path }}-${{ inputs.release-version }} + tag-name: ${{ inputs.app-path || env.DEFAULT_APP_PATH }}-${{ inputs.release-version || env.DEFAULT_RELEASE_VERSION }} generate-release-notes: true + artifact-path: ${{ github.event.inputs.app-path || env.DEFAULT_APP_PATH }}/target/*.jar + + handlefailure: + needs: + - release-maven-artifact + - release-maven-image + - release-maven-github + runs-on: ubuntu-latest + permissions: {} + if: failure() && (github.event_name == 'schedule' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) + steps: + - name: Notify Webex + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"markdown" : "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ github.workflow }} failed"}' \ + "https://webexapis.com/v1/webhooks/incoming/${{ secrets.WEBEX_TOKEN }}" diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index 6ba1a2284..f51a9e170 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -20,7 +20,14 @@ on: options: # Add or modify paths according to your project structure - frontend - webcomponent - + schedule: + - cron: '30 5 * * 1-5' + timezone: "Europe/Berlin" + +env: + DEFAULT_APP_PATH: 'frontend' + DEFAULT_RELEASE_VERSION: 'patch' + jobs: release-npm-artifact: runs-on: ubuntu-latest @@ -35,18 +42,18 @@ jobs: - id: release-npm-artifact uses: it-at-m/lhm_actions/action-templates/actions/action-npm-release@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 with: - app-path: ${{ inputs.app-path }} - releaseVersion: ${{ inputs.release-version }} + app-path: ${{ inputs.app-path || env.DEFAULT_APP_PATH }} + releaseVersion: ${{ inputs.release-version || env.DEFAULT_RELEASE_VERSION }} use-pr: "true" - id: build uses: it-at-m/lhm_actions/action-templates/actions/action-npm-build@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 with: - app-path: ${{ inputs.app-path }} + app-path: ${{ inputs.app-path || env.DEFAULT_APP_PATH }} # necessary to publish to npm registry # docs: https://it-at-m.github.io/lhm_actions/workflows.html#npm # - id: publish # shell: bash - # working-directory: ./${{ inputs.app-path }} + # working-directory: ./${{ inputs.app-path || env.env.DEFAULT_APP_PATH }} # run: npm publish --provenance --access public release-npm-image: @@ -57,8 +64,8 @@ jobs: steps: - uses: it-at-m/lhm_actions/action-templates/actions/action-build-image@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 with: - path: ${{ inputs.app-path }} - image-name: ${{ inputs.app-path }} + path: ${{ inputs.app-path || env.DEFAULT_APP_PATH }} + image-name: ${{ inputs.app-path || env.DEFAULT_APP_PATH }} artifact-name: ${{ needs.release-npm-artifact.outputs.ARTIFACT_NAME }} registry-password: ${{ secrets.GITHUB_TOKEN }} registry-username: ${{ github.actor }} @@ -74,6 +81,20 @@ jobs: steps: - uses: it-at-m/lhm_actions/action-templates/actions/action-create-github-release@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 with: - artifact-name: ${{ needs.release-npm-artifact.outputs.ARTIFACT_NAME }} - tag-name: ${{ inputs.app-path }}-${{ needs.release-npm-artifact.outputs.ARTIFACT_VERSION }} + tag-name: ${{ inputs.app-path || env.DEFAULT_APP_PATH }}-${{ needs.release-npm-artifact.outputs.ARTIFACT_VERSION }} generate-release-notes: true + + handlefailure: + needs: + - release-npm-artifact + - release-npm-image + - release-npm-github + runs-on: ubuntu-latest + permissions: {} + if: failure() && (github.event_name == 'schedule' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) + steps: + - name: Notify Webex + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"markdown" : "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ github.workflow }} failed"}' \ + "https://webexapis.com/v1/webhooks/incoming/${{ secrets.WEBEX_TOKEN }}" diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 5df7ff546..7d5875327 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -5,6 +5,7 @@ on: pull_request: schedule: - cron: '0 3 * * *' # Daily at 03:00 UTC + timezone: "Europe/Berlin" jobs: trivy: @@ -38,7 +39,7 @@ jobs: eai: eai/** - run: | echo ${{ toJSON(steps.filter.outputs.changes) }} - + # JOB to find out modified packages trivy-partial: runs-on: ubuntu-latest @@ -56,3 +57,18 @@ jobs: - uses: it-at-m/lhm_actions/action-templates/actions/action-trivy@4ed8f906bab8111fbd9a7af8e3f4129f9b721757 # v1.2.3 with: path: ${{ matrix.package }} + + handlefailure: + needs: + - trivy + - trivy-check-changed-files + - trivy-partial + runs-on: ubuntu-latest + permissions: {} + if: failure() && (github.event_name == 'schedule' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) + steps: + - name: Notify Webex + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"markdown" : "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ github.workflow }} failed"}' \ + "https://webexapis.com/v1/webhooks/incoming/${{ secrets.WEBEX_TOKEN }}" diff --git a/backend/pom.xml b/backend/pom.xml index 2ec3d5fd1..07897b176 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -11,7 +11,7 @@ de.muenchen.oss.refarch refarch-backend - 0.0.1-SNAPSHOT + 0.0.4-SNAPSHOT refarch-backend This is the default starting project for a backend project based on the reference architecture of it@M diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f1d282081..5b7c39f0a 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "refarch-frontend", - "version": "0.0.0", + "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "refarch-frontend", - "version": "0.0.0", + "version": "0.0.1", "license": "MIT", "dependencies": { "@fontsource/roboto": "5.3.0", diff --git a/frontend/package.json b/frontend/package.json index 711324f12..4fb7bd743 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,7 +6,7 @@ } }, "name": "refarch-frontend", - "version": "0.0.0", + "version": "0.0.1", "type": "module", "private": true, "license": "MIT",