Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

azuwis/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 and add

script: |
  #!/usr/bin/env sh
  # default script content before `jx changelog create` in https://github.com/jenkins-x/jx3-pipeline-catalog/blob/master/tasks/gradle/release.yaml or similar
  while sleep 10; do echo "waiting for debug"; done

to the step promote-changelog

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 doesn't work anymore, version of alpine too old
wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go install github.com/go-delve/delve/cmd/dlv@latest

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

About

a plugin which creates a release changelog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 83.9%
  • Shell 10.1%
  • Makefile 5.8%
  • Dockerfile 0.2%