jelease - A newreleases.io ➡️ Jira connector

Automatically create Jira tickets when a newreleases.io release
is detected using webhooks.
Configuration
Jelease is configured via YAML files.
See jelease.yaml
for the default values.
Configuration files
Jelease looks for config files in multiple locations, where the latter overrides
config fields from the former.
On Linux:
- Default values (see
jelease.yaml
)
/etc/jelease/jelease.yaml
~/.config/jelease.yaml
~/.jelease.yaml
jelease.yaml
(in current directory)
On Windows:
- Default values (see
jelease.yaml
)
%APPDATA%/jelease.yaml
%USERPROFILE%/.jelease.yaml
jelease.yaml
(in current directory)
On Mac:
- Default values (see
jelease.yaml
)
/etc/jelease/jelease.yaml
~/Library/Application Support/jelease.yaml
~/.jelease.yaml
jelease.yaml
(in current directory)
JSON Schema
There's also a JSON Schema for the config file,
which gives you warnings and completion support inside your IDE.
Make use of it via e.g:
To make use of it, add the following comment to the beginning of your
config file:
# yaml-language-server: $schema=https://github.com/RiskIdent/jelease/raw/main/jelease.schema.json
Local usage
-
Create a GitHub PAT (e.g on https://github.com/settings/tokens)
-
Create a local config file, e.g at ~/.config/jelease.yaml
-
Add your local config to test with, including your newly generated PAT. E.g:
# yaml-language-server: $schema=https://github.com/RiskIdent/jelease/raw/main/jelease.schema.json
packages:
- name: neuvector
repos:
- url: https://github.example.com/some-org/some-repo
patches:
- regex:
file: helm/charts/ri-neuvector/Chart.yaml
match: '^appVersion: .*'
replace: 'appVersion: {{ .Version }}'
- regex:
file: helm/charts/ri-neuvector/Chart.yaml
match: '^version: (.*)'
replace: 'version: {{ index .Groups 1 | versionBump "0.0.1" }}'
github:
url: https://github.example.com
auth:
type: pat
token: ghp_loremipsum
-
Test that your local config is read correctly:
go run . config
-
Run Jelease locally, e.g:
# To test applying changes
go run . apply neuvector v1.2.3 --dryrun
# To test creating PRs
go run . apply neuvector v1.2.3
# To test the webhook receiver server, without creating issues or PRs
go run . serve --dryrun
# To test the webhook receiver server, with creating issues and PRs
go run . serve
-
To test out the webhooks, you can make use of our example webhook like so:
curl localhost:8080/webhook -d @examples/newreleasesio-webhook.json
Development
Prerequisites:
The HTML pages are templated using Templ. This is a manual step that
needs to be done after each code change to any .templ
files.
go generate
The generate command effectively runs go run ...
, so you don't
need templ
CLI installed.
Building the application and docker image
VERSION=v0.4.1
podman build . -t ghcr.io/riskident/jelease:${VERSION} --build-arg VERSION=${VERSION}
podman tag ghcr.io/riskident/jelease:{${VERSION},latest}
podman login ghcr.io
podman push ghcr.io/riskident/jelease:${VERSION}
podman push ghcr.io/riskident/jelease:latest
Releasing
Create and push a Git tag (prefixed with "v").
Our GitHub Action workflow with goreleaser
will build and create the release.
git checkout main
git pull
git tag v0.4.1 -m "v0.4.1"
git push --tags
Logo
The gopher logo is designed by Kristin Weyand, an employee at Risk.Ident.
The gopher logo of Jelease was inspired by the original Go gopher,
designed by Renee French.
License
This repository complies with the REUSE recommendations.
Different licenses are used for different files. In general:
Please see each file's header or accompanied .license
file for specifics.