Skip to content
Merged
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
87 changes: 87 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: CI

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

env:
UV_VERSION: 0.10.2

jobs:
commitlint:
name: Commit Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v6

tests:
name: Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}

- name: Run quality checks
run: make quality

- name: Validate package build
run: uv build

release:
name: Build and publish package
needs: tests
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
# TODO: un-comment if we add this package to PyPI
# permissions:
# # IMPORTANT: this permission is mandatory for Trusted Publishing
# id-token: write
# contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: ${{ env.UV_VERSION }}

- name: Build packages
run: uv build

- name: Create Release
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION=$(uv version --short)
uv run scriv print --version $VERSION --output release-body

gh release create "v${VERSION}" \
--title ${VERSION} \
--target "${{ github.sha }}" \
--notes-file release-body \
dist/*

# TODO: un-comment if we add this package to PyPI
# - name: Publish to PyPI
# run: |
# uv publish \
# --trusted-publishing always \
# dist/*
24 changes: 13 additions & 11 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ on:
env:
REGISTRY: docker.io
IMAGE_NAME: docker.io/ednxops/drydock-backups
UV_VERSION: 0.10.2

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Python Semantic Release
uses: actions/setup-python@v5
- name: setup uv
uses: astral-sh/setup-uv@v7
with:
python-version: 3.11
python-version: "3.12"
enable-cache: true
version: ${{ env.UV_VERSION }}

- name: Install dependencies
run: |
pip install -e .
- name: Install the project
run: uv sync --locked --all-extras --dev

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -39,14 +41,14 @@ jobs:

- name: Setup Tutor
run: |
tutor plugins disable indigo mfe
tutor plugins enable drydock-backups
uv run tutor plugins disable indigo mfe
uv run tutor plugins enable drydock-backups

- name: Build Docker image
run: |
tutor images build backups
uv run tutor images build backups

- name: Push Docker image
if: github.event_name == 'workflow_dispatch'
run: |
tutor images push backups
uv run tutor images push backups
39 changes: 0 additions & 39 deletions .github/workflows/release.yml

This file was deleted.

24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
# CHANGELOG

<!--
All enhancements and changes will be documented in this file. It adheres to
the structure of http://keepachangelog.com/ ,

This project adheres to Semantic Versioning (http://semver.org/).
-->

## Unreleased

See the fragment files in the [changelog.d/ directory](./changelog.d).

<!-- scriv-insert-here -->

<a id='changelog-19.0.1'></a>
## 19.0.1 — 2026-02-13

### Fixed

- Properly check if the MinIO plugin is enabled before adding the initialization
jobs.
- Don't override the MongoDB user role in case `BACKUP_MONGO_USERNAME` is an
existing user.
- Reduce the job history limit to 0 to avoid dangling Pods and PVCs.

<a id='changelog-19.0.0'></a>
## v19.0.0 (2025-02-03)

### Continuous Integration
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

28 changes: 15 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
.DEFAULT_GOAL := help
.PHONY: help

release: ## release a new version
@echo "Releasing a new version."
@echo "This is a remote release, it will push to the remote repository."
semantic-release -vv version --changelog --push --tag --commit
quality: ## Run linters
uv run ruff check
uv run ruff format --diff
uv run ty check

local-release:
@echo "Releasing a new version."
@echo "This is a local release, it will not push to the remote repository."
@echo "You can push the changes and release manually."
semantic-release -vv version --changelog --commit --no-push
quality-fix: ## Run automatic linter fixes
uv run ruff format
uv run ruff check --fix

selfcheck: ## check that the Makefile is well-formed
@echo "The Makefile is well-formed."
changelog-entry: ## Run scriv to create a changelog entry
uv run scriv create

ESCAPE = \033
changelog-collect: ## Collect all the changelog entries and rebuild CHANGELOG.md
uv run scriv collect

ESCAPE = 
help: ## Print this help
@grep -E '^([.a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \
@grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \
| sed 's/######* \(.*\)/@ $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' | tr '@' '\n' \
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'
1 change: 1 addition & 0 deletions changelog.d/scriv/entry_title.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% if version %}{{ version }} — {% endif %}{{ date.strftime('%Y-%m-%d') }}
15 changes: 15 additions & 0 deletions changelog.d/scriv/new_fragment.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
For top level release notes, leave all the headers commented out.
-->

{% for cat in config.categories -%}
<!--
### {{ cat }}

- A bullet item for the {{ cat }} category.

-->
{% endfor -%}
32 changes: 32 additions & 0 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// See: https://commitlint.js.org/#/reference-configuration for details
// on the configuration file
export default {
extends: ['@commitlint/config-conventional'],

rules: {
'type-enum':
[2, 'always', [
'revert', 'feat', 'fix', 'perf', 'docs', 'test', 'build', 'refactor', 'style', 'chore', 'temp', 'ci',
]],

// Default rules we want to suppress. The available list of rules can be
// found in https://commitlint.js.org/#/reference-rules
'body-leading-blank': [0, "always"],
'body-max-line-length': [0, "always"],
'footer-max-line-length': [0, "always"],
'footer-leading-blank': [0, "always"],
'subject-case': [0, "always", []],
'subject-full-stop': [0, "never", '.'],
},

ignores: [
// Allow GitHub revert messages, like:
// Revert "introduce a bug"
// Revert "introduce a bug" (#1234)
message => /^Revert ".*"( \(#\d+\))?/.test(message),

// BTW: commitlint has a built-in list of ignores which are also applied.
// Those include the typical "Merged" messages, so those are implicitly ignored:
// https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/is-ignored/src/defaults.ts
],
};
4 changes: 3 additions & 1 deletion drydock_backups/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = "19.0.0"
from importlib import metadata

__version__ = metadata.version("drydock-backups")
Loading