Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
phlogistonjohn committed Nov 20, 2024
2 parents 6726fc3 + a5244a3 commit d47fe94
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 38 deletions.
10 changes: 2 additions & 8 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
---
defaults:
actions:
queue:
name: default
method: rebase
update_method: rebase


# each test should be listed separately, do not use regular expressions:
# https://docs.mergify.io/conditions.html#validating-all-status-check
# TODO: Use mergify's recently added 'shared configuration support'
Expand Down Expand Up @@ -41,6 +33,8 @@ queue_rules:
- check-success=test-ad-server-kubernetes (nightly, centos, amd64)
- check-success=test-ad-server-kubernetes (nightly, fedora, amd64)
- check-success=dpulls
merge_method: rebase
update_method: rebase


pull_request_rules:
Expand Down
39 changes: 22 additions & 17 deletions .github/workflows/container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Build the server image
run: make KIND=server PACKAGE_SOURCE=${{ matrix.package_source }} OS_NAME=${{ matrix.os}} BUILD_ARCH=${{ matrix.arch}} build-image
- name: Upload server image
uses: ishworkh/container-image-artifact-upload@v1.0.0
uses: ishworkh/container-image-artifact-upload@v2.0.0
with:
image: "samba-server:${{ env.IMG_TAG }}"
container_engine: ${{ env.CONTAINER_CMD }}
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
- name: Build the ad server image
run: make KIND=ad-server PACKAGE_SOURCE=${{ matrix.package_source }} OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image
- name: Upload ad server image
uses: ishworkh/container-image-artifact-upload@v1.0.0
uses: ishworkh/container-image-artifact-upload@v2.0.0
with:
image: "samba-ad-server:${{ env.IMG_TAG }}"
container_engine: ${{ env.CONTAINER_CMD }}
Expand All @@ -112,7 +112,7 @@ jobs:
run: make KIND=client OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image
# The client image is used as a base for the samba-toolbox build process.
- name: Upload the client image
uses: ishworkh/container-image-artifact-upload@v1.0.0
uses: ishworkh/container-image-artifact-upload@v2.0.0
with:
image: "samba-client:${{ env.IMG_TAG }}"
container_engine: ${{ env.CONTAINER_CMD }}
Expand All @@ -133,7 +133,7 @@ jobs:
# Download locally stored samba-client image to be used as base for building
# samba-toolbox.
- name: Download client image
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-client:${{ env.IMG_TAG }}"
container_engine: ${{ env.CONTAINER_CMD }}
Expand All @@ -147,7 +147,7 @@ jobs:
run: make KIND=toolbox OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image
# Upload the toolbox image for reference and/or image push
- name: Upload the toolbox image
uses: ishworkh/container-image-artifact-upload@v1.0.0
uses: ishworkh/container-image-artifact-upload@v2.0.0
with:
image: "samba-toolbox:${{ env.IMG_TAG }}"
container_engine: ${{ env.CONTAINER_CMD }}
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Download server image
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-server:${{ env.IMG_TAG }}"
container_engine: ${{ env.CONTAINER_CMD }}
Expand Down Expand Up @@ -209,12 +209,12 @@ jobs:
- name: get nodes
run: kubectl get nodes
- name: Download ad server image
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-ad-server:${{ env.IMG_TAG }}"
container_engine: ${{ env.CONTAINER_CMD }}
- name: Download file server image
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-server:${{ env.IMG_TAG }}"
container_engine: ${{ env.CONTAINER_CMD }}
Expand All @@ -233,53 +233,58 @@ jobs:
runs-on: ubuntu-latest
env:
REPO_BASE: quay.io/samba.org
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'samba-in-kubernetes/samba-container'
# NOTE: the fromJSON below is needed beause the syntax github uses
# doesn't actually understand JS/JSON style arrays (inline). When I left it
# out I just got an error. It is present in their example(s).
if: >
contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name)
&& github.repository == 'samba-in-kubernetes/samba-container'
steps:
- uses: actions/checkout@v4
- name: log in to quay.io
run: ${CONTAINER_CMD} login -u "${{ secrets.QUAY_USER }}" -p "${{ secrets.QUAY_PASS }}" quay.io
# pull in already built images we plan on pushing
# (server images)
- name: Fetch server default-fedora-amd64
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-server:default-fedora-amd64"
container_engine: ${{ env.CONTAINER_CMD }}
- name: Fetch server nightly-fedora-amd64
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-server:nightly-fedora-amd64"
container_engine: ${{ env.CONTAINER_CMD }}
- name: Fetch server nightly-centos-amd64
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-server:nightly-centos-amd64"
container_engine: ${{ env.CONTAINER_CMD }}
- name: Fetch server devbuilds-centos-amd64
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-server:devbuilds-centos-amd64"
container_engine: ${{ env.CONTAINER_CMD }}
# (ad server images)
- name: Fetch ad-server default-fedora-amd64
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-ad-server:default-fedora-amd64"
container_engine: ${{ env.CONTAINER_CMD }}
- name: Fetch ad-server nightly-fedora-amd64
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-ad-server:nightly-fedora-amd64"
container_engine: ${{ env.CONTAINER_CMD }}
# (client images)
- name: Fetch client default-fedora-amd64
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-client:default-fedora-amd64"
container_engine: ${{ env.CONTAINER_CMD }}
# (toolbox images)
- name: Fetch toolbox default-fedora-amd64
uses: ishworkh/container-image-artifact-download@v1.0.0
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "samba-toolbox:default-fedora-amd64"
container_engine: ${{ env.CONTAINER_CMD }}
Expand Down
2 changes: 1 addition & 1 deletion images/ad-server/Containerfile.fedora
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.fedoraproject.org/fedora:39
FROM registry.fedoraproject.org/fedora:40
ARG INSTALL_PACKAGES_FROM=default
ARG SAMBA_VERSION_SUFFIX="-4.19.6"
ARG SAMBACC_VERSION_SUFFIX="-0.5-1.fc39"
Expand Down
2 changes: 1 addition & 1 deletion images/client/Containerfile.fedora
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2020 Michael Adam

FROM registry.fedoraproject.org/fedora:39
FROM registry.fedoraproject.org/fedora:40

MAINTAINER Michael Adam <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion images/server/Containerfile.fedora
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.fedoraproject.org/fedora:39
FROM registry.fedoraproject.org/fedora:40
ARG INSTALL_PACKAGES_FROM=default
ARG SAMBA_VERSION_SUFFIX="-4.19.6"
ARG SAMBACC_VERSION_SUFFIX="-0.5-1.fc39"
Expand Down
49 changes: 39 additions & 10 deletions images/server/install-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,31 @@ EOF
rm -rf "${tmpfile}"
}

get_samba_nightly_repo() {
get_custom_repo "https://artifacts.ci.centos.org/samba/pkgs/master/${OS_BASE}/samba-nightly-master.repo"
}

get_distro_ceph_repo() {
if [[ "${OS_BASE}" = centos ]]; then
dnf install --setopt=install_weak_deps=False -y \
epel-release centos-release-ceph-reef
fi
}

get_epel_repo_if_needed() {
if [[ "${OS_BASE}" = centos ]]; then
dnf install --setopt=install_weak_deps=False -y epel-release
fi
}

get_ceph_shaman_repo() {
ceph_ref="${CEPH_REPO_REF:-main}"
ceph_sha="${CEPH_REPO_SHA:-latest}"
url="https://shaman.ceph.com/api/search/?project=ceph&distros=${OS_BASE}/9/x86_64&flavor=default&ref=${ceph_ref}&sha1=${ceph_sha}"
generate_repo_from_shaman "${url}" "ceph-${ceph_ref}.repo"
cat "/etc/yum.repos.d/ceph-${ceph_ref}.repo"
}

install_packages_from="$1"
samba_version_suffix="$2"
install_custom_repo="$3"
Expand All @@ -50,22 +75,26 @@ OS_BASE="$(. /etc/os-release && echo "${ID}")"

case "${install_packages_from}" in
samba-nightly)
get_custom_repo "https://artifacts.ci.centos.org/samba/pkgs/master/${OS_BASE}/samba-nightly-master.repo"
if [[ "${OS_BASE}" = centos ]]; then
dnf install --setopt=install_weak_deps=False -y \
epel-release centos-release-ceph-reef
fi
get_samba_nightly_repo
get_distro_ceph_repo
package_selection=${package_selection:-nightly}
;;
devbuilds)
get_samba_nightly_repo
# devbuilds - samba nightly dev builds and ceph dev builds
get_custom_repo "https://artifacts.ci.centos.org/samba/pkgs/master/${OS_BASE}/samba-nightly-master.repo"
generate_repo_from_shaman "https://shaman.ceph.com/api/search/?project=ceph&distros=${OS_BASE}/9/x86_64&flavor=default&ref=main&sha1=latest" ceph-main.repo
dnf install --setopt=install_weak_deps=False -y epel-release
get_ceph_shaman_repo
get_epel_repo_if_needed
package_selection=${package_selection:-devbuilds}
;;
custom-repo)
get_custom_repo "${install_custom_repo}"
get_distro_ceph_repo
;;
custom-devbuilds)
get_custom_repo "${install_custom_repo}"
get_ceph_shaman_repo
get_epel_repo_if_needed
package_selection=${package_selection:-devbuilds}
;;
esac

Expand Down Expand Up @@ -95,11 +124,11 @@ samba_packages=(\
ctdb)
case "${package_selection}-${OS_BASE}" in
*-fedora|allvfs-*)
samba_packages+=(samba-vfs-cephfs samba-vfs-glusterfs)
samba_packages+=(samba-vfs-cephfs samba-vfs-glusterfs ctdb-ceph-mutex)
;;
nightly-centos|devbuilds-centos|forcedevbuilds-*)
dnf_cmd+=(--enablerepo=epel)
samba_packages+=(samba-vfs-cephfs)
samba_packages+=(samba-vfs-cephfs ctdb-ceph-mutex)
# these packages should be installed as deps. of sambacc extras
# however, the sambacc builds do not enable the extras on centos atm.
# Once this is fixed this line ought to be removed.
Expand Down

0 comments on commit d47fe94

Please sign in to comment.