{"id":21867251,"url":"https://github.com/logchange/valhalla","last_synced_at":"2026-02-12T08:16:21.479Z","repository":{"id":198877976,"uuid":"701728426","full_name":"logchange/valhalla","owner":"logchange","description":"🌌 valhalla is a toolkit designed to streamline the release of new versions of software. 🌌","archived":false,"fork":false,"pushed_at":"2025-01-27T20:00:10.000Z","size":117,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T10:21:26.440Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/logchange.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-07T11:48:43.000Z","updated_at":"2025-02-02T10:52:40.000Z","dependencies_parsed_at":"2023-10-20T16:35:33.244Z","dependency_job_id":"cf30c2f0-d17f-478f-9cc3-c54af4e3e2a8","html_url":"https://github.com/logchange/valhalla","commit_stats":null,"previous_names":["logchange/valhalla"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logchange%2Fvalhalla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logchange%2Fvalhalla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logchange%2Fvalhalla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logchange%2Fvalhalla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logchange","download_url":"https://codeload.github.com/logchange/valhalla/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248969606,"owners_count":21191293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T05:08:49.846Z","updated_at":"2026-02-12T08:16:21.460Z","avatar_url":"https://github.com/logchange.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌌 valhalla 🌌\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/logchange/valhalla/graphs/contributors\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/contributors/logchange/valhalla\" alt=\"Contributors\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/logchange/valhalla/pulse\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/commit-activity/m/logchange/valhalla\" alt=\"Activity\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://hub.docker.com/repository/docker/logchange/valhalla/\"\u003e\n        \u003cimg src=\"https://img.shields.io/docker/v/logchange/valhalla?sort=semver\u0026color=green\u0026label=DockerHub\" alt=\"DockerHub\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://hub.docker.com/repository/docker/logchange/valhalla/\"\u003e\n        \u003cimg src=\"https://img.shields.io/docker/pulls/logchange/valhalla\" alt=\"DockerHub Pulls\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/logchange/valhalla\"\u003e\n        \u003cimg src=\"https://codecov.io/gh/logchange/valhalla/graph/badge.svg?token=SP3V6ZQ039\" alt=\"codecov\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## [Documentation](https://logchange.dev/tools/valhalla/)\n\nVisit **[logchange.dev/tools/valhalla](https://logchange.dev/tools/valhalla/)** to read the full documentation, explore \nusage examples, and learn how to get the most out of Valhalla.\n\n\n### 📐 background and basic concept\n\n- **complex releasing process:** Creating a new software release involves a multitude of intricate steps. This\n  complexity\n  often results in human errors, time wastage, and a lack of compliance with essential rules and standards.\n\n- **manual workflow:** Traditional release processes rely on manual intervention, making them prone to inefficiencies\n  and mistakes, including configuration errors, missed details, and missteps.\n\n- **time inefficiency:** Managing releases manually can be time-consuming. Waiting for human interventions, addressing\n  errors, and navigating through intricate procedures can lead to delays.\n\n- **compliance challenges:** Ensuring adherence to specific rules and standards is vital for software releases. However,\n  manual processes may overlook or deviate from these guidelines, potentially causing compliance issues or security\n  vulnerabilities.\n\nvalhalla offers an automated solution to these challenges, streamlining the software release process, minimizing errors,\nsaving time, and promoting compliance with established regulations.\n\n### ⚙️ configuration\n\n- Create `valhalla.yml` in your project (check out [examples](https://github.com/logchange/valhalla/tree/master/examples)) (check out [reference](https://logchange.dev/tools/valhalla/reference/#basic-structure))\n- Create access token and pass it to CI as environment variable `VALHALLA_TOKEN`\n- Update or CI/CD scripts to use valhalla (see below for examples)\n- Update your `.gitignore` ! see [link](#-gitignore)\n\n### 🔸 usage\n\n**by branch:**\n\n1. Create branch `release-X.X.X` where `X.X.X` is a name of the version that is going to be released. You can also use\n   extensions like `release-2.10.4-RC`. To use different release kind use f.e. `release-hotfix-X.X.X`.\n2. Valhalla will do everything for you 🚀\n\n**by `VALHALLA_RELEASE_CMD` env variable:**\n\n1. Set `VALHALLA_RELEASE_CMD` env variable to `release-X.X.X` where `X.X.X` is a name of the version that is going to be\n   released. You can also use\n   extensions like `release-2.10.4-RC`. To use different release kind use f.e. `release-hotfix-X.X.X`.\n2. Valhalla will do everything for you 🚀\n\n### 👨🏻‍👦🏻 inheritance\n\nTo simplify managing multimple repositories, you can use `extends:` keyword.\n\n```yml\nextends:\n  - https://raw.githubusercontent.com/logchange/valhalla/master/valhalla.yml\n```\n\nYou can point to any URL that is `valhalla.yml` format, and it will be loaded and then override by values from\ncurrent file. Currently, you can only inherit once and from one URL, so it means if you inherit from a file, that also\ncontains\n`extends` keyword, it won't be evaluated.\n\n## 🔀 many use cases at once! (different release kinds)\n\nvalhalla supports different use cases. F.e. you want to have ability to create minor release and hotfix\nbut these processes have different steps. You can do it!\n\nWhat you have to do is to define 2 files:\n\n- valhalla.yml\n- valhalla-hotfix.yml\n\nAnd now, when you want to start one of this process:\n\n- to create minor release using `valhalla.yml` create branch matching regex: `release-*`\n- to create hotfix release using `valhalla-hotfix.yml` create branch matching regex: `release-hotfix-*`\n\nThis is only example, and you can define any suffix, f.e `valhalla-super-release.yml` needs\nbranch `release-super-release-*`\n\n*You can only define f.e. `valhalla-minor.yml` and you do not need `valhalla.yml`, but your branches name triggering\nrelease must meet convention*\n\n## 🔢 variables\n\n**Use `{}` to evaluate variable to value f.e. `{FOOBAR}`**\n\n**hierarchy (from most important):**\n\n- predefined variables\n- custom variables\n- environment variables\n\nSo, if there is predefined variable, you cannot override it or if same variable exists in environment,\nthe value always will be as in predefined. If you define your custom variable and the same exists in environment,\nthe value will be as defined by you. This hierarchy protects valhalla from errors and gives ability to extends\nand override values in custom use cases.\n\n### 🖖 predefined variables\n\n**Use `{}` to evaluate variable to value f.e. `{VERSION}`**\n\n|       name       |                                                                                                                   description                                                                                                                   |\n|:----------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n|    `VERSION`     |                                                                      value extracted from branch name or `VALHALLA_RELEASE_CMD`, for `release-1.2.14` it will be `1.2.14`                                                                       |\n| `VERSION_MAJOR`  |                                                                         value extracted from branch name or `VALHALLA_RELEASE_CMD`, for `release-1.2.14` it will be `1`                                                                         |\n| `VERSION_MINOR`  |                                                                         value extracted from branch name or `VALHALLA_RELEASE_CMD`, for `release-1.2.14` it will be `2`                                                                         |\n| `VERSION_PATCH`  |                                                                        value extracted from branch name or `VALHALLA_RELEASE_CMD`, for `release-1.2.14` it will be `14`                                                                         |\n|  `VERSION_SLUG`  | value extracted from branch name or `VALHALLA_RELEASE_CMD` and with everything except 0-9 and a-z replaced with -. No leading / trailing -, \u003cbr/\u003efor `release-1.2.14` it will be `1-2-14`. Use in URLs, host names, domain names and file names |\n| `VALHALLA_TOKEN` |                                                                                                token passed to CI runner which execute this job                                                                                                 |\n|     `AUTHOR`     |                                                                                              author of the release (who triggered release process)                                                                                              |\n\n\n### 🏭 custom variables\n\nYou can define custom variables which can be used by defining them in strings using `{}`\n\n```yml\nvariables:\n  MY_VARIABLE: Some value\n\nmerge_request:\n  enabled: True\n  title: Releasing version {VERSION} and preparation for next development cycle {MY_VARIABLE}\n```\n\n**It is really useful with `extends` mechanism, f.e. define general template with `variables`\nwhich will be overriden in child `valhalla.yml`.**\n\n### 🐛 environment variables\n\nValhalla allows you to use any variable defined in your environment system, it is useful f.e when you\nare using GitLab CI/CD and you want to\nuse [GitLab CI/CD predefined variables](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html)\nin your `valhalla.yml`.\n\n**Use `{}` to evaluate variable to value f.e. `{HOME}`**\n\n### 🦊 .gitlab-ci.yml\n\n- if using GitLab workflows\n  for `merge requests workflow` [(link)](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Workflows/MergeRequest-Pipelines.gitlab-ci.yml)\n  you have to add `if: $CI_COMMIT_BRANCH =~ /^release-*/ \u0026\u0026 $CI_COMMIT_TITLE !~ /.*VALHALLA SKIP.*/` to global workflow\n  configuration\n\n```yml\n\n# Modify your workflow rules to include rule to start pipeline for branch starting with name \n# release- and exclude commits with VALHALLA SKIP (when valhalla commits files we don't want to start pipeline again)\nworkflows:\n  # .... your standard workflows here\n  - if: $CI_COMMIT_BRANCH =~ /^release-*/ \u0026\u0026 $CI_COMMIT_TITLE !~ /.*VALHALLA SKIP.*/\n  - if: $VALHALLA_RELEASE_CMD =~ /^release-*/ \u0026\u0026 $CI_COMMIT_TITLE !~ /.*VALHALLA SKIP.*/\n\n# add new stage\nstages:\n  # .... your standard stages here\n  - release\n\nvalhalla_release:\n  stage: release\n  image: logchange/valhalla:1.6.2\n  # Prevent from fetching artifacts because it is a problem during committing all files (git add .)\n  # https://docs.gitlab.com/ee/ci/jobs/job_artifacts.html#prevent-a-job-from-fetching-artifacts\n  dependencies: [ ]\n  rules:\n    - if: $CI_PIPELINE_SOURCE == \"merge_request_event\"\n      when: never\n    - if: $CI_PIPELINE_SOURCE == \"schedule\"\n      when: never\n    # we run the job only for branch with name release-\n    # and for commits that DOES NOT include VALHALLA SKIP\n    # valhalla during committing adds [VALHALLA SKIP] at the end of commit msg\n    - if: $CI_COMMIT_BRANCH =~ /^release-*/ \u0026\u0026 $CI_COMMIT_TITLE !~ /.*VALHALLA SKIP.*/\n    # we run the job when VALHALLA_RELEASE_CMD env variable is present and has name release-\n    # and for commits that DOES NOT include VALHALLA SKIP\n    # valhalla during committing adds [VALHALLA SKIP] at the end of commit msg\n    - if: $VALHALLA_RELEASE_CMD =~ /^release-*/ \u0026\u0026 $CI_COMMIT_TITLE !~ /.*VALHALLA SKIP.*/\n```\n\n### 🚧 .gitignore\n\nAdd to your `.gitignore` following rules, please create issue if valhalla commits to many files!\n(For GitLab CI/CD add `dependencies: []` which will prevent from committing generated files)\n\nIt is important to modify your `.gitignore` when valhalla during `commit_before_release` or\n`commit_after_release` phase generates files which you don't want to commit (f.e. maven release plugin or\nmaven version plugin generates `pom.xml` backup - for mvn version you can also use `-DgenerateBackupPoms=false`)\n\n```\n### Valhalla ###\n.m2/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogchange%2Fvalhalla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogchange%2Fvalhalla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogchange%2Fvalhalla/lists"}