File tree Expand file tree Collapse file tree 2 files changed +29
-9
lines changed
components/image-builder-bob Expand file tree Collapse file tree 2 files changed +29
-9
lines changed Original file line number Diff line number Diff line change 1212 "showLog" : true ,
1313 "trace" : " log" ,
1414 "logOutput" : " rpc"
15+ },
16+ {
17+ "name" : " bob proxy" ,
18+ "type" : " go" ,
19+ "request" : " launch" ,
20+ "mode" : " debug" ,
21+ "program" : " /workspace/gitpod/components/image-builder-bob/main.go" ,
22+ "args" : [" proxy" ],
23+ "envFile" : " /workspace/gitpod/components/image-builder-bob/bob.env"
1524 }
1625 ]
17- }
26+ }
Original file line number Diff line number Diff line change @@ -27,15 +27,26 @@ docker build -t localhost:5000/source:latest .
2727docker push localhost:5000/source:latest
2828```
2929
30- Build and run
30+ Build and Debug Locally
31+
3132```
32- # build and install bob (do this after every change)
33- cd /workspace/gitpod/components/image-builder-bob
34- go install
33+ # create a file using the contents of Google artifact registry https://www.notion.so/gitpod/Bob-proxy-env-vars-a8c3feb32092410296b7e913746fed45
34+
35+ touch /workspace/gitpod/components/image-builder-bob/bob.env
36+
37+ # Start bob proxy in debug mode using vs code `bob proxy`
38+ # Use CMD+SHIFT+D to open menu and then select bob proxy and then run
39+
40+ # Add break points as per your needs
41+
42+ # export bob.env variables so that bob build uses correct values while trying to build an image
43+
44+ set -a
45+ source <(cat bob.env | \
46+ sed -e '/^#/d;/^\s*$/d' -e "s/'/'\\\''/g" -e "s/=\(.*\)/='\1'/g")
47+ set +a
3548
36- # run bob
37- BOB_BASE_REF=localhost:5000/source:latest BOB_TARGET_REF=localhost:5000/target:83 sudo -E $(which bob) build
3849
39- # debug using delve
40- BOB_BASE_REF=localhost:5000/source:latest BOB_TARGET_REF=localhost:5000/target:83 sudo -E $(which dlv) --listen=:2345 --headless=true --api-version=2 exec $(which bob) build
50+ # Run bob build. This will trigger several calls to the container registry
51+ sudo -E $(which bob) build
4152```
You can’t perform that action at this time.
0 commit comments