|
| 1 | +--- |
| 2 | +title: "Manage GLRD entries" |
| 3 | +description: "Step-by-step examples for creating, updating, and deleting Garden Linux releases database entries using the glrd-manage CLI tool." |
| 4 | +order: 3 |
| 5 | +github_org: gardenlinux |
| 6 | +github_repo: glrd |
| 7 | +github_source_path: docs/how-to/manage-releases.md |
| 8 | +github_target_path: docs/how-to/releases/glrd/manage-releases.md |
| 9 | +related_topics: |
| 10 | + - /how-to/releases/glrd/ |
| 11 | + - /how-to/releases/glrd/run-glrd.md |
| 12 | + - /how-to/releases/glrd/query-releases.md |
| 13 | + - /how-to/releases/glrd/manage-releases.md |
| 14 | + - /reference/supporting_tools/glrd/ |
| 15 | + - /reference/supporting_tools/glrd/cli.md |
| 16 | + - /reference/supporting_tools/glrd/schema.md |
| 17 | + - /explanation/glrd-release-lifecycle.md |
| 18 | +--- |
| 19 | + |
| 20 | +# Manage Garden Linux Releases |
| 21 | + |
| 22 | +This guide shows how to use `glrd-manage` to create, update, and delete releases in the Garden Linux Release Database (GLRD). |
| 23 | + |
| 24 | +## Prerequisites |
| 25 | + |
| 26 | +- `glrd-manage` installed. See [Run GLRD](/how-to/releases/glrd/run-glrd.md). |
| 27 | +- AWS credentials with write access to the S3 bucket when you intend to push changes with `--s3-update`. See [AWS authentication](/how-to/releases/glrd/run-glrd.md#aws-authentication-for-glrd-manage). |
| 28 | + |
| 29 | +:::warning Safe testing |
| 30 | +All examples on this page omit `--s3-update`. Without that flag, `glrd-manage` writes output files to the current directory and makes no changes to S3. Add `--s3-update` only when you are ready to publish. |
| 31 | +::: |
| 32 | + |
| 33 | +## Test locally |
| 34 | + |
| 35 | +By default, `glrd-manage` writes release files (for example, `releases-minor.json`) to the current working directory and does not touch S3. You can inspect the generated files to verify the output before running with `--s3-update`. |
| 36 | + |
| 37 | +## Generate initial release data |
| 38 | + |
| 39 | +:::info GITHUB_TOKEN required |
| 40 | +`--create-initial-releases` fetches release history from the GitHub API via |
| 41 | +[python-gardenlinux-lib](https://github.com/gardenlinux/python-gardenlinux-lib). |
| 42 | +Set the `GITHUB_TOKEN` environment variable before running this command. The |
| 43 | +token needs no special scopes for the public Garden Linux repository. |
| 44 | + |
| 45 | +```bash |
| 46 | +export GITHUB_TOKEN=<your-token> |
| 47 | +# Or, if you have the GitHub CLI installed: |
| 48 | +export GITHUB_TOKEN=$(gh auth token) |
| 49 | +``` |
| 50 | + |
| 51 | +::: |
| 52 | + |
| 53 | +Use `--create-initial-releases` to fetch the full release history from GitHub and generate all initial release files. Pass the types you want to populate as a comma-separated list: |
| 54 | + |
| 55 | +```bash |
| 56 | +glrd-manage --create-initial-releases major,minor,nightly --input |
| 57 | +``` |
| 58 | + |
| 59 | +This generates `releases-major.json`, `releases-minor.json`, `releases-nightly.json`, and processes any manual lifecycle entries from `releases-input.yaml`. |
| 60 | + |
| 61 | +## Create a major release |
| 62 | + |
| 63 | +When you create a major release, GLRD automatically calculates default `extended` and `eol` dates (released + 6 months and + 9 months respectively). See [Default major dates](/explanation/glrd-release-lifecycle.md#default-major-dates) for details. |
| 64 | + |
| 65 | +```bash |
| 66 | +# Use default dates |
| 67 | +glrd-manage --create major --version 1312 |
| 68 | + |
| 69 | +# Override dates explicitly |
| 70 | +glrd-manage --create major --version 1312 \ |
| 71 | + --lifecycle-released-isodatetime 2023-11-16T00:00:00 \ |
| 72 | + --lifecycle-extended-isodatetime 2024-05-03T00:00:00 \ |
| 73 | + --lifecycle-eol-isodatetime 2024-08-03T00:00:00 |
| 74 | +``` |
| 75 | + |
| 76 | +## Create a minor release |
| 77 | + |
| 78 | +When you create a new minor release, `glrd-manage` automatically sets the `eol` of the previous minor release to the new release's `released` date. See [Major and minor release dependencies](/explanation/glrd-release-lifecycle.md#major-and-minor-release-dependencies) for details. |
| 79 | + |
| 80 | +```bash |
| 81 | +glrd-manage --create minor --version 1312.7 |
| 82 | +``` |
| 83 | + |
| 84 | +## Create a nightly release |
| 85 | + |
| 86 | +Without additional parameters, `glrd-manage` uses the current timestamp and the current git commit to create a nightly release. The next available minor version number is chosen automatically: |
| 87 | + |
| 88 | +```bash |
| 89 | +glrd-manage --create nightly |
| 90 | +``` |
| 91 | + |
| 92 | +## Update an existing release |
| 93 | + |
| 94 | +Use `--update` to modify lifecycle dates or the commit hash of an existing release. Specify the release by name and provide at least one modifier flag. |
| 95 | + |
| 96 | +Supported modifiers: |
| 97 | + |
| 98 | +- `--lifecycle-released-isodatetime`: Update the release date (all types). |
| 99 | +- `--lifecycle-extended-isodatetime`: Update the extended maintenance date (`major` and `next` only). |
| 100 | +- `--lifecycle-eol-isodatetime`: Update the end-of-life date (`next`, `major`, and `minor` only). |
| 101 | +- `--commit`: Update the git commit hash (`minor`, `nightly`, and `dev` only). |
| 102 | + |
| 103 | +```bash |
| 104 | +# Update the EOL date on a major release |
| 105 | +glrd-manage --update major-1592 \ |
| 106 | + --lifecycle-eol-isodatetime 2026-02-27T00:00:00 \ |
| 107 | + --input-stdin < releases.json |
| 108 | + |
| 109 | +# Update the extended maintenance date on a major release |
| 110 | +glrd-manage --update major-1592 \ |
| 111 | + --lifecycle-extended-isodatetime 2025-06-15T00:00:00 \ |
| 112 | + --input-stdin < releases.json |
| 113 | + |
| 114 | +# Update the commit hash on a minor release |
| 115 | +glrd-manage --update minor-1592.6 \ |
| 116 | + --commit deadbeef1234567890abcdef1234567890abcdef \ |
| 117 | + --input-stdin < releases.json |
| 118 | + |
| 119 | +# Update multiple fields at once |
| 120 | +glrd-manage --update major-1592 \ |
| 121 | + --lifecycle-eol-isodatetime 2026-02-27T00:00:00 \ |
| 122 | + --lifecycle-extended-isodatetime 2025-06-15T00:00:00 \ |
| 123 | + --input-stdin < releases.json |
| 124 | +``` |
| 125 | + |
| 126 | +:::info |
| 127 | +The `--update` action requires existing release data to be provided via `--input-stdin` (as in the examples above) or loaded from the default query source. It cannot be combined with `--no-query`. |
| 128 | +::: |
| 129 | + |
| 130 | +## Create or update a release from JSON (stdin) |
| 131 | + |
| 132 | +You can provide release data directly from standard input in JSON format. This is useful for scripted workflows or when the release data is generated by another tool: |
| 133 | + |
| 134 | +```bash |
| 135 | +echo '{ |
| 136 | + "releases": [ |
| 137 | + { |
| 138 | + "name": "minor-1592.1", |
| 139 | + "type": "minor", |
| 140 | + "version": { |
| 141 | + "major": 1592, |
| 142 | + "minor": 1 |
| 143 | + }, |
| 144 | + "lifecycle": { |
| 145 | + "released": { |
| 146 | + "isodate": "2024-08-22", |
| 147 | + "timestamp": 1724277600 |
| 148 | + }, |
| 149 | + "eol": { |
| 150 | + "isodate": "2025-08-12", |
| 151 | + "timestamp": 1754949600 |
| 152 | + } |
| 153 | + }, |
| 154 | + "git": { |
| 155 | + "commit": "ec945aa995d0f08d64303ff6045b313b40b665fb", |
| 156 | + "commit_short": "ec945aa" |
| 157 | + }, |
| 158 | + "github": { |
| 159 | + "release": "https://github.com/gardenlinux/gardenlinux/releases/tag/1592.1" |
| 160 | + }, |
| 161 | + "flavors": [ |
| 162 | + "ali-gardener_prod", |
| 163 | + "azure-gardener_prod", |
| 164 | + "aws-gardener_prod", |
| 165 | + "gcp-gardener_prod" |
| 166 | + ], |
| 167 | + "attributes": { |
| 168 | + "source_repo": false |
| 169 | + } |
| 170 | + } |
| 171 | + ] |
| 172 | +}' | glrd-manage --input-stdin |
| 173 | +``` |
| 174 | + |
| 175 | +## Create or update a release from a YAML file |
| 176 | + |
| 177 | +Write the release data to a YAML input file and pass it with `--input` and `--input-file`: |
| 178 | + |
| 179 | +```yaml |
| 180 | +# releases-input.yaml |
| 181 | +releases: |
| 182 | + - name: minor-1592.1 |
| 183 | + type: minor |
| 184 | + version: |
| 185 | + major: 1592 |
| 186 | + minor: 1 |
| 187 | + lifecycle: |
| 188 | + released: |
| 189 | + isodate: "2024-08-22" |
| 190 | + timestamp: 1724277600 |
| 191 | + eol: |
| 192 | + isodate: "2025-08-27" |
| 193 | + timestamp: 1754949600 |
| 194 | + git: |
| 195 | + commit: ec945aa995d0f08d64303ff6045b313b40b66fff |
| 196 | + commit_short: ec945aa |
| 197 | + github: |
| 198 | + release: https://github.com/gardenlinux/gardenlinux/releases/tag/1592.1 |
| 199 | + flavors: |
| 200 | + - ali-gardener_prod |
| 201 | + - azure-gardener_prod |
| 202 | + - aws-gardener_prod |
| 203 | + - gcp-gardener_prod |
| 204 | + attributes: |
| 205 | + source_repo: false |
| 206 | +``` |
| 207 | +
|
| 208 | +```bash |
| 209 | +glrd-manage --input --input-file releases-input.yaml |
| 210 | +``` |
| 211 | + |
| 212 | +## Run fully offline |
| 213 | + |
| 214 | +To run `glrd-manage` without any network access, combine `--input-type file` with `--no-flavors`: |
| 215 | + |
| 216 | +```bash |
| 217 | +glrd-manage --create nightly \ |
| 218 | + --input-type file \ |
| 219 | + --no-flavors \ |
| 220 | + --no-query |
| 221 | +``` |
| 222 | + |
| 223 | +- `--input-type file` reads existing releases from local files instead of the S3 endpoint. |
| 224 | +- `--no-flavors` skips the Git clone and S3 lookup for flavor resolution. |
| 225 | +- `--no-query` skips the initial query for existing releases entirely. Use with care — without the existing data, `glrd-manage` may overwrite releases. |
| 226 | + |
| 227 | +You can also set `GLRD_SKIP_FLAVORS=1` in the environment as an alternative to `--no-flavors`. |
| 228 | + |
| 229 | +## Related topics |
| 230 | + |
| 231 | +<RelatedTopics /> |
0 commit comments