diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3a64a36f2dfc..56943ec183d6 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,19 +7,19 @@ - [ ] I tested **all** changes and their related features with **all** corresponding user types on a test server. - [ ] This is a small issue that I tested locally and was confirmed by another developer on a test server. -- [ ] Language: I followed the [guidelines for inclusive, diversity-sensitive, and appreciative language](https://ls1intum.github.io/Artemis/dev/guidelines/language-guidelines/). -- [ ] I chose a title conforming to the [naming conventions for pull requests](https://ls1intum.github.io/Artemis/dev/development-process/#naming-conventions-for-github-pull-requests). +- [ ] Language: I followed the [guidelines for inclusive, diversity-sensitive, and appreciative language](https://docs.artemis.cit.tum.de/dev/guidelines/language-guidelines/). +- [ ] I chose a title conforming to the [naming conventions for pull requests](https://docs.artemis.cit.tum.de/dev/development-process/#naming-conventions-for-github-pull-requests). #### Server - [ ] **Important**: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls. -- [ ] I followed the [coding and design guidelines](https://ls1intum.github.io/Artemis/dev/guidelines/server/). +- [ ] I followed the [coding and design guidelines](https://docs.artemis.cit.tum.de/dev/guidelines/server/). - [ ] I added multiple integration tests (Spring) related to the features (with a high test coverage). -- [ ] I added pre-authorization annotations according to the [guidelines](https://ls1intum.github.io/Artemis/dev/guidelines/server/#rest-endpoint-best-practices-for-authorization) and checked the course groups for all new REST Calls (security). +- [ ] I added pre-authorization annotations according to the [guidelines](https://docs.artemis.cit.tum.de/dev/guidelines/server/#rest-endpoint-best-practices-for-authorization) and checked the course groups for all new REST Calls (security). - [ ] I documented the Java code using JavaDoc style. #### Client - [ ] **Important**: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data. -- [ ] I followed the [coding and design guidelines](https://ls1intum.github.io/Artemis/dev/guidelines/client/). -- [ ] Following the [theming guidelines](https://ls1intum.github.io/Artemis/dev/guidelines/client-design/), I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme. -- [ ] I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the [test guidelines](https://ls1intum.github.io/Artemis/dev/guidelines/client-tests/). +- [ ] I followed the [coding and design guidelines](https://docs.artemis.cit.tum.de/dev/guidelines/client/). +- [ ] Following the [theming guidelines](https://docs.artemis.cit.tum.de/dev/guidelines/client-design/), I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme. +- [ ] I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the [test guidelines](https://docs.artemis.cit.tum.de/dev/guidelines/client-tests/). - [ ] I added `authorities` to all new routes and checked the course groups for displaying navigation elements (links, buttons). - [ ] I documented the TypeScript code using JSDoc style. - [ ] I added multiple screenshots/screencasts of my UI changes. @@ -57,9 +57,22 @@ Prerequisites: 1. Log in to Artemis 2. Participate in the exam as a student -3. Make sure that the UI of the programming exercise in the exam mode stays unchanged. You can use the [exam mode documentation](https://ls1intum.github.io/Artemis/user/exam_mode/) as reference. +3. Make sure that the UI of the programming exercise in the exam mode stays unchanged. You can use the [exam mode documentation](https://docs.artemis.cit.tum.de/user/exam_mode/) as reference. 4. ... +### Testserver States +> [!NOTE] +> These badges show the state of the test servers. +> Green = Currently available, Red = Currently locked + +![](https://byob.yarr.is/ls1intum/Artemis/artemis-test1) +![](https://byob.yarr.is/ls1intum/Artemis/artemis-test2) +![](https://byob.yarr.is/ls1intum/Artemis/artemis-test3) +![](https://byob.yarr.is/ls1intum/Artemis/artemis-test4) +![](https://byob.yarr.is/ls1intum/Artemis/artemis-test5) +![](https://byob.yarr.is/ls1intum/Artemis/artemis-test6) +![](https://byob.yarr.is/ls1intum/Artemis/artemis-test9) + ### Review Progress diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88a0060022dc..fe61ec7b4d7c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,7 @@ on: - 'docs/**' - '.github/**' - '!.github/workflows/build.yml' + - '!.github/workflows/testserver.yml' push: branches: - develop diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index dc6e103ffd29..648be63e90c0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,21 +35,45 @@ jobs: build-command: make html dirhtml - uses: actions/upload-artifact@v3 with: - name: Documentation + name: documentation path: docs/_build/html/ - - uses: actions/upload-pages-artifact@v2 - with: - path: docs/_build/dirhtml/ # Deployment job deploy: if: github.ref == 'refs/heads/develop' environment: - name: github-pages - url: "https://ls1intum.github.io/Artemis" + name: documentation + url: "https://docs.artemis.cit.tum.de" runs-on: ubuntu-latest needs: docs steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: documentation + path: public + - name: Copy site to server + uses: appleboy/scp-action@master + with: + host: docs.artemis.cit.tum.de + username: ${{ secrets.DOCS_SSH_USER }} + key: ${{ secrets.DOCS_SSH_PRIVATE }} + proxy_host: ${{ secrets.PROXY_HOST }} + proxy_username: ${{ secrets.PROXY_USERNAME }} + proxy_key: ${{ secrets.PROXY_KEY }} + proxy_port: ${{ secrets.PROXY_PORT }} + source: "public" + target: ${{ secrets.DOCS_HOME }} + - name: Move site to www + uses: appleboy/ssh-action@master + with: + host: docs.artemis.cit.tum.de + username: ${{ secrets.DOCS_SSH_USER }} + key: ${{ secrets.DOCS_SSH_PRIVATE }} + proxy_host: ${{ secrets.PROXY_HOST }} + proxy_username: ${{ secrets.PROXY_USERNAME }} + proxy_key: ${{ secrets.PROXY_KEY }} + proxy_port: ${{ secrets.PROXY_PORT }} + script: | + rm -rf ${{ secrets.DOCS_WWW }}/* + mv -f public/* ${{ secrets.DOCS_WWW }}/ diff --git a/.github/workflows/pullrequest-closed.yml b/.github/workflows/pullrequest-closed.yml index 6f7be87a217b..de82d9eef64d 100644 --- a/.github/workflows/pullrequest-closed.yml +++ b/.github/workflows/pullrequest-closed.yml @@ -19,21 +19,78 @@ jobs: tag: pr-${{ github.event.pull_request.number }} untagged-older-than: 28 - # If a PR is closed it should no longer lock any testservers - remove-testserver-locks: + # If a PR is closed the testserver lock should be removed and corresponding badges updated + process_labels: + name: Process labels runs-on: ubuntu-latest + outputs: + labels: ${{ steps.process.outputs.labels }} + badges: ${{ steps.process.outputs.badges }} steps: - - uses: actions-ecosystem/action-remove-labels@v1 + - name: Process labels + id: process + uses: actions/github-script@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - github_token: ${{ secrets.GITHUB_TOKEN }} - labels: | - lock:artemis-test1 - lock:artemis-test2 - lock:artemis-test3 - lock:artemis-test4 - lock:artemis-test5 - lock:artemis-test6 - lock:artemis-test7 - lock:artemis-test8 - lock:artemis-test9 - lock:artemis-test10 + script: | + const labelsToRemove = []; + const labelsToProcess = []; + + // Get the PR number + const prNumber = context.payload.pull_request.number; + + // Iterate through labels on the PR + for (const label of context.payload.pull_request.labels) { + const labelName = label.name; + const regex = /^lock:artemis-test(\d+)$/; + + if (regex.test(labelName)) { + // Extract the part after "lock:" using capture groups + const extractedLabel = labelName.match(regex)[1]; + labelsToProcess.push(extractedLabel); + labelsToRemove.push(labelName); + } + } + + // Do something with the extracted labels + console.log('Badges to process:', labelsToProcess); + console.log('Labels to remove:', labelsToRemove); + + // Use the labelsToRemove array to remove the matching labels + core.setOutput('badges', JSON.stringify(labelsToProcess)); + core.setOutput('labels', labelsToRemove.join(', ')); + + + remove_labels: + name: Remove labels + needs: process_labels + runs-on: ubuntu-latest + if: ${{ needs.process_labels.outputs.labels != '' }} + + steps: + - name: Remove labels + uses: actions-ecosystem/action-remove-labels@v1 + with: + labels: ${{ needs.process_labels.outputs.labels }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + update_badges: + name: Update badges + needs: process_labels + runs-on: ubuntu-latest + strategy: + matrix: + badge: ${{ fromJson(needs.process_labels.outputs.badges) }} + if: ${{ needs.process_labels.outputs.labels != '' }} + + steps: + - name: Update badge + uses: RubbaBoy/BYOB@v1.3.0 + with: + NAME: "artemis-test${{ matrix.badge }}" + LABEL: "artemis-test${{ matrix.badge }}.artemis.cit.tum.de" + STATUS: ${{ github.event.pull_request.head.ref }} + COLOR: green + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pullrequest-unlabeled.yml b/.github/workflows/pullrequest-unlabeled.yml new file mode 100644 index 000000000000..9037060bd8ea --- /dev/null +++ b/.github/workflows/pullrequest-unlabeled.yml @@ -0,0 +1,32 @@ +name: Pull Request Label Removal + +on: + pull_request_target: + types: + - unlabeled + +jobs: + update_badges: + name: Update test server badges + runs-on: ubuntu-latest + + steps: + - name: Get badge id + id: env + uses: actions/github-script@v6 + with: + script: | + const labelName = context.payload.label.name; + const badge = labelName.replace(/^lock:artemis-test/, ''); + core.setOutput('BADGE', badge); + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update badge + uses: RubbaBoy/BYOB@v1.3.0 + with: + NAME: "artemis-test${{ steps.env.outputs.BADGE }}" + LABEL: "artemis-test${{ steps.env.outputs.BADGE }}.artemis.cit.tum.de" + STATUS: ${{ github.event.pull_request.head.ref }} + COLOR: green + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/testserver.yml b/.github/workflows/testserver.yml index dd384324d94b..aa25bc7518f1 100644 --- a/.github/workflows/testserver.yml +++ b/.github/workflows/testserver.yml @@ -82,7 +82,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: '### ❌ Unable to deploy to test servers ❌\nThe docker build needs to run through before deploying.' + body: '### ⚠️ Unable to deploy to test servers ⚠️\nThe docker build needs to run through before deploying.' }) core.setFailed('The build needs to run through first. Please wait for the build to finish and then try again.') @@ -96,38 +96,38 @@ jobs: include: # Commented out environments are not yet available and will be enabled in the future - #- environment: artemis-test1.artemis.cit.tum.de - # label-identifier: artemis-test1 - # url: https://artemis-test1.artemis.cit.tum.de - # user: deployment - # hosts: artemis-test1.artemis.cit.tum.de - # folder: /opt/artemis - # host_keys: | - # artemis-test1.artemis.cit.tum.de ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDS+lFrN7hvzFjESxSQkmLbBdra9dWo33izxLRO2x5oTQwcbZA66Y3cQungIV460aQHwH+K0ALQuEc5EA7LegfFXo//t3kqXEALf0xRkO5tLnJEBpwnjpiOj8GFVIR8XOopKHf3zLo7/rmCPmdN0TKKigw9PcowB3Nf9TlpXvVtpkNTqnjwxfsLqvVjTf+8ji48Xe8zOhAH4zyJEc1KFM7XNdYYJPUctQyOoF+9QrTEW2GLYRkb2IqL8RDd09riUrjtsQJdoK21ATPC07j6XqGCgZxZQfmq4NlqEg2euQt45l0ZkVp3sQG70U0NkwKsLLhABWOzKDWvix7mJ/YDXCkk4Q8Badus1vIBAZYuTATfsEwXnQEnKTl8i4l7CE6U4PZLhwOgxcLBU9E3YKLjCsp8wfEV0n/wyoxXKUSH7Lb0jPQ4JMVUgNT5Rkdt0RE3YMWxVLrQNs6u33m2LrXt3lmiZsGpFa08RcjnSdFtHonL/CkwU00kckoMwRPgUniJKmM= - # artemis-test1.artemis.cit.tum.de ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMk4f5/x4grLMOY9jQCp3SfSjF81iWYRCbXJHBMWzG3TbQq9d2zW8bGCak5TGwPCDnjfBPRRSF57LZJlNaf3wPE= - # artemis-test1.artemis.cit.tum.de ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBGzlZUARYQBdq85FtCe4IALac1dSWoNsvQZmeCjPmS/ + - environment: artemis-test1.artemis.cit.tum.de + label-identifier: artemis-test1 + url: https://artemis-test1.artemis.cit.tum.de + user: deployment + hosts: artemis-test1.artemis.cit.tum.de + folder: /opt/artemis + host_keys: | + artemis-test1.artemis.cit.tum.de ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDS+lFrN7hvzFjESxSQkmLbBdra9dWo33izxLRO2x5oTQwcbZA66Y3cQungIV460aQHwH+K0ALQuEc5EA7LegfFXo//t3kqXEALf0xRkO5tLnJEBpwnjpiOj8GFVIR8XOopKHf3zLo7/rmCPmdN0TKKigw9PcowB3Nf9TlpXvVtpkNTqnjwxfsLqvVjTf+8ji48Xe8zOhAH4zyJEc1KFM7XNdYYJPUctQyOoF+9QrTEW2GLYRkb2IqL8RDd09riUrjtsQJdoK21ATPC07j6XqGCgZxZQfmq4NlqEg2euQt45l0ZkVp3sQG70U0NkwKsLLhABWOzKDWvix7mJ/YDXCkk4Q8Badus1vIBAZYuTATfsEwXnQEnKTl8i4l7CE6U4PZLhwOgxcLBU9E3YKLjCsp8wfEV0n/wyoxXKUSH7Lb0jPQ4JMVUgNT5Rkdt0RE3YMWxVLrQNs6u33m2LrXt3lmiZsGpFa08RcjnSdFtHonL/CkwU00kckoMwRPgUniJKmM= + artemis-test1.artemis.cit.tum.de ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMk4f5/x4grLMOY9jQCp3SfSjF81iWYRCbXJHBMWzG3TbQq9d2zW8bGCak5TGwPCDnjfBPRRSF57LZJlNaf3wPE= + artemis-test1.artemis.cit.tum.de ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBGzlZUARYQBdq85FtCe4IALac1dSWoNsvQZmeCjPmS/ - #- environment: artemis-test2.artemis.cit.tum.de - # label-identifier: artemis-test2 - # url: https://artemis-test2.artemis.cit.tum.de - # user: deployment - # hosts: artemis-test2.artemis.cit.tum.de - # folder: /opt/artemis - # host_keys: | - # artemis-test2.artemis.cit.tum.de ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUqNIPYUJBuItIfGzVu8jtpNWerFoqNq34cPU/+w5biwCrQA/RMIRt0H49ETc4vgc3rN85//FJ9j2x4jGfyS3jxj/ind6PX1QIBjGl09s2TFz53Z8OwcAw9iXJrtKqZGfxr8sbVfboDGa/kyr8E+YUJo+6bPusLQPSAJn8GUGgcNKHQSX7A4sEIeq2uU1RqGKDWJSxyECUxyubfNB6LCZd3ezEP1MPDnvhoF/5cEP4QxeTsVIkwIIAE8oVxNM7Ni8xqkl8sUM//SdzglFsK2gE5eSZ5OpQ5h/Cc3Oo1z7LnwlMwo8fGnhAcoUpDjuKD/2AdIhkyW0B4xUKbKVO94kVSuBUXErYqF4bHByGgjkzR0JTEwk5+shlUjoEA6DBxBO08CudJcTDUhk5+8fRwOzxfSTakr8sOfakgo7W6fBl3P4lHSdsd7VqKINcR3A9QYSXeiEeqliXnTkDSsZw4ux9JyuLle1DHPbTuH8f+vEosdxda+djm3FeijYTe4QS87k= - # artemis-test2.artemis.cit.tum.de ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDRCF0zH3u38zVPNUhJI7zIDsXa3ONiU0GeCv/ybjawkh4alBPnlXtdH0cG1JPtR/Jz/gau92dcqiIFtqdDCDkg= - # artemis-test2.artemis.cit.tum.de ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMV70ACU6GdLtf1MwUklNltC78UoOPsasZruYh0Ord6n + - environment: artemis-test2.artemis.cit.tum.de + label-identifier: artemis-test2 + url: https://artemis-test2.artemis.cit.tum.de + user: deployment + hosts: artemis-test2.artemis.cit.tum.de + folder: /opt/artemis + host_keys: | + artemis-test2.artemis.cit.tum.de ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUqNIPYUJBuItIfGzVu8jtpNWerFoqNq34cPU/+w5biwCrQA/RMIRt0H49ETc4vgc3rN85//FJ9j2x4jGfyS3jxj/ind6PX1QIBjGl09s2TFz53Z8OwcAw9iXJrtKqZGfxr8sbVfboDGa/kyr8E+YUJo+6bPusLQPSAJn8GUGgcNKHQSX7A4sEIeq2uU1RqGKDWJSxyECUxyubfNB6LCZd3ezEP1MPDnvhoF/5cEP4QxeTsVIkwIIAE8oVxNM7Ni8xqkl8sUM//SdzglFsK2gE5eSZ5OpQ5h/Cc3Oo1z7LnwlMwo8fGnhAcoUpDjuKD/2AdIhkyW0B4xUKbKVO94kVSuBUXErYqF4bHByGgjkzR0JTEwk5+shlUjoEA6DBxBO08CudJcTDUhk5+8fRwOzxfSTakr8sOfakgo7W6fBl3P4lHSdsd7VqKINcR3A9QYSXeiEeqliXnTkDSsZw4ux9JyuLle1DHPbTuH8f+vEosdxda+djm3FeijYTe4QS87k= + artemis-test2.artemis.cit.tum.de ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDRCF0zH3u38zVPNUhJI7zIDsXa3ONiU0GeCv/ybjawkh4alBPnlXtdH0cG1JPtR/Jz/gau92dcqiIFtqdDCDkg= + artemis-test2.artemis.cit.tum.de ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMV70ACU6GdLtf1MwUklNltC78UoOPsasZruYh0Ord6n - #- environment: artemis-test3.artemis.cit.tum.de - # label-identifier: artemis-test3 - # url: https://artemis-test3.artemis.cit.tum.de - # user: deployment - # hosts: artemis-test3.artemis.cit.tum.de - # folder: /opt/artemis - # host_keys: | - # artemis-test3.artemis.cit.tum.de ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3zNbNkbYMUbNKCtVSa1GH7ovysowYQQHQK3owHbfjyKsaS6lTO2o16mMe3pu0+CwMdsJqBqn5Lt6M9HyCW74WwwWbOcUrcSqE/37hx5Ja2YzCwucTpvUCR3WVrmwBEYCoS5ZdQfFmyfVQtqjCCI5DdRk1wgY00eLoc8d6YOb6XnmMTs41WcyXFl8ffjhG3jMGlQILI8zhyZqnYB8HwadRAp8Oa6+DyGhOBAV5d3S0AZqjMKNoBGSAXCfs/nG3jBigxNCV7zeIjuhi2Ize/GY+gMcCrvWhjs/lXERII7RDIlcZogyN9+rGRX8X8okMoS1YONxzWPFb6XQajeDriESQ5txyHXpbFwcSLSU8DzleS9UZMah99knMs0Fyzu0q4rbCS1PtaAJfSOLjVgp67j3DNkXV+P5CZaSYI7hl377u0aTTHB5W3Myn7kXrNL2vjRk/mui+/Ds/+PPCJERWJAhCYp+CGj/itcOKPJqyfLL3ejzpqhRDzDTWCHU2cUnE2PE= - # artemis-test3.artemis.cit.tum.de ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBF3JQ7fPlW+Rua4JXCl4Dska45h4PhClWvmcFQHGA4H0bLEG+lVXuw5yuRk9lDD88pvzStFewk9EbmJ8Sja0zKo= - # artemis-test3.artemis.cit.tum.de ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGE67ADXnCgvbyJfqDAmSvegYwmCzfOyAUKBbJpwh7oU + - environment: artemis-test3.artemis.cit.tum.de + label-identifier: artemis-test3 + url: https://artemis-test3.artemis.cit.tum.de + user: deployment + hosts: artemis-test3.artemis.cit.tum.de + folder: /opt/artemis + host_keys: | + artemis-test3.artemis.cit.tum.de ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3zNbNkbYMUbNKCtVSa1GH7ovysowYQQHQK3owHbfjyKsaS6lTO2o16mMe3pu0+CwMdsJqBqn5Lt6M9HyCW74WwwWbOcUrcSqE/37hx5Ja2YzCwucTpvUCR3WVrmwBEYCoS5ZdQfFmyfVQtqjCCI5DdRk1wgY00eLoc8d6YOb6XnmMTs41WcyXFl8ffjhG3jMGlQILI8zhyZqnYB8HwadRAp8Oa6+DyGhOBAV5d3S0AZqjMKNoBGSAXCfs/nG3jBigxNCV7zeIjuhi2Ize/GY+gMcCrvWhjs/lXERII7RDIlcZogyN9+rGRX8X8okMoS1YONxzWPFb6XQajeDriESQ5txyHXpbFwcSLSU8DzleS9UZMah99knMs0Fyzu0q4rbCS1PtaAJfSOLjVgp67j3DNkXV+P5CZaSYI7hl377u0aTTHB5W3Myn7kXrNL2vjRk/mui+/Ds/+PPCJERWJAhCYp+CGj/itcOKPJqyfLL3ejzpqhRDzDTWCHU2cUnE2PE= + artemis-test3.artemis.cit.tum.de ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBF3JQ7fPlW+Rua4JXCl4Dska45h4PhClWvmcFQHGA4H0bLEG+lVXuw5yuRk9lDD88pvzStFewk9EbmJ8Sja0zKo= + artemis-test3.artemis.cit.tum.de ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGE67ADXnCgvbyJfqDAmSvegYwmCzfOyAUKBbJpwh7oU - environment: artemis-test4.artemis.cit.tum.de label-identifier: artemis-test4 @@ -206,9 +206,9 @@ jobs: # artemis-test10.artemis.cit.tum.de ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCICiCLtljuYwnBxGKurZjMuDsYFfSJ/5UD8gaDa1+CWPqmM4cFTniw+ORglDpaySlusPbXwll+K0JPkIm8E6+Y= # artemis-test10.artemis.cit.tum.de ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAF8QXj0d2na/rBaVTIXfGu3HgtFppoE04Oj1Od2O3kD outputs: - #TS1: ${{ steps.filter.outputs.artemis-test1 || '' }} - #TS2: ${{ steps.filter.outputs.artemis-test2 || '' }} - #TS3: ${{ steps.filter.outputs.artemis-test3 || '' }} + TS1: ${{ steps.filter.outputs.artemis-test1 || '' }} + TS2: ${{ steps.filter.outputs.artemis-test2 || '' }} + TS3: ${{ steps.filter.outputs.artemis-test3 || '' }} TS4: ${{ steps.filter.outputs.artemis-test4 || '' }} TS5: ${{ steps.filter.outputs.artemis-test5 || '' }} TS6: ${{ steps.filter.outputs.artemis-test6 || '' }} @@ -252,6 +252,7 @@ jobs: deploy: needs: [ process-matrix ] runs-on: ubuntu-latest + concurrency: test-servers-deploy strategy: fail-fast: false matrix: @@ -293,7 +294,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `### ❌ Unable to deploy to test servers ❌\nTestserver "${{ matrix.environment }}" is already in use by PR #${issues[0].number}.` + body: `#### ⚠️ Unable to deploy to test servers ⚠️\nTestserver "${{ matrix.environment }}" is already in use by PR #${issues[0].number}.` }) core.setFailed(`Testserver "${{ matrix.environment }}" is already in use by PR #${issues[0].number}.`); } else if (issues.length > 1) { @@ -301,16 +302,9 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: '### ❌ Unable to deploy to test servers ❌\nTestserver "${{ matrix.environment }}" is already in use by multiple PRs. Check PRs with label "lock:${{ matrix.label-identifier }}"!' + body: '#### ⚠️ Unable to deploy to test servers ⚠️\nTestserver "${{ matrix.environment }}" is already in use by multiple PRs. Check PRs with label "lock:${{ matrix.label-identifier }}"!' }) core.setFailed('Testserver "${{ matrix.environment }}" is already in use by multiple PRs. Check PRs with label "lock:${{ matrix.label-identifier }}"!'); - } else if (context.issue && context.issue.number) { - await github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['lock:${{ matrix.label-identifier }}'] - }) } - name: Compute Tag @@ -362,13 +356,34 @@ jobs: run: | for host in $DEPLOYMENT_HOSTS; do ./artemis-server-cli docker-deploy "$DEPLOYMENT_USER@$host" -g "$GATEWAY_USER@$GATEWAY_HOST" -t $TAG -b $GITHUB_HEAD_REF -d $DEPLOYMENT_FOLDER -y - sleep 20 done + - name: Add "lock:${{ matrix.environment }}" label + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + if (context.issue && context.issue.number) { + await github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['lock:${{ matrix.label-identifier }}'] + }) + } + + - name: Update badge + uses: RubbaBoy/BYOB@v1.3.0 + with: + NAME: ${{ matrix.label-identifier }} + LABEL: ${{ matrix.environment }} + STATUS: ${{ github.event.pull_request.head.ref }} + COLOR: red + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Check that the build job has run successfully before deploying add-error-label: - needs: [ check-build-status, filter-matrix, process-matrix, deploy ] + needs: [ get-labels, check-build-status, filter-matrix, process-matrix, deploy ] runs-on: ubuntu-latest if: ${{ failure() }} steps: diff --git a/.idea/runConfigurations/Artemis__Server_.xml b/.idea/runConfigurations/Artemis__Server_.xml index 3bf4f01cdffd..ee1155982831 100644 --- a/.idea/runConfigurations/Artemis__Server_.xml +++ b/.idea/runConfigurations/Artemis__Server_.xml @@ -3,7 +3,7 @@