Skip to content

jenkins-x-plugins/jx-changelog

Repository files navigation

jx changelog

Documentation Go Report Card Releases Apache Slack Status

jx-changelog is a small command line tool for generating release Changelog files

Debug

To debug jx changelog inside a Running container: First modify you pipeline by editing release.yaml in your project, before jx changelog create --version v${VERSION} add:

while sleep 10; do echo "waiting for debug"; done

build your version of jx changelog locally, and copy it inside the container

make build
kubectl cp ./build/jx-changelog release-xxxxxxxx:/ -c step-promote-changelog

once the pipeline reaches the promote-changelog step, exec into the container:

kubectl exec -it release-xxxxxxxx -c step-promote-changelog -- sh

and run:

apk update
apk add go
go get github.com/go-delve/delve/cmd/dlv

then debug your binary using dlv

source /workspace/source/.jx/variables.sh # copied from pipeline
/tekton/home/go/bin/dlv --listen=:2345 --headless=true --api-version=2 exec /jx-changelog create -- --version v${VERSION}

redirect traffic from your port 2345 to the container in another terminal

kubectl port-forward release-xxxxxxxx 2345

attach your debugger and happy debugging.

Do not forget to make build and kubectl cp after each change

Commands

See the jx-changelog command reference