Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | .. SPDX-License-Identifier: GPL-2.0+ Concept Release Mechanism ========================= This document describes the concept release mechanism for U-Boot, which provides automated builds and distribution through Ubuntu Snap packages. Overview -------- The concept release mechanism automatically triggers builds of concept packages when changes are pushed to the master branch. This system uses two main components: 1. **GitLab CI trigger job** - Automatically runs when master is updated 2. **Launchpad snap builds** - Creates distributable packages Architecture ------------ The release workflow consists of: **Source Repository (GitLab)** - Main U-Boot development happens here - Contains `.gitlab-ci.yml` with `trigger_snap_builds` job - Triggers downstream builds when master branch is updated **Concept Repositories (Launchpad)** - `u-boot-concept-qemu` - QEMU-based U-Boot builds - `u-boot-concept-efi` - EFI-based U-Boot builds - Contain snap packaging configuration - Build and publish to Ubuntu Snap Store Release Schedule ---------------- Concept releases follow an automated schedule based on calendar dates: **Final Releases** - **When**: First Monday of even-numbered months (February, April, June, August, October, December) - **Frequency**: 6 times per year - **Version Format**: `YYYY.MM` (e.g., `2025.02`, `2025.04`) - **Makefile**: VERSION and PATCHLEVEL updated, SUBLEVEL and EXTRAVERSION cleared **Release Candidates (RC)** - **When**: All other scheduled pipeline runs before final releases - **Frequency**: Up to 3 times per release cycle - **Version Format**: `YYYY.MM-rcN` (e.g., `2025.02-rc1`, `2025.02-rc2`) - **RC Numbering**: Counts backwards from final release date - **rc1**: 2 weeks before final release - **rc2**: 4 weeks before final release - **rc3**: 6 weeks before final release - **Maximum**: rc3 (never rc4 or higher) **Trigger Mechanism** - Releases are triggered by **scheduled pipelines** only - Must target the `master` branch - Automatic version bumping updates the `Makefile` - Git tags created: standard tag (`2025.02`) + c-prefixed tag (`c2025.02`) **Pipeline Stages** 1. `version_bump` stage: Updates Makefile and commits version 2. `release` stage: Creates GitLab release and tags when version commit detected Concept Snap Build Process --------------------------- The concept snap builds are separate from the scheduled releases and trigger automatically when changes are pushed to the master branch: 1. **GitLab CI Pipeline** The `trigger_snap_builds` job executes in the `release` stage: * Authenticates with Launchpad using SSH key * Clones both concept repositories * Creates empty commits with trigger messages * Pushes commits to trigger Launchpad builds 2. **Launchpad Build Process** Each triggered repository: * Detects the new commit * Starts automated snap build process * Pulls latest U-Boot source code * Builds snap packages for multiple architectures * Publishes successful builds to Ubuntu Snap Store Configuration ------------- GitLab CI Setup ~~~~~~~~~~~~~~~~ The trigger job requires these GitLab CI/CD variables: * `LAUNCHPAD_SSH_KEY` - SSH private key for Launchpad authentication - Must be set as a **Protected** variable - Should contain the full SSH private key including headers - Format: Standard OpenSSH private key with newlines SSH Key Configuration ~~~~~~~~~~~~~~~~~~~~~ The SSH key must be: * Associated with a Launchpad account that has push access to concept repos * Added to GitLab as a protected CI/CD variable * Properly formatted with actual newlines (not literal \\n strings) Repository Access ~~~~~~~~~~~~~~~~~ The trigger job accesses these Launchpad repositories: * `git+ssh://sjg1@git.launchpad.net/~sjg1/u-boot/+git/u-boot-concept-qemu` * `git+ssh://sjg1@git.launchpad.net/~sjg1/u-boot/+git/u-boot-concept-efi` Snap Store Distribution ----------------------- Built packages are automatically published to Ubuntu Snap Store: * **u-boot-concept-qemu** - QEMU development builds * **u-boot-concept-efi** - EFI development builds Users can install these with:: snap install u-boot-concept-qemu --edge snap install u-boot-concept-efi --edge Monitoring and Troubleshooting ------------------------------- Build Status ~~~~~~~~~~~~~ * **GitLab CI**: Check pipeline status in GitLab interface * **Launchpad**: Monitor build progress at Launchpad project pages Common Issues ~~~~~~~~~~~~~ **SSH Authentication Failures** - Verify `LAUNCHPAD_SSH_KEY` variable is set and protected - Check SSH key has proper format with actual newlines - Ensure key is associated with correct Launchpad account **Empty Commit Failures** - Repository may have restrictions on empty commits - Check Launchpad repository access permissions - Verify SSH user matches repository owner **Build Failures** - Check Launchpad build logs for specific errors - Verify snap packaging configuration is correct - Ensure source dependencies are available Security Considerations ----------------------- * SSH private keys should always be stored as protected GitLab variables * Only protected branches (master) should trigger production builds * Access to concept repositories should be limited to authorized maintainers * Regular rotation of SSH keys is recommended Release Types Summary --------------------- The concept release mechanism involves two types of releases: **1. Scheduled Version Releases** - Formal version releases with tags (e.g., `2025.02`, `2025.04-rc1`) - Triggered by scheduled pipelines only - Updates official version numbers in Makefile - Creates GitLab releases with tags **2. Concept Snap Builds** - Development builds for testing and evaluation - Triggered by any push to master branch - Published to Ubuntu Snap Store as edge channel - Independent of formal version releases Development and Testing ----------------------- For testing the trigger mechanism: 1. Change trigger condition to test branch in `.gitlab-ci.yml` 2. Temporarily remove "Protected" flag from `LAUNCHPAD_SSH_KEY` 3. Push to test branch with CI variable overrides to skip other stages 4. Restore production configuration after testing Example test push:: git push -o ci.variable=TEST_SUITES=0 -o ci.variable=WORLD_BUILD=0 \\ -o ci.variable=TEST_PY=0 -o ci.variable=SJG_LAB=0 origin HEAD:try |