Skip to content

Commit d47fe94

Browse files
Merge branch 'master' into release
2 parents 6726fc3 + a5244a3 commit d47fe94

File tree

6 files changed

+66
-38
lines changed

6 files changed

+66
-38
lines changed

.github/mergify.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
---
2-
defaults:
3-
actions:
4-
queue:
5-
name: default
6-
method: rebase
7-
update_method: rebase
8-
9-
102
# each test should be listed separately, do not use regular expressions:
113
# https://docs.mergify.io/conditions.html#validating-all-status-check
124
# TODO: Use mergify's recently added 'shared configuration support'
@@ -41,6 +33,8 @@ queue_rules:
4133
- check-success=test-ad-server-kubernetes (nightly, centos, amd64)
4234
- check-success=test-ad-server-kubernetes (nightly, fedora, amd64)
4335
- check-success=dpulls
36+
merge_method: rebase
37+
update_method: rebase
4438

4539

4640
pull_request_rules:

.github/workflows/container-image.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- name: Build the server image
6464
run: make KIND=server PACKAGE_SOURCE=${{ matrix.package_source }} OS_NAME=${{ matrix.os}} BUILD_ARCH=${{ matrix.arch}} build-image
6565
- name: Upload server image
66-
uses: ishworkh/container-image-artifact-upload@v1.0.0
66+
uses: ishworkh/container-image-artifact-upload@v2.0.0
6767
with:
6868
image: "samba-server:${{ env.IMG_TAG }}"
6969
container_engine: ${{ env.CONTAINER_CMD }}
@@ -91,7 +91,7 @@ jobs:
9191
- name: Build the ad server image
9292
run: make KIND=ad-server PACKAGE_SOURCE=${{ matrix.package_source }} OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image
9393
- name: Upload ad server image
94-
uses: ishworkh/container-image-artifact-upload@v1.0.0
94+
uses: ishworkh/container-image-artifact-upload@v2.0.0
9595
with:
9696
image: "samba-ad-server:${{ env.IMG_TAG }}"
9797
container_engine: ${{ env.CONTAINER_CMD }}
@@ -112,7 +112,7 @@ jobs:
112112
run: make KIND=client OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image
113113
# The client image is used as a base for the samba-toolbox build process.
114114
- name: Upload the client image
115-
uses: ishworkh/container-image-artifact-upload@v1.0.0
115+
uses: ishworkh/container-image-artifact-upload@v2.0.0
116116
with:
117117
image: "samba-client:${{ env.IMG_TAG }}"
118118
container_engine: ${{ env.CONTAINER_CMD }}
@@ -133,7 +133,7 @@ jobs:
133133
# Download locally stored samba-client image to be used as base for building
134134
# samba-toolbox.
135135
- name: Download client image
136-
uses: ishworkh/container-image-artifact-download@v1.0.0
136+
uses: ishworkh/container-image-artifact-download@v2.0.0
137137
with:
138138
image: "samba-client:${{ env.IMG_TAG }}"
139139
container_engine: ${{ env.CONTAINER_CMD }}
@@ -147,7 +147,7 @@ jobs:
147147
run: make KIND=toolbox OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image
148148
# Upload the toolbox image for reference and/or image push
149149
- name: Upload the toolbox image
150-
uses: ishworkh/container-image-artifact-upload@v1.0.0
150+
uses: ishworkh/container-image-artifact-upload@v2.0.0
151151
with:
152152
image: "samba-toolbox:${{ env.IMG_TAG }}"
153153
container_engine: ${{ env.CONTAINER_CMD }}
@@ -175,7 +175,7 @@ jobs:
175175
steps:
176176
- uses: actions/checkout@v4
177177
- name: Download server image
178-
uses: ishworkh/container-image-artifact-download@v1.0.0
178+
uses: ishworkh/container-image-artifact-download@v2.0.0
179179
with:
180180
image: "samba-server:${{ env.IMG_TAG }}"
181181
container_engine: ${{ env.CONTAINER_CMD }}
@@ -209,12 +209,12 @@ jobs:
209209
- name: get nodes
210210
run: kubectl get nodes
211211
- name: Download ad server image
212-
uses: ishworkh/container-image-artifact-download@v1.0.0
212+
uses: ishworkh/container-image-artifact-download@v2.0.0
213213
with:
214214
image: "samba-ad-server:${{ env.IMG_TAG }}"
215215
container_engine: ${{ env.CONTAINER_CMD }}
216216
- name: Download file server image
217-
uses: ishworkh/container-image-artifact-download@v1.0.0
217+
uses: ishworkh/container-image-artifact-download@v2.0.0
218218
with:
219219
image: "samba-server:${{ env.IMG_TAG }}"
220220
container_engine: ${{ env.CONTAINER_CMD }}
@@ -233,53 +233,58 @@ jobs:
233233
runs-on: ubuntu-latest
234234
env:
235235
REPO_BASE: quay.io/samba.org
236-
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'samba-in-kubernetes/samba-container'
236+
# NOTE: the fromJSON below is needed beause the syntax github uses
237+
# doesn't actually understand JS/JSON style arrays (inline). When I left it
238+
# out I just got an error. It is present in their example(s).
239+
if: >
240+
contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name)
241+
&& github.repository == 'samba-in-kubernetes/samba-container'
237242
steps:
238243
- uses: actions/checkout@v4
239244
- name: log in to quay.io
240245
run: ${CONTAINER_CMD} login -u "${{ secrets.QUAY_USER }}" -p "${{ secrets.QUAY_PASS }}" quay.io
241246
# pull in already built images we plan on pushing
242247
# (server images)
243248
- name: Fetch server default-fedora-amd64
244-
uses: ishworkh/container-image-artifact-download@v1.0.0
249+
uses: ishworkh/container-image-artifact-download@v2.0.0
245250
with:
246251
image: "samba-server:default-fedora-amd64"
247252
container_engine: ${{ env.CONTAINER_CMD }}
248253
- name: Fetch server nightly-fedora-amd64
249-
uses: ishworkh/container-image-artifact-download@v1.0.0
254+
uses: ishworkh/container-image-artifact-download@v2.0.0
250255
with:
251256
image: "samba-server:nightly-fedora-amd64"
252257
container_engine: ${{ env.CONTAINER_CMD }}
253258
- name: Fetch server nightly-centos-amd64
254-
uses: ishworkh/container-image-artifact-download@v1.0.0
259+
uses: ishworkh/container-image-artifact-download@v2.0.0
255260
with:
256261
image: "samba-server:nightly-centos-amd64"
257262
container_engine: ${{ env.CONTAINER_CMD }}
258263
- name: Fetch server devbuilds-centos-amd64
259-
uses: ishworkh/container-image-artifact-download@v1.0.0
264+
uses: ishworkh/container-image-artifact-download@v2.0.0
260265
with:
261266
image: "samba-server:devbuilds-centos-amd64"
262267
container_engine: ${{ env.CONTAINER_CMD }}
263268
# (ad server images)
264269
- name: Fetch ad-server default-fedora-amd64
265-
uses: ishworkh/container-image-artifact-download@v1.0.0
270+
uses: ishworkh/container-image-artifact-download@v2.0.0
266271
with:
267272
image: "samba-ad-server:default-fedora-amd64"
268273
container_engine: ${{ env.CONTAINER_CMD }}
269274
- name: Fetch ad-server nightly-fedora-amd64
270-
uses: ishworkh/container-image-artifact-download@v1.0.0
275+
uses: ishworkh/container-image-artifact-download@v2.0.0
271276
with:
272277
image: "samba-ad-server:nightly-fedora-amd64"
273278
container_engine: ${{ env.CONTAINER_CMD }}
274279
# (client images)
275280
- name: Fetch client default-fedora-amd64
276-
uses: ishworkh/container-image-artifact-download@v1.0.0
281+
uses: ishworkh/container-image-artifact-download@v2.0.0
277282
with:
278283
image: "samba-client:default-fedora-amd64"
279284
container_engine: ${{ env.CONTAINER_CMD }}
280285
# (toolbox images)
281286
- name: Fetch toolbox default-fedora-amd64
282-
uses: ishworkh/container-image-artifact-download@v1.0.0
287+
uses: ishworkh/container-image-artifact-download@v2.0.0
283288
with:
284289
image: "samba-toolbox:default-fedora-amd64"
285290
container_engine: ${{ env.CONTAINER_CMD }}

images/ad-server/Containerfile.fedora

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.fedoraproject.org/fedora:39
1+
FROM registry.fedoraproject.org/fedora:40
22
ARG INSTALL_PACKAGES_FROM=default
33
ARG SAMBA_VERSION_SUFFIX="-4.19.6"
44
ARG SAMBACC_VERSION_SUFFIX="-0.5-1.fc39"

images/client/Containerfile.fedora

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright 2020 Michael Adam
22

3-
FROM registry.fedoraproject.org/fedora:39
3+
FROM registry.fedoraproject.org/fedora:40
44

55
MAINTAINER Michael Adam <[email protected]>
66

images/server/Containerfile.fedora

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.fedoraproject.org/fedora:39
1+
FROM registry.fedoraproject.org/fedora:40
22
ARG INSTALL_PACKAGES_FROM=default
33
ARG SAMBA_VERSION_SUFFIX="-4.19.6"
44
ARG SAMBACC_VERSION_SUFFIX="-0.5-1.fc39"

images/server/install-packages.sh

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,31 @@ EOF
4040
rm -rf "${tmpfile}"
4141
}
4242

43+
get_samba_nightly_repo() {
44+
get_custom_repo "https://artifacts.ci.centos.org/samba/pkgs/master/${OS_BASE}/samba-nightly-master.repo"
45+
}
46+
47+
get_distro_ceph_repo() {
48+
if [[ "${OS_BASE}" = centos ]]; then
49+
dnf install --setopt=install_weak_deps=False -y \
50+
epel-release centos-release-ceph-reef
51+
fi
52+
}
53+
54+
get_epel_repo_if_needed() {
55+
if [[ "${OS_BASE}" = centos ]]; then
56+
dnf install --setopt=install_weak_deps=False -y epel-release
57+
fi
58+
}
59+
60+
get_ceph_shaman_repo() {
61+
ceph_ref="${CEPH_REPO_REF:-main}"
62+
ceph_sha="${CEPH_REPO_SHA:-latest}"
63+
url="https://shaman.ceph.com/api/search/?project=ceph&distros=${OS_BASE}/9/x86_64&flavor=default&ref=${ceph_ref}&sha1=${ceph_sha}"
64+
generate_repo_from_shaman "${url}" "ceph-${ceph_ref}.repo"
65+
cat "/etc/yum.repos.d/ceph-${ceph_ref}.repo"
66+
}
67+
4368
install_packages_from="$1"
4469
samba_version_suffix="$2"
4570
install_custom_repo="$3"
@@ -50,22 +75,26 @@ OS_BASE="$(. /etc/os-release && echo "${ID}")"
5075

5176
case "${install_packages_from}" in
5277
samba-nightly)
53-
get_custom_repo "https://artifacts.ci.centos.org/samba/pkgs/master/${OS_BASE}/samba-nightly-master.repo"
54-
if [[ "${OS_BASE}" = centos ]]; then
55-
dnf install --setopt=install_weak_deps=False -y \
56-
epel-release centos-release-ceph-reef
57-
fi
78+
get_samba_nightly_repo
79+
get_distro_ceph_repo
5880
package_selection=${package_selection:-nightly}
5981
;;
6082
devbuilds)
83+
get_samba_nightly_repo
6184
# devbuilds - samba nightly dev builds and ceph dev builds
62-
get_custom_repo "https://artifacts.ci.centos.org/samba/pkgs/master/${OS_BASE}/samba-nightly-master.repo"
63-
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
64-
dnf install --setopt=install_weak_deps=False -y epel-release
85+
get_ceph_shaman_repo
86+
get_epel_repo_if_needed
6587
package_selection=${package_selection:-devbuilds}
6688
;;
6789
custom-repo)
6890
get_custom_repo "${install_custom_repo}"
91+
get_distro_ceph_repo
92+
;;
93+
custom-devbuilds)
94+
get_custom_repo "${install_custom_repo}"
95+
get_ceph_shaman_repo
96+
get_epel_repo_if_needed
97+
package_selection=${package_selection:-devbuilds}
6998
;;
7099
esac
71100

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

0 commit comments

Comments
 (0)