prepare all syntax for linters and spellchecks
This commit is contained in:
parent
b932d218e3
commit
734c132500
13 changed files with 84 additions and 91 deletions
8
.github/workflows/container.yaml
vendored
8
.github/workflows/container.yaml
vendored
|
|
@ -1,12 +1,12 @@
|
|||
name: Build & Deploy Container
|
||||
|
||||
on:
|
||||
on: # yamllint disable-line rule:truthy
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
merge_group:
|
||||
types: [ "checks_requested" ]
|
||||
types: ["checks_requested"]
|
||||
|
||||
jobs:
|
||||
build-base:
|
||||
|
|
|
|||
2
.github/workflows/create-tag.yml
vendored
2
.github/workflows/create-tag.yml
vendored
|
|
@ -1,7 +1,7 @@
|
|||
# This action creates a release every second Wednesday
|
||||
name: "Create and push release tag"
|
||||
|
||||
on:
|
||||
on: # yamllint disable-line rule:truthy
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 8 * * 3"
|
||||
|
|
|
|||
30
.github/workflows/go.yaml
vendored
30
.github/workflows/go.yaml
vendored
|
|
@ -3,29 +3,29 @@
|
|||
|
||||
name: Go
|
||||
|
||||
on:
|
||||
on: # yamllint disable-line rule:truthy
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
merge_group:
|
||||
types: [ "checks_requested" ]
|
||||
types: ["checks_requested"]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./.github/workflows/testdeps.yaml
|
||||
uses: ./.github/workflows/testdeps.yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 'stable'
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 'stable'
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
|
|
|
|||
2
.github/workflows/pr_best_practices.yml
vendored
2
.github/workflows/pr_best_practices.yml
vendored
|
|
@ -1,6 +1,6 @@
|
|||
name: "Verify PR best practices"
|
||||
|
||||
on:
|
||||
on: # yamllint disable-line rule:truthy
|
||||
pull_request_target:
|
||||
branches: [main]
|
||||
types: [opened, synchronize, reopened, edited]
|
||||
|
|
|
|||
29
.github/workflows/pytest.yaml
vendored
29
.github/workflows/pytest.yaml
vendored
|
|
@ -1,26 +1,25 @@
|
|||
name: Integration tests
|
||||
|
||||
on:
|
||||
on: # yamllint disable-line rule:truthy
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
merge_group:
|
||||
types: [ "checks_requested" ]
|
||||
types: ["checks_requested"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./.github/workflows/testdeps.yaml
|
||||
uses: ./.github/workflows/testdeps.yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install integration test env
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y pytest golang
|
||||
|
||||
- name: Install integration test env
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y pytest golang
|
||||
|
||||
- name: Run integration tests via pytest
|
||||
run: |
|
||||
# use "-s" for now for easier debugging
|
||||
sudo pytest -s -v
|
||||
- name: Run integration tests via pytest
|
||||
run: |
|
||||
# use "-s" for now for easier debugging
|
||||
sudo pytest -s -v
|
||||
|
|
|
|||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -1,6 +1,6 @@
|
|||
name: "Create GitHub release"
|
||||
|
||||
on:
|
||||
on: # yamllint disable-line rule:truthy
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
|
|
|||
2
.github/workflows/testdeps.yaml
vendored
2
.github/workflows/testdeps.yaml
vendored
|
|
@ -1,6 +1,6 @@
|
|||
name: Install common test dependencies
|
||||
|
||||
on:
|
||||
on: # yamllint disable-line rule:truthy
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
|
|
|
|||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,3 +1,6 @@
|
|||
rpmbuild
|
||||
vendor
|
||||
release_artifacts
|
||||
*.swp
|
||||
dictionary.dic
|
||||
__pycache__
|
||||
|
|
|
|||
76
.packit.yaml
76
.packit.yaml
|
|
@ -3,8 +3,8 @@
|
|||
specfile_path: image-builder-cli.spec
|
||||
|
||||
files_to_sync:
|
||||
- image-builder-cli.spec
|
||||
- .packit.yaml
|
||||
- image-builder-cli.spec
|
||||
- .packit.yaml
|
||||
|
||||
copy_upstream_release_description: true
|
||||
|
||||
|
|
@ -24,39 +24,39 @@ actions:
|
|||
upstream_tag_include: 'v\d+'
|
||||
|
||||
jobs:
|
||||
# image-builder-cli is not yet in Fedora, so we don't need to update it there
|
||||
# - job: bodhi_update
|
||||
# trigger: commit
|
||||
# dist_git_branches:
|
||||
# - fedora-branched # rawhide updates are created automatically
|
||||
# - job: koji_build
|
||||
# trigger: commit
|
||||
# dist_git_branches:
|
||||
# - fedora-all
|
||||
# - job: propose_downstream
|
||||
# trigger: release
|
||||
# dist_git_branches:
|
||||
# - fedora-all
|
||||
- job: copr_build
|
||||
trigger: pull_request
|
||||
targets: &build_targets
|
||||
- centos-stream-9-aarch64
|
||||
- centos-stream-9-s390x
|
||||
- centos-stream-9-ppc64le
|
||||
- centos-stream-9-x86_64
|
||||
- centos-stream-10-aarch64
|
||||
- centos-stream-10-s390x
|
||||
- centos-stream-10-ppc64le
|
||||
- centos-stream-10-x86_64
|
||||
- fedora-all-aarch64
|
||||
- fedora-all-s390x
|
||||
- fedora-all-ppc64le
|
||||
- fedora-all
|
||||
- rhel-9-aarch64
|
||||
- rhel-9-x86_64
|
||||
- job: copr_build
|
||||
trigger: commit
|
||||
branch: main
|
||||
owner: "@osbuild" # copr repo namespace
|
||||
project: image-builder-cli # copr repo name so you can consume the builds
|
||||
targets: *build_targets
|
||||
# image-builder-cli is not yet in Fedora, so we don't need to update it there
|
||||
# - job: bodhi_update
|
||||
# trigger: commit
|
||||
# dist_git_branches:
|
||||
# - fedora-branched # rawhide updates are created automatically
|
||||
# - job: koji_build
|
||||
# trigger: commit
|
||||
# dist_git_branches:
|
||||
# - fedora-all
|
||||
# - job: propose_downstream
|
||||
# trigger: release
|
||||
# dist_git_branches:
|
||||
# - fedora-all
|
||||
- job: copr_build
|
||||
trigger: pull_request
|
||||
targets: &build_targets
|
||||
- centos-stream-9-aarch64
|
||||
- centos-stream-9-s390x
|
||||
- centos-stream-9-ppc64le
|
||||
- centos-stream-9-x86_64
|
||||
- centos-stream-10-aarch64
|
||||
- centos-stream-10-s390x
|
||||
- centos-stream-10-ppc64le
|
||||
- centos-stream-10-x86_64
|
||||
- fedora-all-aarch64
|
||||
- fedora-all-s390x
|
||||
- fedora-all-ppc64le
|
||||
- fedora-all
|
||||
- rhel-9-aarch64
|
||||
- rhel-9-x86_64
|
||||
- job: copr_build
|
||||
trigger: commit
|
||||
branch: main
|
||||
owner: "@osbuild" # copr repo namespace
|
||||
project: image-builder-cli # copr repo name so you can consume the builds
|
||||
targets: *build_targets
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ We have unit tests and some integration testing.
|
|||
To work on bootc-image-builder one needs a working Go environment. See
|
||||
[go.mod](go.mod).
|
||||
|
||||
To run the testsuite install the test dependencies as outlined in the
|
||||
To run the test suite install the test dependencies as outlined in the
|
||||
[github action](./.github/workflows/go.yml) under
|
||||
"Install test dependencies".
|
||||
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -1,6 +1,6 @@
|
|||
# image-builder CLI
|
||||
|
||||
Build images from the commandline in a convenient way.
|
||||
Build images from the command line in a convenient way.
|
||||
|
||||
## Run via container
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ This project is under development right now and needs to be run via:
|
|||
```console
|
||||
$ go run github.com/osbuild/image-builder-cli/cmd/image-builder@main
|
||||
```
|
||||
or install it into $GOPATH/bin
|
||||
or install it into `$GOPATH/bin`
|
||||
```console
|
||||
$ go install github.com/osbuild/image-builder-cli/cmd/image-builder@main
|
||||
```
|
||||
|
|
@ -29,7 +29,7 @@ we plan to provide rpm packages as well.
|
|||
|
||||
## Prerequisites
|
||||
|
||||
Make sure to have the required `osbuild` rpms installed:
|
||||
Make sure to have the required `osbuild` RPMs installed:
|
||||
```console
|
||||
$ sudo dnf install osbuild osbuild-depsolve-dnf osbuild-composer
|
||||
```
|
||||
|
|
@ -80,7 +80,7 @@ The following filters are currently supported, shell-style globbing is supported
|
|||
* distro: the distro name (e.g. fedora-41)
|
||||
* arch: the architecture name (e.g. x86_64)
|
||||
* type: the image type name (e.g. qcow2)
|
||||
* bootmode: the bootmode (legacy, uefi, hybrid)
|
||||
* bootmode: the bootmode (legacy, UEFI, hybrid)
|
||||
|
||||
The output can also be switched, supported are "text", "json":
|
||||
```console
|
||||
|
|
@ -124,7 +124,7 @@ A: The osbuild binary is used to actually build the images but beyond that
|
|||
|
||||
* **Website**: <https://www.osbuild.org>
|
||||
* **Bug Tracker**: <https://github.com/osbuild/image-builder-cli/issues>
|
||||
* **Discussions**: https://github.com/orgs/osbuild/discussions
|
||||
* **Discussions**: <https://github.com/orgs/osbuild/discussions>
|
||||
* **Matrix (chat)**: [Image Builder channel on Fedora Chat](https://matrix.to/#/#image-builder:fedoraproject.org?web-instance[element.io]=chat.fedoraproject.org)
|
||||
* **Changelog**: <https://github.com/osbuild/image-builder-cli/releases>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,4 @@
|
|||
import os
|
||||
import platform
|
||||
import random
|
||||
import string
|
||||
import subprocess
|
||||
import textwrap
|
||||
from contextlib import contextmanager
|
||||
|
||||
import pytest
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ import subprocess
|
|||
|
||||
import pytest
|
||||
|
||||
from containerbuild import build_container_fixture
|
||||
|
||||
|
||||
@pytest.mark.skipif(os.getuid() != 0, reason="needs root")
|
||||
def test_container_builds_image(tmp_path, build_container):
|
||||
|
|
@ -24,4 +22,3 @@ def test_container_builds_image(tmp_path, build_container):
|
|||
# XXX: ensure no other leftover dirs
|
||||
dents = os.listdir(output_dir)
|
||||
assert len(dents) == 1, f"too many dentries in output dir: {dents}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue