Skip to content
Open
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
12 changes: 12 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
profile: production
exclude_paths:
- .tmp/
mock_modules:
- zuul_return
mock_roles:
- collect-container-logs
- ensure-output-dirs
- ensure-podman
- run-buildset-registry
- use-buildset-registry
4 changes: 2 additions & 2 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ jobs:

# I want to test we are setting the namespace and login properly before pushing
# uncomment later
#- name: Push images
# run: tox -e custom -- push all
# - name: Push images
# run: tox -e custom -- push all
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.tmp/
44 changes: 40 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
---
# Containerfile and repo hygiene hooks.
default_language_version:
python: python3

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-yaml
files: \.(yaml|yml)$
- id: mixed-line-ending
args: [--fix=lf]
- id: fix-byte-order-marker
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-yaml
files: .*\.(yaml|yml)$
args: [--allow-multiple-documents]
- id: check-json
files: .*\.json$
- id: check-ast
- id: check-added-large-files
- id: check-case-conflict
- id: check-symlinks
- id: detect-private-key
- id: check-merge-conflict
- id: debug-statements
- id: check-docstring-first

- repo: https://github.com/openstack/bashate
rev: 2.1.1
Expand All @@ -36,3 +51,24 @@ repos:
name: hadolint (Containerfiles)
# identify tags Containerfile as type dockerfile
types: [dockerfile]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.1
hooks:
- id: ruff-check
args: [--fix, --unsafe-fixes]
files: ^tests/.*\.py$
- id: ruff-format
files: ^tests/.*\.py$

- repo: https://opendev.org/openstack/hacking
rev: 8.0.0
hooks:
- id: hacking
additional_dependencies: []
files: ^tests/.*\.py$

- repo: https://github.com/ansible/ansible-lint
rev: v25.9.0
hooks:
- id: ansible-lint
57 changes: 57 additions & 0 deletions .zuul.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
- job:
name: s2i-openstack-containers-unit
parent: tox
description: Run the stdlib unit test suite.
vars:
tox_envlist: unit

- job:
name: s2i-openstack-containers-linters
parent: tox-linters
description: Run repository formatting and style checks.

- job:
name: s2i-openstack-containers-molecule
parent: tox
description: Run provider registry and cleanup contract scenarios.
vars:
tox_envlist: molecule

- nodeset:
name: s2i-openstack-containers-image-builder
nodes:
- name: builder
label: cloud-centos-10-stream

- job:
name: s2i-openstack-container-content-provider
parent: base
abstract: true
description: |
Build and publish a maintained subset of OpenStack service container
images from committed source pins for dependent jobs.

The job uses the upstream container repository by default. A child job
can add another container repository to ``required-projects`` and select
it with ``s2i_ci_container_project``.
timeout: 7200
nodeset: s2i-openstack-containers-image-builder
required-projects:
- github.com/openstack-k8s-operators/s2i-openstack-containers
- opendev.org/zuul/zuul-jobs
pre-run:
- playbooks/container-ci/zuul/reset-static-node.yaml
- playbooks/container-ci/zuul/pre.yaml
run: playbooks/container-ci/zuul/run.yaml
post-run: playbooks/container-ci/zuul/post.yaml
vars:
s2i_ci_container_project: >-
github.com/openstack-k8s-operators/s2i-openstack-containers
s2i_ci_images:
- watcher/watcher-base
- cyborg/cyborg
- cyborg/cyborg-agent
s2i_ci_stream: master
s2i_ci_content_provider: true
s2i_ci_reset_static_node: false
21 changes: 21 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Agent Guidance

Read `developer-guide.md` for repository architecture, contributor workflows,
and validation guidance.

## Python imports

Follow the OpenStack Hacking import conventions:

- Do not use relative imports.
- Import modules rather than objects.
- Use `import package.module` or `from package import module` style.
- Keep imports grouped and alphabetized by full module path.

## Quality tooling

- Treat `pyproject.toml`, `.pre-commit-config.yaml`, and `tox.ini` as the
portable tooling configuration.
- Use stdlib `unittest`, never pytest or Bash, for non-Ansible tests.
- Do not add new shell test harnesses.
- Run tests through tox and keep generated state below `.tmp/`.
Loading