feat: update to osixia/baseimage 2.0.0 and add integration tests

- Update the base image to osixia/baseimage:alpine-2.0.0 and build the
  CI/CD tool with osixia/dagger-build (Go 1.26.9).
- Add Dagger integration tests: default bootstrap, alternative schemas,
  all compatible modules and schemas with every bootstrap feature on a
  3-node replicated cluster with TLS required, backup/restore, simulated
  upgrade and upgrade from previous releases.
- Fix bootstrap failing with "Argument list too long" with large schemas:
  load them with LDIF include: lines, fail on missing schemas.
- Default OPENLDAP_BOOTSTRAP_PPOLICY_DEFAULT_CHECK_QUALITY to 1 so
  pwdMinLength is enforced.
- Align the CI workflow with osixia/container-baseimage and add Dependabot.
- Document available schemas and modules and their incompatibilities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Bertrand Gouny
2026-10-16 20:37:20 +02:00
co-authored by Claude Opus 5.5
parent fa0eae90d5
commit 52230d6cd7
23 changed files with 1351 additions and 40 deletions
+21
View File
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
target-branch: develop
schedule:
interval: monthly
groups:
github-actions:
patterns:
- "*"
- package-ecosystem: gomod
directory: /build
target-branch: develop
schedule:
interval: monthly
groups:
go-modules:
patterns:
- "*"
+71 -23
View File
@@ -1,6 +1,9 @@
name: osixia
on: [push, pull_request]
permissions:
contents: read
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
@@ -10,65 +13,110 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-go@v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
go-version: '1.26.1'
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: '1.26.9'
cache: false
- name: golangci-lint build
uses: golangci/golangci-lint-action@v9.3.0
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.14.0
working-directory: build
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: '1.26.9'
- name: Run build tool tests
working-directory: build
run: go test -race ./...
shellcheck:
name: shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@2.0.0
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
govulncheck:
name: govulncheck
runs-on: ubuntu-latest
steps:
- name: govulncheck build
uses: golang/govulncheck-action@v1.1.0
uses: golang/govulncheck-action@032d45514ae346b1db93c04b0c90b841c370344f # v1.1.0
with:
go-version-input: '1.26.9'
work-dir: build
build:
name: build
if: "!startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
needs: [lint, shellcheck, govulncheck]
needs: [lint, test, shellcheck, govulncheck]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: '1.26.9'
- name: Vendor build go dependencies
working-directory: build
run: go mod vendor
- name: Run tests
working-directory: build
run: go run main.go provider github ../Dockerfile --github-ref "${GITHUB_REF}" ${{ vars.OSX_GITHUB_FLAGS }}
publish:
name: publish
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [lint, test, shellcheck, govulncheck]
permissions:
contents: write
id-token: write
env:
DIGESTS_FILE: ${{ github.workspace }}/digests.txt
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-go@v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
go-version: '1.26.1'
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: '1.26.9'
cache: false
- name: Install cosign
uses: sigstore/cosign-installer@v4.1.2
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
- name: Install syft
uses: anchore/sbom-action/download-syft@v0.24.3
uses: anchore/sbom-action/download-syft@66cbf4bc1f1c0d2edc94016e65bc221b6bb0ad6c # v0.24.3
- name: Vendor build go dependencies
run: |
cd build
go mod vendor
working-directory: build
run: go mod vendor
- name: Run pipeline
run: |
cd build
go run main.go provider github ../Dockerfile --github-ref "${GITHUB_REF}" --github-token "${{ secrets.GITHUB_TOKEN }}" --changelog ../CHANGELOG.md --username "${{ secrets.REGISTRY_USERNAME }}" --password "${{ secrets.REGISTRY_PASSWORD }}" --digests-file "${DIGESTS_FILE}" ${{ vars.OSX_GITHUB_FLAGS }}
- name: Sign images and generate SBOM
if: startsWith(github.ref, 'refs/tags/')
working-directory: build
env:
COSIGN_EXPERIMENTAL: '1'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
run: go run main.go provider github ../Dockerfile --github-ref "${GITHUB_REF}" --github-token "${GITHUB_TOKEN}" --changelog ../CHANGELOG.md --username "${REGISTRY_USERNAME}" --password "${REGISTRY_PASSWORD}" --digests-file "${DIGESTS_FILE}" ${{ vars.OSX_GITHUB_FLAGS }}
- name: Sign images and generate SBOM
env:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
printf '%s' "${REGISTRY_PASSWORD}" | docker login -u "${REGISTRY_USERNAME}" --password-stdin
while IFS= read -r ref; do
cosign sign --yes --registry-referrers-mode=oci-1-1 "${ref}"
syft "${ref}" -o spdx-json > sbom.spdx.json