Skip to main content

Versioning tools for CI

Project description

Versioning tools for CI

project-version

Example use in .gitlab-cy.yml:

version:
  image: docker.io/alikov/ci-version-tools:0.1.0.dev2
  stage: .pre
  script:
    - project-version
        --version-source-file ./VERSION
        --git-version-tag-prefix v
        --dev-identifier dev
        --dev-nr "${CI_PIPELINE_IID:-0}"
        ${CI_COMMIT_TAG:+--git-tag "$CI_COMMIT_TAG"} | tee version.env
  artifacts:
    reports:
      dotenv:
        - version.env

.build-image:
  stage: build
  image: $BUILDAH_CI_IMAGE
  script:
    - IMAGE="${CI_REGISTRY_IMAGE}:${VERSION_SEMVER}"
    - buildah build -t "$IMAGE" .
    - buildah inspect "$IMAGE"
    - buildah push "$IMAGE"
    - buildah push "$IMAGE" "${CI_REGISTRY_IMAGE}:${VERSION_SEMVER_MAJOR}"
    - buildah push "$IMAGE" "${CI_REGISTRY_IMAGE}:${VERSION_SEMVER_MINOR}"
    - [ -z "$VERSION_IS_LATEST_RELEASE" ] || buildah push "$IMAGE" "${CI_REGISTRY_IMAGE}:latest"
  needs:
    - version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ci_version_tools-0.1.0.dev3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

ci_version_tools-0.1.0.dev3-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file ci_version_tools-0.1.0.dev3.tar.gz.

File metadata

  • Download URL: ci_version_tools-0.1.0.dev3.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.6.31-linuxkit

File hashes

Hashes for ci_version_tools-0.1.0.dev3.tar.gz
Algorithm Hash digest
SHA256 b7f81132f788fb13008dea0bdf6b2a91e16b0b885303b7f8007d3058547bac4e
MD5 059f63fc870f85cf85a92329e4ccc73f
BLAKE2b-256 115014659a9e65ca34eec39c713e07609bdf533c2d17917f469b01a5a3ffa75f

See more details on using hashes here.

File details

Details for the file ci_version_tools-0.1.0.dev3-py3-none-any.whl.

File metadata

File hashes

Hashes for ci_version_tools-0.1.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 94f3dcf3eee148940cc10c9b5ce09d8c333fcb5b1d2009f3a3b9b297c18db6b1
MD5 ccb6d126a916f04d6e3054a50210b72a
BLAKE2b-256 d44dec10b309360f4c29c5d94d6ea74b7c1d738c3ce873bcde305da40608eab9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page