Browse Source

reformat

pull/700/head
Chris 3 years ago
parent
commit
0ef03c3c5e
  1. 36
      docs/setup_of_external_repo.md

36
docs/setup_of_external_repo.md

@ -4,16 +4,16 @@
This document is a guide on how to add your own repository to store your projects and exercises.
This guide assumes that you have understood the files structures of the repository [public](https://github.com/01-edu/public).
It will only address the settings part of this task.
It will only address the settings part of this task.
The addition of projects will be treated first as it does not require the knowledge of docker.
However being familiar with docker is **mandatory** for adding your own exercises with your own tests.
However being familiar with docker is **mandatory** for adding your own exercises with your own tests.
## Prerequisites
-A github account where your exercises repository will be stored [https://github.com/](https://github.com/).
-A dockerHub account [https://hub.docker.com/](https://hub.docker.com/).
-A dockerHub account [https://hub.docker.com/](https://hub.docker.com/).
## Setup of GitHub repository
@ -30,15 +30,14 @@ It is the button `New` (the button is on the top corner right side)
- Inside the folder `firstproject` create a `README.md` file which you will use as the subject content of your first project
- After the subject content `README.md` is created, create a folder `audit` inside the `firstproject` directory
- Inside the `audit` folder create a `README.md` that respect the audit type of file. We advise you to take an example such as the
ascii-art audit `README.md` file. Here is the [link](https://raw.githubusercontent.com/01-edu/public/master/subjects/ascii-art/audit/README.md) to the raw file.
ascii-art audit `README.md` file. Here is the [link](https://raw.githubusercontent.com/01-edu/public/master/subjects/ascii-art/audit/README.md) to the raw file.
- Once all those files are done, git push them to your new repository
### Publish the repository on github pages
- Go to the settings tab of your projects repository.
- On the option page find the GitHub Pages section.
- Please see below the settings to follow.
- Note that the branch may be called `main` instead of `master`.
- Please see below the settings to follow.
(Please not that it might take up to 10 mins for your page to be pusblished)
![sceenshot 1](img/adding-exercises-repository/1.png)
@ -51,17 +50,17 @@ ascii-art audit `README.md` file. Here is the [link](https://raw.githubuserconte
Example:
If user Frenchris, added an exercise to the nameofyourrepo called `firstproject`
This is the path where the README.md subject would be.
This is the path where the README.md subject would be.
https://frenchris.github.io/nameofyourrepo/subjects/firstproject/
Note that you do not keep the README.md at the end of the path but you do keep the `/`
This path should be added to the attribute “subject” of type string in the object attribute of the new exercise.
This path should be added to the attribute “subject” of type string in the object attribute of the new exercise.
Additionally the README.md audit path would be.
Additionally the README.md audit path would be.
https://frenchris.github.io/nameofyourrepo/subjects/firstproject/audit/
This path should be added to the attribute “subject” of type string in the object attribute of the new exercise.
This path should be added to the attribute “subject” of type string in the object attribute of the new exercise.
- Once both those path are noted, create your project on your server.
@ -70,8 +69,8 @@ This path should be added to the attribute “subject” of type string in the o
- And add the `audit` and `subject` attributes (of type `string`) with the previously noted paths
Once the attributes are filled.
- Create a module, called `Div-custom` for example. Add its standard attributes.
Once the attributes are filled.
- Create a module, called `Div-custom` for example. Add its standard attributes.
- Add `firstproject` as a child to `Div-custom`.
**Note**: If you do not wish students from other events to be selected for matches in this new event.
@ -83,7 +82,7 @@ This attribute will isole the event during matches to the user of the event.
- Add this `Div-custom` as a child in your campus object
- Go to event, and launch the event `yourcampus/Div-custom`
- Add yourself and other testing accounts to the newly launched event.
- Test your subject by creating a group and launching an audit.
- Test your subject by creating a group and launching an audit.
If the paths are correctly inputed and your repository is correctly publicly published on gitHub pages, you will see your subject and your audit in the platform.
## Setup of your docker repository
@ -92,7 +91,7 @@ If the paths are correctly inputed and your repository is correctly publicly pub
- 2. In your account, go to your settings and link your github account.
- 3. Create a repository named “test” and make sure that your github account is linked.
- 3. Create a repository named “test” and make sure that your github account is linked.
If you see this image,
![sceenshot 2](img/adding-exercises-repository/2.png)
@ -103,20 +102,19 @@ It means your github account is correctly linked.
![sceenshot 3](img/adding-exercises-repository/3.png)
- 5. Once the build is complete (it can take 5 to 15 mins). Go back to the attributes of the exercise,
Add the attribute **testImage (type string)**
Fill it with the name of the repository,
**In this example: frenchris/test**
**In this example: frenchris/test**
- 6. Once your exercise has both the attributes completed correctly, the exercise is viable and can be tested on the server which was selected for its addition.
- 6. Once your exercise has both the attributes completed correctly, the exercise is viable and can be tested on the server which was selected for its addition.
- 7. As a reminder to test the exercise it is suggested to follow these steps:
a. `Create` a custom `Quest-test` object
b. `Adding` the new `exercise` object as a child to the newly created `Quest-test` object
c. `Create` a `Piscine-test` object
d. `Adding` the new `Quest-test` as a child to the newly created `Piscine-test` object
e. `Adding` the `Piscine-test` to the `campus` object as **first child**
e. `Adding` the `Piscine-test` to the `campus` object as **first child**
f. Go to the event page and launch the newly created `Piscine-test`. (You may need to refresh the page 2-3 times before the `campus/Piscine-test` option appears)
g. Once the event is launched, use the event page to add yourself as a student in the launched event `Piscine-test`
h. You can now try the exercise. If everything is well set, the subject should be loaded and, when you submit a correct solution, the exercise should pass.
h. You can now try the exercise. If everything is well set, the subject should be loaded and, when you submit a correct solution, the exercise should pass.

Loading…
Cancel
Save