Skip to content

Commit

Permalink
Merge pull request #358 from ls1intum/code-cleanup
Browse files Browse the repository at this point in the history
Improve Pipeline and Documentation
  • Loading branch information
fabian-emilius authored Nov 20, 2024
2 parents 4f5366d + a51ba96 commit 19ceb81
Show file tree
Hide file tree
Showing 14 changed files with 488 additions and 564 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,6 @@ jobs:
with:
files: server/**

# Set up Java for server tests
- name: Set up JDK 21
if: ${{ steps.changed-files-server-folder.outputs.any_changed == 'true' && matrix.path == 'server' }}
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'

# Grant execute permission for gradlew
- name: Grant execute permission for gradlew
if: ${{ steps.changed-files-server-folder.outputs.any_changed == 'true' && matrix.path == 'server' }}
run: chmod +x ./server/gradlew

# Run tests for server
- name: Run server tests
if: ${{ steps.changed-files-server-folder.outputs.any_changed == 'true' && matrix.path == 'server' }}
working-directory: ./server
run: |
./gradlew test
- name: Log in to the Container registry
if: ${{ (steps.changed-files-client-folder.outputs.any_changed == 'true') || (steps.changed-files-server-folder.outputs.any_changed == 'true') }}
uses: docker/login-action@v3
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/deploy_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,6 @@ jobs:
name: ${{ inputs.environment }}
url: '${{ vars.CLIENT_HOST }}'
steps:
- name: SSH to VM and Execute Docker-Compose Down
uses: appleboy/[email protected]
with:
host: ${{ vars.VM_HOST }}
username: ${{ vars.VM_USERNAME }}
key: ${{ secrets.VM_SSH_PRIVATE_KEY }}
proxy_host: ${{ vars.DEPLOYMENT_GATEWAY_HOST }}
proxy_username: ${{ vars.DEPLOYMENT_GATEWAY_USER }}
proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }}
proxy_port: ${{ vars.DEPLOYMENT_GATEWAY_PORT }}
script: |
docker compose -f docker-compose.prod.yml --env-file=.env.prod down --remove-orphans --rmi all
- name: checkout
uses: actions/checkout@v4

Expand Down Expand Up @@ -150,4 +137,6 @@ jobs:
proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }}
proxy_port: ${{ vars.DEPLOYMENT_GATEWAY_PORT }}
script: |
docker compose -f docker-compose.prod.yml --env-file=.env.prod up --pull=always -d
docker compose -f docker-compose.prod.yml --env-file=.env.prod pull client server
docker compose -f docker-compose.prod.yml --env-file=.env.prod restart postfix
docker compose -f docker-compose.prod.yml --env-file=.env.prod up -d
8 changes: 7 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ name: Build and Deploy to Dev

on:
pull_request:
push:
branches: [main]

jobs:
run-tests:
uses: ./.github/workflows/run_tests.yml
build-dev-container:
uses: ./.github/workflows/build_docker.yml
secrets: inherit
deploy-dev-container:
needs: build-dev-container
needs:
- run-tests
- build-dev-container
uses: ./.github/workflows/deploy_docker.yml
secrets: inherit
with:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ on:
branches: [main]

jobs:
run-tests:
uses: ./.github/workflows/run_tests.yml
build-prod-container:
uses: ./.github/workflows/build_docker.yml
secrets: inherit
deploy-prod-container:
needs: build-prod-container
needs:
- run-tests
- build-prod-container
uses: ./.github/workflows/deploy_docker.yml
secrets: inherit
with:
environment: Production
server_image_tag: "latest"
client_image_tag: "latest"

server_image_tag: "${{ needs.build-dev-container.outputs.server_image_tag }}"
client_image_tag: "${{ needs.build-dev-container.outputs.client_image_tag }}"
31 changes: 31 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run Tests

on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

# Set up Java for server tests
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'

# Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: chmod +x ./server/gradlew

# Run tests for server
- name: Run server tests
working-directory: ./server
run: |
./gradlew test
55 changes: 42 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,53 @@ ThesisTrack was developed as part of this [bachelor's thesis](docs/files/ba-thes

## User Documentation

A short description and a demo video of the most important functionality of the platform.
The videos are grouped by the roles student, advisor and supervisor.

#### Student
- [Submit Thesis Application](https://live.rbg.tum.de/w/artemisintro/53606)
- [Edit Thesis Application](https://live.rbg.tum.de/w/artemisintro/53607)
- [Upload Proposal](https://live.rbg.tum.de/w/artemisintro/53608)
- [Upload Thesis Files](https://live.rbg.tum.de/w/artemisintro/53609)
- [Create Presentation Draft](https://live.rbg.tum.de/w/artemisintro/53604)
- [Manage User Settings](https://live.rbg.tum.de/w/artemisintro/53605)

- [Submit Thesis Application](https://live.rbg.tum.de/w/artemisintro/53606)
Allows students to apply for available thesis topics. Students can choose a topic, provide relevant personal details, and submit a motivation letter. This structured process helps reduce application stress by offering clear guidance on required steps.

- [Edit Thesis Application](https://live.rbg.tum.de/w/artemisintro/53607)
Enables students to modify their submitted application details before it is reviewed by an advisor. This feature allows for adjustments to personal information and application motivation to ensure accuracy.

- [Upload Proposal](https://live.rbg.tum.de/w/artemisintro/53608)
Facilitates the initial submission of the thesis proposal document. Students can submit proposals for review, and advisors can provide feedback directly through the platform, helping improve proposal quality.

- [Upload Thesis Files](https://live.rbg.tum.de/w/artemisintro/53609)
Allows students to upload their completed thesis documents and presentations. This section supports version history and locks file uploads after final submission, ensuring that no changes are made post-submission.

- [Create Presentation Draft](https://live.rbg.tum.de/w/artemisintro/53604)
Provides students with a section to draft their presentation, which can be reviewed and adjusted by advisors. Finalizing this draft ensures that the presentation aligns with thesis requirements and is accessible to invited attendees.

- [Manage User Settings](https://live.rbg.tum.de/w/artemisintro/53605)
Enables students to configure their account settings, including personal information such as study program and contact details, ensuring all details are up-to-date.

#### Advisor
- [Create Thesis Topic](https://live.rbg.tum.de/w/artemisintro/53599)
- [Review Applications](https://live.rbg.tum.de/w/artemisintro/53601)
- [Review Proposal](https://live.rbg.tum.de/w/artemisintro/53602)
- [Add Comments](https://live.rbg.tum.de/w/artemisintro/53600)
- [Schedule Presentation](https://live.rbg.tum.de/w/artemisintro/53603)
- [Submit Thesis Assessment](https://live.rbg.tum.de/w/artemisintro/53598)

- [Create Thesis Topic](https://live.rbg.tum.de/w/artemisintro/53599)
Allows advisors to create new thesis topics with relevant details, enabling students to browse and apply for them. This feature helps streamline the matching of students to research-aligned topics.

- [Review Applications](https://live.rbg.tum.de/w/artemisintro/53601)
Provides advisors with tools to review student applications. Advisors can assess motivation letters, academic backgrounds, and make an informed decision on each applicant.

- [Review Proposal](https://live.rbg.tum.de/w/artemisintro/53602)
Enables advisors to review submitted proposals, provide structured feedback, and help students refine their project objectives and approach before starting full thesis work.

- [Add Comments](https://live.rbg.tum.de/w/artemisintro/53600)
Lets advisors post comments and attach relevant files as milestones or feedback for students. This ensures key information is documented and easily referenced during the thesis process.

- [Schedule Presentation](https://live.rbg.tum.de/w/artemisintro/53603)
Provides a scheduling feature for thesis presentations, allowing advisors to set dates and invite relevant attendees, ensuring that students have a formal opportunity to present their work.

- [Submit Thesis Assessment](https://live.rbg.tum.de/w/artemisintro/53598)
Enables advisors to submit an evaluation of the thesis, including a recommended grade. This assessment informs the final grading and captures key feedback for student growth.

#### Supervisor
- [Add Final Grade + Complete Thesis](https://live.rbg.tum.de/w/artemisintro/53610)

- [Add Final Grade + Complete Thesis](https://live.rbg.tum.de/w/artemisintro/53610)
Allows supervisors to add the final grade and officially mark the thesis as complete. This feature consolidates all feedback and grading, ensuring the thesis lifecycle is fully documented.

## Developer Documentation

Expand Down
Loading

0 comments on commit 19ceb81

Please sign in to comment.