|
|
|
## Coding Workspace
|
|
|
|
|
|
|
|
Coding workspace provides you all the set of tools and dependencies required for coding
|
|
|
|
at iotiot or shunyaos.
|
|
|
|
|
|
|
|
|
|
|
|
Goal of the workspace is to provide same working environment to all the developers writing code.
|
|
|
|
|
|
|
|
|
|
|
|
### Requirements for coding workspace
|
|
|
|
1. Vscode
|
|
|
|
2. Vscode Remote-Development Plugin
|
|
|
|
3. Docker
|
|
|
|
|
|
|
|
See [Installing required Tools for Coding](Installing-Required-Tools), for step by step instructions on how to install these requirements.
|
|
|
|
|
|
|
|
|
|
|
|
### Steps to start Coding Workspace
|
|
|
|
|
|
|
|
1. Get the workspace for coding
|
|
|
|
- Download the ready to use workspace for refactoring - https://gitlab.iotiot.in/newbies/coding-workspace/-/archive/master/coding-workspace-master.zip
|
|
|
|
|
|
|
|
- Unzip the `coding-workspace-master.zip`
|
|
|
|
|
|
|
|
- Open VScode.
|
|
|
|
|
|
|
|
- Press `Ctrl` + `Shift` + `p` in VScode. A bar will open up at the top.
|
|
|
|
|
|
|
|
- Search for `Remote-Containers`
|
|
|
|

|
|
|
|
|
|
|
|
- Click on "Remote-Containers: Open Folder in Containers".
|
|
|
|
|
|
|
|
- In the pop up Window, Navigate to Downloads --> coding-workspace-master folder
|
|
|
|

|
|
|
|
|
|
|
|
- Click on Open.
|
|
|
|
|
|
|
|
- Vscode will take some time to start up the container, once done
|
|
|
|
|
|
|
|
- Open up terminal by Pressing `Ctrl` + `j`.
|
|
|
|

|
|
|
|
|
|
|
|
- That is it done you have successfully opened up the workspace. Now you can follow the regular git workflow.
|
|
|
|
|
|
|
|
2. Clone the repository.
|
|
|
|
```sh
|
|
|
|
git clone {repository-url}
|
|
|
|
```
|
|
|
|
|
|
|
|
3. Make changes to the code
|
|
|
|
- Your code files will be visible in the left had section in vscode.
|
|
|
|
- Click on the file to start editing the file.
|
|
|
|
- To Save you can press `Ctrl` + `s`
|
|
|
|
|
|
|
|
4. Submit the changes.
|
|
|
|
- Open up terminal by Pressing `Ctrl` + `j`.
|
|
|
|
- Run commands
|
|
|
|
```sh
|
|
|
|
git config --global user.name "{Your-name}"
|
|
|
|
#(for ex: `git config --global user.name "Yogesh Hegde"`)
|
|
|
|
git config --global user.email "{your-email-id}"
|
|
|
|
#(for ex: `git config --global user.email "yogesh@iotiot.in"`)
|
|
|
|
git add .
|
|
|
|
git commit -m "made XXX changes"
|
|
|
|
git push
|
|
|
|
```
|
|
|
|

|
|
|
|
|
|
|
|
5. See your code Build, Test and Deploy via CI/CD.
|
|
|
|
- Go to the repository that you have cloned, CI/CD --> Pipelines.
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
- You can see Build, Test and Deploy devOps stages passing.
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
- Click on the `passed/failed` to see all the individual stage summary.
|
|
|
|
 |