Skip to content

Commit

Permalink
Merge branch '2021' of github.com:KTH/devops-course into 2021
Browse files Browse the repository at this point in the history
* '2021' of github.com:KTH/devops-course: (88 commits)
  Executable-Tutorial: API testing using RestSharp and Specflow in C# application (KTH#1122)
  Update feedback README
  Feedback Proposal: Serverless Applications on Heroku (KTH#1100)
  Final Submission: Dashboard for tasks (KTH#1034)
  Essay : Role of DevOps in minimizing downtime on applications using Continuous deployment (KTH#1080)
  Essay: A/B testing (KTH#979)
  Tutorial: Added team member and changed to locally run tutorial (KTH#1090)
  Added myself as a participant on an existing project (KTH#1125)
  Course Automation: Suggesting legal teammates for projects (KTH#1073)
  Demo proposal 🎥  : Testing and running Github actions locally with Act (KTH#1120)
  Delete contributions/presentation/week4/despinoy-gdba directory
  Changing our presentation date from week 4 to week 5  (KTH#1129)
  Executable tutorial: CI workflow using GitHub actions for Node.js Express app, including automated testing and linting using Jest and Eslint (KTH#1116)
  fix folder name (KTH#1118)
  Feeback on essay (KTH#1023) (KTH#1110)
  Executable tutorial: Secure an API endpoint using Keycloak running in Docker (KTH#1094)
  Essay proposal: Security challenges that arise in DevOps (Title WIP) (KTH#1027)
  Video demo submission (KTH#1112)
  Demo: Merging tool for Salesforce Deployments (KTH#1098)
  Course automation: Improve communication with Discord integration (KTH#1097)
  ...
  • Loading branch information
arxra committed Apr 6, 2021
2 parents 0b5b0ac + 03c46f3 commit 3aaeee0
Show file tree
Hide file tree
Showing 98 changed files with 11,881 additions and 52 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/assignment-statistics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This is a basic workflow to help you get started with Actions

name: Statistic Information for Each Assignment Category

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the 2021 branch
push:
branches:
- "2021"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
count-assignments:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Setup Python
- name: Setup Python
uses: actions/setup-python@v2.2.1
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f ./tools/requirements.txt ]; then pip install -r ./tools/requirements.txt; fi
# Set timezone to Europe/Stockholm
- name: Set timezone
run: sudo timedatectl set-timezone Europe/Stockholm

# Runs a single command using the runners shell
- name: Update the statistic issue
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_FULLNAME: ${{ github.repository }}
CONTRIBUTIONS_PATH: ${{ secrets.ASSIGNMENT_STAT_CONTRIBUTIONS_PATH }}
ISSUE_NUMBER: ${{ secrets.ASSIGNMENT_STAT_ISSUE_NUMBER }}
run: python ./tools/stat_submissions.py -p $CONTRIBUTIONS_PATH --printInMarkdown --printStudentStat --publish
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The schedule is at <https://www.kth.se/social/course/DD2482/calendar/>
### Week 2 <https://kth-se.zoom.us/j/67189910023>
* Technical Briefing (B. Baudry)
* Preparatory material [Testing at scale](https://increment.com/testing/testing-at-scale/)
* Guest Lecture: Continuous Integration [Mats Skoglund (Scania)](https://www.linkedin.com/in/matsskoglund/).
* Guest Lecture: Continuous Integration [Mats Skoglund (Scania)](https://www.linkedin.com/in/matsskoglund/). [Slides for the guest lecture](https://kth.box.com/s/0qs9tab2tdip66dia3a6k4dbie463ytg)
* Student presentations

### Week 3
Expand Down
27 changes: 27 additions & 0 deletions contributions/course-automation/annnik/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Course automation: Improve communication with Discord integration

## Members
Anna Nikolskaya (annnik@kth.se)

Github username: annsudo

## Proposal
The goal of this automation is to help TAs and Professors to reach students through Discord with imergent announsements. If the "Extra"-section is implemented the action will also decrease the respond time from the students on making changes to their pull requests

## What the action does

- ✅ Filter the actors (should only be triggered for TAs and professors actions)
- ✅ Filter events (on what event´s should it be triggered: new issues/ change in head README / special commits..)
- ✅ Standarize format (so that action can be triggerd for several types of events by ex using labels)
- ✅ Integrate with Discord
- ✅ Customize what information should be included in the Discord messages
- ✅ Send messages to Discord

## Extra (if time allows)
I would also want to make it possible to customize this action so the event can be triggered:
- to the official discord channel (when it conserns all course members)
- to only person it conserns


## May change
The precise logic on first 3 points will be developed further with the goal of making the automation elegeant and intuitive
35 changes: 35 additions & 0 deletions contributions/course-automation/arieltan-carinawi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Course Automation: Suggesting legal teammates for projects

## Members
- [Carina Wickström](https://github.com/carinawic) (carinawi@kth.se)
- [Justin](https://github.com/Agriad) (arieltan@kth.se)

## Proposal
We would like to use github actions to propose teammates for students.
Students can open an issue to request for teammates.

When the student searching for a legal teammate, a list will be given of students' email addresses, where they have the following criteria:

- The potential teammate has posted < 4 project proposals
- The students and the potential teammate have not worked in the same group more than once before
- The potential teammate has not yet proposed a project in that category.

For example:

Looking for a teammate:
carinawi@kth.se

Legal teammates:
course-automation: arieltan@kth.se, arieltan2@kth.se, arieltan3@kth.se...
Essay: ...


We aim to fulfill the following criteria:
| | Yes | No | Remarkable |
|-------------------------------------------- | ----|----|-------------|
|The work is done before April 6, 2021 (in order to be useful for the course) |Yes | **No** | n-a|
|The automation task produces a PR status or issue / PR comment | **Yes** |No |Points to a generated page with valuable additional information|
|The automation task is reusable |**Yes (next year for this course)**| No |**In other courses than this one (if they have the smae group formation structure)**|
|The task runs on a standard platform |**Yes (Github action)** |No| Other platforms (e.g. Moodle, Canvas)|
|The task is praised by the other students of this course| **Yes**| No| n-a|
|The code for the task is available |**Yes (public repo)**| No |**Well documented repo**|
2 changes: 2 additions & 0 deletions contributions/course-automation/axp-chrigu/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pr-comment/node_modules
dashboard-generator/node_modules
16 changes: 13 additions & 3 deletions contributions/course-automation/axp-chrigu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Github: [ChristopherGustafson](https://github.com/ChristopherGustafson)

## Proposal

Create a GitHub action that is triggered when new tasks / proposals are committed to the repository, this will then generate a dashboard of all the contributions made overall, including those submitted in the previous years.
Create a GitHub action that is triggered when new tasks/proposals are committed to the repository, this will then generate a dashboard of all the contributions made overall, including those submitted in the previous years.

The requirements for the actions are:

Expand All @@ -19,6 +19,16 @@ The requirements for the actions are:
- Link to the task
- Classify if completed or not
- Group by year and category
- Display the number of submissions per category / year
- Display the number of submissions per category/year
- Search for repeated tasks
- Provide a summary per year: nb of taks per category, nb of submissions, etc.
- Provide a summary per year: nb of tasks per category, nb of submissions, etc.

## Final Solution

In this folder, you can find the source code of the final solution for the course repo dashboard. It is divided into two separate GitHub actions, one for generating the dashboard and one for commenting on a pull request that the dashboard has been generated. Instructions on how to set up these actions can be found in the README's of the respective folders. A preview of the final solution can also be found in this [fork](https://github.com/Ackuq/devops-course) where the ```dashboard.md``` file is the final result when someone creates a pull request.

During the project, some limitations were found that led us to alter or disregard some of the proposed requirements above. The following requirements were revised:

* Authors and titles of all the tasks were not able to be extracted as there is no common structure that all tasks follow for presenting authors and title. The most common patterns were extracted, but for some tasks, the authors and title will not be identified and displayed as "Authors/Title not found".
* For the same reason, the requirement "Classify if completed or not" was completely disregarded. Since there exists no clear structure for if a task is completed or not, we quickly realized that classifying these was outside the scope of this project.
* The requirement "Search for repeated tasks" was altered to instead search for tasks concerning the same technologies. We realized that two tasks might be the same but have slightly different titles, and it would thus be hard to figure out which tasks were concerning the same problem. We therefore altered the requirement to address a different, but still relevant question.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Dashboard generator

A GitHub action to generate a dashboard for the repository of the course DD2482 (DevOps). The action categorize submissions by year, type of task, and technology keywords.

## Output

`dashboard` - The generated dashboard markdown, in string form.

The generated sections are described below.

### Submissions per year

A table that shows how many submissions are made per year of the course.

### Year submission

These sections shows all of the submissions done for each year, categorized into the category of the submissions.

### Keywords

This section shows a summary of technology keywords used in the description of the submission.

## Usage

```yaml
name: Generate Dashboard
on: push

jobs:
generate-dashboard:
name: Generate dashboard
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.4
- name: Generate dashboard
uses: ./contributions/course-automation/axp-chrigu/dashboard-generator/
id: dashboard
- name: Push new dashboard
id: push
run: |
echo "${{ steps.dashboard.outputs.dashboard }}" > dashboard.md
if [ -z "$(git status --porcelain)" ]; then
echo "::set-output name=did_push::false"
else
git config --global user.name 'Dashboard bot'
git config --global user.email 'dashboard-bot-dd2482@users.noreply.github.com'
git add ./dashboard.md
git commit -m "Generated dashboard"
git push
echo "::set-output name=did_push::true"
fi
```
## Contributors
Axel Pettersson - [Ackuq](https://github.com/Ackuq)
Christopher Gustafson - [ChristopherGustafson](https://github.com/ChristopherGustafson)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: "Generate dashboard"
description: "Generate dashboard markdown"
outputs:
dashboard:
description: "The dashboard as a string"
runs:
using: "node12"
main: "dist/index.js"
Loading

0 comments on commit 3aaeee0

Please sign in to comment.