Sign inSign up

jfxs/commitizen-semantic-release

By jfxs

•Updated 2 months ago

An up-to-date image to easily sign commit, use commitizen and publish release with semantic-release

Image
Developer tools
0

10K+

jfxs/commitizen-semantic-release repository overview

⁠Commitizen semantic-release

Software License Pipeline Status

A Node.js⁠ Docker image with commitizen⁠ and semantic-release⁠:

  • lightweight image based on a debian-slim,
  • multiarch with support of amd64 and arm64,
  • automatically updated by comparing software bill of materials (SBOM) changes,
  • image signed with Cosign⁠,
  • a software bill of materials (SBOM) attestation added using Syft⁠,
  • available on Docker Hub and Quay.io.

GitLab The main repository.

Docker Hub The Docker Hub registry.

Quay.io The Quay.io registry.

⁠Running Commitizen and semantic-release

⁠Sign a commit

Use task⁠ with the git task template⁠:

task git:commit KEY_PATH|K=<key_full_path> MESSAGE|M=<message> [OPTION|O="<options>"] [PULL|P=<n|N>]

or manual:

# Start a container with the mount point of your private key and your git repository
docker run -d --name commit -v "<absolute_path_private_key:/Private" -v "$(pwd):/data" jfxs/commitizen-semantic-release sleep infinity
# Import your private key
docker exec -it commit /bin/sh -c 'export GPG_TTY=$(tty); gpg --batch --import /private/<private_key>'
# Commit
docker exec -it commit /bin/sh -c 'export GPG_TTY=$(tty); git commit -S --signoff -m "Your commit message"'
# Stop and delete the container
docker stop commit && docker rm commit
⁠Commitizen with cz-conventional-changelog

Use task⁠ with the git task template⁠:

task git:commitizen KEY_PATH|K=<key_full_path> [PULL|P=<n|N>]

or manual:

# Start a container with the mount point of your private key and your git repository
docker run -d --name commit -v "<absolute_path_private_key:/Private" -v "$(pwd)/data" jfxs/commitizen-semantic-release sleep infinity
# Import your private key
docker exec -it commit /bin/sh -c 'export GPG_TTY=$(tty); gpg --batch --import /private/<private_key>'
# Commit
docker exec -it commit /bin/sh -c 'export GPG_TTY=$(tty); npx cz --signoff'
# Stop and delete the container
docker stop commit && docker rm commit
⁠semantic-release

Example of usage with Gitlab-CI:

 ...
gitlab-release:
  image: jfxs/commitizen-semantic-release
  stage: gitlab-release
  script:
    - npx semantic-release
  rules:
    - if: $CI_COMMIT_TAG
      when: never
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

⁠Built with

Docker latest tag is 25.0.8-003, 25.0, 25⁠ and has:

NameVersionType
@semantic-release/changelog7.0.0npm
@semantic-release/commit-analyzer13.0.1npm
@semantic-release/exec7.1.0npm
@semantic-release/git11.0.1npm
@semantic-release/github12.0.9npm
@semantic-release/gitlab13.3.3npm
@semantic-release/release-notes-generator14.1.1npm
commitizen4.3.2npm
cz-conventional-changelog3.3.0npm
git1:2.39.5-0+deb12u3deb
github.com/go-task/task/v3v3.52.0go-module
gnupg2.2.40-1.1+deb12u2deb
node24.18.0UnknownPackage
semantic-release25.0.8npm

Dockerhub Overview page⁠ has the details of the last published image.

⁠Versioning

Docker tag definition:

  • the semantic-release version used,
  • a dash
  • an increment to differentiate build with the same version starting at 001
<semantic-release_version>-<increment>

Example: 23.0.0-001

⁠Signature and attestation

Cosign⁠ public key:

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEa3yV6+yd/l4zh/tfT6Tx+zn0dhy3
BhFqSad1norLeKSCN2MILv4fZ9GA6ODOlJOw+7vzUvzZVr9IXnxEdjoWJw==
-----END PUBLIC KEY-----

The public key is also available online: https://gitlab.com/op_so/docker/cosign-public-key/-/raw/main/cosign.pub⁠.

To verify an image:

cosign verify --key cosign.pub $IMAGE_URI

To verify and get the software bill of materials (SBOM) attestation:

cosign verify-attestation --key cosign.pub --type spdxjson $IMAGE_URI | jq '.payload | @base64d | fromjson | .predicate'

⁠Authors

⁠License

This program is free software: you can redistribute it and/or modify it under the terms of the MIT License (MIT). See the LICENSE⁠ for details.

Tag summary

Content type

Image

Digest

sha256:46a26e23f…

Size

168.8 MB

Last updated

2 months ago

docker pull jfxs/commitizen-semantic-release