mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 04:27:02 +01:00
ci: uniform Docker builds (#3430)
Some checks are pending
Linting checks / clippy (push) Waiting to run
Linting checks / fmt (push) Waiting to run
Spell Check / codespell (push) Waiting to run
Container - Kanidm / Set image tag values (push) Waiting to run
Container - Kanidm / Build kanidm Docker image (push) Blocked by required conditions
Container - Kanidm / Push kanidm Docker image (push) Blocked by required conditions
Container - Kanidmd / Set image tag values (push) Waiting to run
Container - Kanidmd / Build kanidmd Docker image (push) Blocked by required conditions
Container - Kanidmd / Push kanidmd Docker image (push) Blocked by required conditions
Container - Radiusd / Set image tag values (push) Waiting to run
Container - Radiusd / Build radius Docker image (push) Blocked by required conditions
Container - Radiusd / Push radius Docker image (push) Blocked by required conditions
Javascript Linting / javascript_lint (push) Waiting to run
Javascript Linting / javascript_fmt (push) Waiting to run
GitHub Pages / pre_deploy (push) Waiting to run
GitHub Pages / fanout (${{ needs.pre_deploy.outputs.latest}}) (push) Blocked by required conditions
GitHub Pages / docs_master (push) Waiting to run
GitHub Pages / deploy (push) Blocked by required conditions
PyKanidm tests / tests (push) Waiting to run
Linux Build and Test / rust_build (push) Waiting to run
Linux Build and Test / rust_build_next (beta) (push) Waiting to run
Linux Build and Test / rust_build_next (nightly) (push) Waiting to run
Linux Build and Test / run_release (push) Waiting to run
Windows Build and Test / windows_build_kanidm (push) Waiting to run
Some checks are pending
Linting checks / clippy (push) Waiting to run
Linting checks / fmt (push) Waiting to run
Spell Check / codespell (push) Waiting to run
Container - Kanidm / Set image tag values (push) Waiting to run
Container - Kanidm / Build kanidm Docker image (push) Blocked by required conditions
Container - Kanidm / Push kanidm Docker image (push) Blocked by required conditions
Container - Kanidmd / Set image tag values (push) Waiting to run
Container - Kanidmd / Build kanidmd Docker image (push) Blocked by required conditions
Container - Kanidmd / Push kanidmd Docker image (push) Blocked by required conditions
Container - Radiusd / Set image tag values (push) Waiting to run
Container - Radiusd / Build radius Docker image (push) Blocked by required conditions
Container - Radiusd / Push radius Docker image (push) Blocked by required conditions
Javascript Linting / javascript_lint (push) Waiting to run
Javascript Linting / javascript_fmt (push) Waiting to run
GitHub Pages / pre_deploy (push) Waiting to run
GitHub Pages / fanout (${{ needs.pre_deploy.outputs.latest}}) (push) Blocked by required conditions
GitHub Pages / docs_master (push) Waiting to run
GitHub Pages / deploy (push) Blocked by required conditions
PyKanidm tests / tests (push) Waiting to run
Linux Build and Test / rust_build (push) Waiting to run
Linux Build and Test / rust_build_next (beta) (push) Waiting to run
Linux Build and Test / rust_build_next (nightly) (push) Waiting to run
Linux Build and Test / run_release (push) Waiting to run
Windows Build and Test / windows_build_kanidm (push) Waiting to run
This commit is contained in:
parent
77271c1720
commit
ce410f440c
17
.github/workflows/docker_build_kanidm.yml
vendored
17
.github/workflows/docker_build_kanidm.yml
vendored
|
@ -35,9 +35,15 @@ jobs:
|
||||||
needs:
|
needs:
|
||||||
- set_tag_values
|
- set_tag_values
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
- name: Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
- name: Build kanidm
|
- name: Build kanidm
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
|
@ -47,6 +53,9 @@ jobs:
|
||||||
build-args: |
|
build-args: |
|
||||||
"KANIDM_FEATURES="
|
"KANIDM_FEATURES="
|
||||||
file: tools/Dockerfile
|
file: tools/Dockerfile
|
||||||
|
context: .
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
annotations: ${{ steps.meta.outputs.annotations }}
|
||||||
# Must use OCI exporter for multi-arch: https://github.com/docker/buildx/pull/1813
|
# Must use OCI exporter for multi-arch: https://github.com/docker/buildx/pull/1813
|
||||||
outputs: type=oci,dest=/tmp/kanidm-docker.tar
|
outputs: type=oci,dest=/tmp/kanidm-docker.tar
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
|
@ -60,8 +69,8 @@ jobs:
|
||||||
# This step is split so that we don't apply "packages: write" permission
|
# This step is split so that we don't apply "packages: write" permission
|
||||||
# except when uploading the final Docker image to GHCR.
|
# except when uploading the final Docker image to GHCR.
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ( github.ref_type == 'tag' || github.ref == 'refs/heads/master' ) && github.repository == 'kanidm/kanidm'
|
if: ( github.ref_type == 'tag' || github.ref == 'refs/heads/master' )
|
||||||
needs: kanidm_build
|
needs: [kanidm_build, set_tag_values]
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
|
@ -78,4 +87,4 @@ jobs:
|
||||||
echo "${{ secrets.GITHUB_TOKEN }}" | \
|
echo "${{ secrets.GITHUB_TOKEN }}" | \
|
||||||
oras login -u "${{ github.actor }}" --password-stdin ghcr.io
|
oras login -u "${{ github.actor }}" --password-stdin ghcr.io
|
||||||
oras copy --from-oci-layout "/tmp/kanidm-docker.tar:devel" \
|
oras copy --from-oci-layout "/tmp/kanidm-docker.tar:devel" \
|
||||||
"ghcr.io/${{ github.repository_owner }}/kanidm:devel"
|
"ghcr.io/${{ needs.set_tag_values.outputs.owner_lc }}/kanidm:devel"
|
29
.github/workflows/docker_build_kanidmd.yml
vendored
29
.github/workflows/docker_build_kanidmd.yml
vendored
|
@ -35,27 +35,15 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: set_tag_values
|
needs: set_tag_values
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Docker metadata
|
- name: Docker metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
|
||||||
# list of Docker images to use as base name for tags
|
|
||||||
# images: |
|
|
||||||
# kanidm/kanidmd
|
|
||||||
# ghcr.io/username/app
|
|
||||||
# generate Docker tags based on the following events/attributes
|
|
||||||
tags: |
|
|
||||||
type=schedule
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=pr
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
type=sha
|
|
||||||
|
|
||||||
- name: Build kanidmd
|
- name: Build kanidmd
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
|
@ -64,6 +52,9 @@ jobs:
|
||||||
# build-args: |
|
# build-args: |
|
||||||
# "KANIDM_BUILD_OPTIONS=-j1"
|
# "KANIDM_BUILD_OPTIONS=-j1"
|
||||||
file: server/Dockerfile
|
file: server/Dockerfile
|
||||||
|
context: .
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
annotations: ${{ steps.meta.outputs.annotations }}
|
||||||
# Must use OCI exporter for multi-arch: https://github.com/docker/buildx/pull/1813
|
# Must use OCI exporter for multi-arch: https://github.com/docker/buildx/pull/1813
|
||||||
outputs: type=oci,dest=/tmp/kanidmd-docker.tar
|
outputs: type=oci,dest=/tmp/kanidmd-docker.tar
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
|
@ -77,8 +68,8 @@ jobs:
|
||||||
# This step is split so that we don't apply "packages: write" permission
|
# This step is split so that we don't apply "packages: write" permission
|
||||||
# except when uploading the final Docker image to GHCR.
|
# except when uploading the final Docker image to GHCR.
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ( github.ref_type== 'tag' || github.ref == 'refs/heads/master' ) && github.repository == 'kanidm/kanidm'
|
if: ( github.ref_type== 'tag' || github.ref == 'refs/heads/master' )
|
||||||
needs: kanidmd_build
|
needs: [kanidmd_build, set_tag_values]
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
|
@ -95,4 +86,4 @@ jobs:
|
||||||
echo "${{ secrets.GITHUB_TOKEN }}" | \
|
echo "${{ secrets.GITHUB_TOKEN }}" | \
|
||||||
oras login -u "${{ github.actor }}" --password-stdin ghcr.io
|
oras login -u "${{ github.actor }}" --password-stdin ghcr.io
|
||||||
oras copy --from-oci-layout "/tmp/kanidmd-docker.tar:devel" \
|
oras copy --from-oci-layout "/tmp/kanidmd-docker.tar:devel" \
|
||||||
"ghcr.io/${{ github.repository_owner }}/kanidmd:devel"
|
"ghcr.io/${{ needs.set_tag_values.outputs.owner_lc }}/kanidmd:devel"
|
17
.github/workflows/docker_build_radiusd.yml
vendored
17
.github/workflows/docker_build_radiusd.yml
vendored
|
@ -35,17 +35,26 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: set_tag_values
|
needs: set_tag_values
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
- name: Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
- name: Build radius
|
- name: Build radius
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/arm64,linux/amd64
|
platforms: linux/arm64,linux/amd64
|
||||||
tags: ghcr.io/${{ needs.set_tag_values.outputs.owner_lc }}/radius:devel,ghcr.io/${{ needs.set_tag_values.outputs.owner_lc }}/radius:${{ needs.set_tag_values.outputs.ref_name}}
|
tags: ghcr.io/${{ needs.set_tag_values.outputs.owner_lc }}/radius:devel,ghcr.io/${{ needs.set_tag_values.outputs.owner_lc }}/radius:${{ needs.set_tag_values.outputs.ref_name}}
|
||||||
file: rlm_python/Dockerfile
|
file: rlm_python/Dockerfile
|
||||||
|
context: .
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
annotations: ${{ steps.meta.outputs.annotations }}
|
||||||
# Must use OCI exporter for multi-arch: https://github.com/docker/buildx/pull/1813
|
# Must use OCI exporter for multi-arch: https://github.com/docker/buildx/pull/1813
|
||||||
outputs: type=oci,dest=/tmp/radius-docker.tar
|
outputs: type=oci,dest=/tmp/radius-docker.tar
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
|
@ -59,8 +68,8 @@ jobs:
|
||||||
# This step is split so that we don't apply "packages: write" permission
|
# This step is split so that we don't apply "packages: write" permission
|
||||||
# except when uploading the final Docker image to GHCR.
|
# except when uploading the final Docker image to GHCR.
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ( github.ref_type == 'tag' || github.ref == 'refs/heads/master' ) && github.repository == 'kanidm/kanidm'
|
if: ( github.ref_type == 'tag' || github.ref == 'refs/heads/master' )
|
||||||
needs: radius_build
|
needs: [radius_build, set_tag_values]
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
|
@ -79,4 +88,4 @@ jobs:
|
||||||
echo "${{ secrets.GITHUB_TOKEN }}" | \
|
echo "${{ secrets.GITHUB_TOKEN }}" | \
|
||||||
oras login -u "${{ github.actor }}" --password-stdin ghcr.io
|
oras login -u "${{ github.actor }}" --password-stdin ghcr.io
|
||||||
oras copy --from-oci-layout "/tmp/radius-docker.tar:devel" \
|
oras copy --from-oci-layout "/tmp/radius-docker.tar:devel" \
|
||||||
"ghcr.io/${{ github.repository_owner }}/radius:devel"
|
"ghcr.io/${{ needs.set_tag_values.outputs.owner_lc }}/radius:devel"
|
Loading…
Reference in a new issue