Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: dev
on:
workflow_dispatch:
push:
paths:
- bin/**
- glrd/**
- tests/**
- poetry.lock
- pyproject.toml
jobs:
test:
name: test
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install GLRD and dependencies
run: poetry install --with dev
- name: Run linter
run: make lint
- name: Run tests
run: make test
13 changes: 7 additions & 6 deletions .github/workflows/image-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ on:
workflow_dispatch:
push:
tags-ignore:
- 'v[0-9]+.[0-9]+.[0-9]+'
- "v[0-9]+.[0-9]+.[0-9]+"
paths:
- bin/**
- glrd/**
- tests/**
- Containerfile
- poetry.lock
- pyproject.toml
Expand All @@ -20,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [ amd64, arm64 ]
arch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -41,10 +42,10 @@ jobs:
name: build-${{ matrix.arch }}
path: /tmp/${{ matrix.arch }}-oci.tar
if-no-files-found: error
retention-days: 1
retention-days: 1
push:
name: push
runs-on: 'ubuntu-latest'
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash
Expand All @@ -56,12 +57,12 @@ jobs:
uses: actions/download-artifact@v4
with:
name: build-amd64
path: /tmp
path: /tmp
- name: download build-arm64
uses: actions/download-artifact@v4
with:
name: build-arm64
path: /tmp
path: /tmp
- name: podman login
run: |
podman login -u token -p ${{ github.token }} ghcr.io
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
*.egg-info
**/__pycache__
.artifacts_cache.json
.artifacts_index.json
.envrc
.venv
_build
dist/
glrd/artifacts-cache.json
shell.nix
releases.json
releases.yaml
Expand Down
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# GLRD Makefile

.PHONY: help install test test-unit test-integration test-all lint clean

help: ## Show this help message
@echo "Available targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'

install: ## Install dependencies
poetry install

install-dev: ## Install development dependencies
poetry install --with dev

test: ## Run all tests
poetry run pytest

test-unit: ## Run unit tests only
poetry run pytest -m unit

test-integration: ## Run integration tests only
poetry run pytest -m integration

test-all: ## Run all tests with coverage
poetry run pytest --cov=glrd --cov-report=html --cov-report=term

lint: ## Run linting
poetry run flake8 --max-line-length 110 glrd/ tests/
poetry run black --check glrd/ tests/
poetry run autopep8 --diff --max-line-length 110 -r glrd/ tests/

format: ## Format code
poetry run black glrd/ tests/

clean: ## Clean up temporary files
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
find . -type d -name "*.egg-info" -exec rm -rf {} +
rm -rf build/
rm -rf dist/
rm -rf htmlcov/
rm -rf .coverage
rm -rf .pytest_cache/
158 changes: 87 additions & 71 deletions README.md

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions assets/overview.excalidraw
Original file line number Diff line number Diff line change
Expand Up @@ -681,11 +681,11 @@
"locked": false,
"fontSize": 20,
"fontFamily": 5,
"text": "releases-stable.json",
"text": "releases-major.json",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "Ja2YwuSfTNbOWarmcKJvD",
"originalText": "releases-stable.json",
"originalText": "releases-major.json",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down Expand Up @@ -866,11 +866,11 @@
"locked": false,
"fontSize": 20,
"fontFamily": 5,
"text": "stable",
"text": "major",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "l3gC5-Rw97FRtN-srCDfo",
"originalText": "stable",
"originalText": "major",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down Expand Up @@ -1019,11 +1019,11 @@
"locked": false,
"fontSize": 16,
"fontFamily": 8,
"text": "❯ glrd --type stable --version 1312 --output-format yaml\n- name: stable-1312\n type: stable\n version:\n major: 1312\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700136050\n extended:\n isodate: '2024-05-03'\n timestamp: 1714687200\n eol:\n isodate: '2024-08-03'\n timestamp: 1722636000\n\n❯ glrd --type patch --version 1312.0 --output-format yaml\n- name: patch-1312.0\n type: patch\n version:\n major: 1312\n minor: 0\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700089200\n eol:\n isodate: '2023-11-23'\n timestamp: 1700694000\n git:\n commit: 40b9db2c54c9cac78bcf62a96f5386ac33c1bdab\n commit_short: 40b9db2\n github:\n release: https://github.com/gardenlinux/gardenlinux/releases/tag/1312.0\n\n",
"text": "❯ glrd --type major --version 1312 --output-format yaml\n- name: major-1312\n type: major\n version:\n major: 1312\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700136050\n extended:\n isodate: '2024-05-03'\n timestamp: 1714687200\n eol:\n isodate: '2024-08-03'\n timestamp: 1722636000\n\n❯ glrd --type minor --version 1312.0 --output-format yaml\n- name: minor-1312.0\n type: minor\n version:\n major: 1312\n minor: 0\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700089200\n eol:\n isodate: '2023-11-23'\n timestamp: 1700694000\n git:\n commit: 40b9db2c54c9cac78bcf62a96f5386ac33c1bdab\n commit_short: 40b9db2\n github:\n release: https://github.com/gardenlinux/gardenlinux/releases/tag/1312.0\n\n",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "❯ glrd --type stable --version 1312 --output-format yaml\n- name: stable-1312\n type: stable\n version:\n major: 1312\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700136050\n extended:\n isodate: '2024-05-03'\n timestamp: 1714687200\n eol:\n isodate: '2024-08-03'\n timestamp: 1722636000\n\n❯ glrd --type patch --version 1312.0 --output-format yaml\n- name: patch-1312.0\n type: patch\n version:\n major: 1312\n minor: 0\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700089200\n eol:\n isodate: '2023-11-23'\n timestamp: 1700694000\n git:\n commit: 40b9db2c54c9cac78bcf62a96f5386ac33c1bdab\n commit_short: 40b9db2\n github:\n release: https://github.com/gardenlinux/gardenlinux/releases/tag/1312.0\n\n",
"originalText": "❯ glrd --type major --version 1312 --output-format yaml\n- name: major-1312\n type: major\n version:\n major: 1312\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700136050\n extended:\n isodate: '2024-05-03'\n timestamp: 1714687200\n eol:\n isodate: '2024-08-03'\n timestamp: 1722636000\n\n❯ glrd --type minor --version 1312.0 --output-format yaml\n- name: minor-1312.0\n type: minor\n version:\n major: 1312\n minor: 0\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700089200\n eol:\n isodate: '2023-11-23'\n timestamp: 1700694000\n git:\n commit: 40b9db2c54c9cac78bcf62a96f5386ac33c1bdab\n commit_short: 40b9db2\n github:\n release: https://github.com/gardenlinux/gardenlinux/releases/tag/1312.0\n\n",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down Expand Up @@ -1158,11 +1158,11 @@
"locked": false,
"fontSize": 20,
"fontFamily": 5,
"text": "releases-patch.json",
"text": "releases-minor.json",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "6NPB-pPlaLq_OppZlAFUO",
"originalText": "releases-patch.json",
"originalText": "releases-minor.json",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down Expand Up @@ -1195,11 +1195,11 @@
"locked": false,
"fontSize": 20,
"fontFamily": 5,
"text": "patch",
"text": "minor",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "pFYx8a7oj8CsnNJHBJ2Qg",
"originalText": "patch",
"originalText": "minor",
"autoResize": true,
"lineHeight": 1.25
},
Expand Down Expand Up @@ -1584,11 +1584,11 @@
"locked": false,
"fontSize": 16,
"fontFamily": 8,
"text": "❯ glrd-manage --s3-update \\\n --create stable \\\n --version 1312\nINFO: stable-1312 - release will be created.\n\n❯ glrd-manage --s3-update \\\n --create patch \\\n --version 1312.0\nINFO: patch-1312.0 - release will be created.",
"text": "❯ glrd-manage --s3-update \\\n --create major \\\n --version 1312\nINFO: major-1312 - release will be created.\n\n❯ glrd-manage --s3-update \\\n --create minor \\\n --version 1312.0\nINFO: minor-1312.0 - release will be created.",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "❯ glrd-manage --s3-update \\\n --create stable \\\n --version 1312\nINFO: stable-1312 - release will be created.\n\n❯ glrd-manage --s3-update \\\n --create patch \\\n --version 1312.0\nINFO: patch-1312.0 - release will be created.",
"originalText": "❯ glrd-manage --s3-update \\\n --create major \\\n --version 1312\nINFO: major-1312 - release will be created.\n\n❯ glrd-manage --s3-update \\\n --create minor \\\n --version 1312.0\nINFO: minor-1312.0 - release will be created.",
"autoResize": true,
"lineHeight": 1.25
}
Expand Down
Binary file modified assets/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading