Skip to content

[EMB-589] Support automated development package builds and Cloudsmith commit tagging - #13

Open
Bryan Foley (bryanfoley) wants to merge 2 commits into
mainfrom
EMB-589-automated-dev-package-builds
Open

Bryan Foley (bryanfoley) wants to merge 2 commits into
mainfrom
EMB-589-automated-dev-package-builds

Conversation

@bryanfoley

Copy link
Copy Markdown
Contributor

Summary

  • Automatically enables development package builds for development branches matching a JIRA ticket prefix/pattern (e.g. EMB-589, SEM-1234, CES_1234), setting RELEASE_REPO="packages-dev" and RELEASE_VERSION="<ticket_number>.<mmdd>.<hhmmss>-dev".
  • Supports both direct branch pushes and rework commits pushed during pull request reviews (pull_request synchronize).
  • Adds the 7-character short commit hash as a Cloudsmith package tag (--tags "${SHORT_SHA}") when uploading Debian packages to Cloudsmith.
  • Updates documentation in README.md to describe the new dev build and tagging behavior.

Behavior Comparison

Scenario Trigger / Event Branch / Ref Detected Previous RELEASE_REPO Previous RELEASE_VERSION New RELEASE_REPO New RELEASE_VERSION Cloudsmith Action
Commit to dev branch push EMB-589-automated-dev-package-builds none 999.999.999 packages-dev 589.<mmdd>.<hhmmss>-dev Released to packages-dev (tagged with short commit hash)
Rework commit during PR review pull_request EMB-589-automated-dev-package-builds none 999.999.999 packages-dev 589.<mmdd>.<hhmmss>-dev Released to packages-dev (tagged with short commit hash)
Commit to other JIRA ticket types push or PR SEM-1234-feature / CES_4321_fix none 999.999.999 packages-dev 1234...-dev / 4321...-dev Released to packages-dev (tagged with short commit hash)
Commit to branch with path prefix push or PR feature/EMB-589-test none 999.999.999 packages-dev 589.<mmdd>.<hhmmss>-dev Released to packages-dev (tagged with short commit hash)
Branch without JIRA ticket push or PR refactor-cleanup none 999.999.999 none (unchanged) 999.999.999 (unchanged) Skipped (unchanged)
Merge to master / main push main / master / stable nightly-builds <YYYY.MM.DD>-merge-main nightly-builds (unchanged) <YYYY.MM.DD>-merge-main (unchanged) Released to nightly-builds (unchanged)
Official tag push push (tag) v1.2.3 packages-released 1.2.3 packages-released (unchanged) 1.2.3 (unchanged) Released to packages-released (unchanged)
Explicit dev tag push push (tag) v1.2.3-dev packages-dev 1.2.3-dev packages-dev (unchanged) 1.2.3-dev (unchanged) Released to packages-dev (unchanged)

Changes

  • .github/workflows/prepare_env.yml:
    • Added regex extraction (^|/)([A-Za-z]{2,10})[-_]([0-9]+) on DEV_BRANCH="${GITHUB_HEAD_REF:-${CURRENT_BRANCH}}".
    • Sets RELEASE_REPO="packages-dev" and RELEASE_VERSION="${JIRA_NUMBER}.$(date +%m%d.%H%M%S)-dev".
    • Non-matching branches fall back to none / 999.999.999.
  • .github/workflows/release_pkg.yml:
    • Extracts 7-character short commit hash ${SHORT_SHA} from ${{ github.event.pull_request.head.sha || github.sha }}.
    • Passes --tags "${SHORT_SHA}" to cloudsmith push deb for Buster and Bookworm uploads.
  • README.md:
    • Documented development branch JIRA versioning and Cloudsmith commit hash tagging.

Copilot AI balanced review requested due to automatic review settings October 9, 2026 13:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The README documents an incorrect Cloudsmith nightly repository name.

1 open finding
What changed in this PR

Adds automated development-package publishing for JIRA-named branches and commit-based Cloudsmith tagging.

Changes:

  • Generates development versions from JIRA ticket numbers.
  • Tags uploaded Debian packages with the short commit SHA.
  • Documents the new release behavior.
File Description
.github/​workflows/​prepare_env.yml Detects JIRA branches and configures development releases.
.github/​workflows/​release_pkg.yml Adds commit SHA tags to Cloudsmith uploads.
README.md Documents development builds and package tagging.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md
The `RELEASE_VERSION` will be `999.999.999` for a regular commit to a non-master branch. For a merge to a master branch, it will get the nightly build format `<yyyy.mm.dd>-merge-<branch>`. For a tag in a branch, it will take the tag version (if properly formatted).
The `RELEASE_REPO` will have the Cloudsmith target repository to upload the package: `night-builds` for a merge to a master branch, `packages-released` for a tag without the `-dev` in a master branch suffix and `packages-dev` for a tag with the `-dev` suffix in a non-master branch.
The `RELEASE_VERSION` will be `999.999.999` for a regular commit to a non-master branch without a JIRA ticket. If the development branch matches a JIRA ticket prefix/pattern (e.g. `EMB-589-feature`), it will be formatted as `<ticket_number>.<mmdd>.<hhmmss>-dev`. For a merge to a master branch, it will get the nightly build format `<yyyy.mm.dd>-merge-<branch>`. For a tag in a branch, it will take the tag version (if properly formatted).
The `RELEASE_REPO` will have the Cloudsmith target repository to upload the package: `night-builds` for a merge to a master branch, `packages-released` for a tag without the `-dev` in a master branch suffix, and `packages-dev` for a development branch with a JIRA ticket or a tag with the `-dev` suffix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants