Add option to launch all needed services for local development (#988)

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
Lauris BH 2022-06-17 17:24:49 +03:00 committed by GitHub
parent 08479390ff
commit 99f1b70570
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

1
.gitignore vendored
View file

@ -13,6 +13,7 @@
*.so *.so
*.dylib *.dylib
vendor/ vendor/
__debug_bin
# Test binary, built with `go test -c` # Test binary, built with `go test -c`
*.test *.test

15
.vscode/launch.json vendored
View file

@ -1,8 +1,16 @@
{ {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"compounds": [
{
"name": "Woodpecker CI",
"configurations": [
"Woodpecker UI",
"Woodpecker server",
"Woodpecker agent"
],
"stopAll": true
}
],
"configurations": [ "configurations": [
{ {
"name": "Woodpecker server", "name": "Woodpecker server",
@ -39,7 +47,6 @@
"start", "start",
], ],
"cwd": "${workspaceFolder}/web", "cwd": "${workspaceFolder}/web",
"port": 3000,
"resolveSourceMapLocations": [ "resolveSourceMapLocations": [
"${workspaceFolder}/web/**", "${workspaceFolder}/web/**",
"!**/node_modules/**" "!**/node_modules/**"

View file

@ -63,7 +63,9 @@ Create an O-Auth app for your forge as describe in the [forges documentation](/d
## Developing with VS-Code ## Developing with VS-Code
You can use different methods for debugging the Woodpecker applications. One of the currently recommend ways to debug and test the Woodpecker application is using [VS-Code](https://code.visualstudio.com/) or [VS-Codium](https://vscodium.com/) (Open-Source binaries of VS-Code) as most maintainers are using it and Woodpecker already includes the needed debug configurations for it. You can use different methods for debugging the Woodpecker applications. One of the currently recommended ways to debug and test the Woodpecker application is using [VS-Code](https://code.visualstudio.com/) or [VS-Codium](https://vscodium.com/) (Open-Source binaries of VS-Code) as most maintainers are using it and Woodpecker already includes the needed debug configurations for it.
To launch all needed services for local development you can use "Woodpecker CI" debugging configuration that will launch UI, server and agent in debugging mode. Then open `http://localhost:8000` to access it.
As a starting guide for programming Go with VS-Code you can use this video guide: As a starting guide for programming Go with VS-Code you can use this video guide:
[![Getting started with Go in VS-Code](https://img.youtube.com/vi/1MXIGYrMk80/0.jpg)](https://www.youtube.com/watch?v=1MXIGYrMk80) [![Getting started with Go in VS-Code](https://img.youtube.com/vi/1MXIGYrMk80/0.jpg)](https://www.youtube.com/watch?v=1MXIGYrMk80)