Compare commits

..

33 Commits

Author SHA256 Message Date
b1dfe698ff Merge pull request 'update-devel' (#141) from nbelouin/Factory:update-devel into devel
Reviewed-on: #141
Reviewed-by: Denislav Prodanov <dprodanov@noreply.src.opensuse.org>
2025-05-07 10:19:14 +02:00
9581e030ce Merge branch 'main' into update-devel 2025-05-06 16:04:05 +02:00
e71339ae00 Merge pull request 'Updates for EIB 1.2.0-rc1' (#126) from dbekhit/Factory:main into main
Reviewed-on: #126
Reviewed-by: Fatih Degirmenci <fdegirmenci@noreply.src.opensuse.org>
2025-05-06 14:36:44 +02:00
f32718b5e4 Merge pull request 'Enable kubectl image on aarch64' (#140) from nbelouin/Factory:kubect-aarch64 into main
All checks were successful
Synchronize Project Config / Update prjconf in OBS (push) Successful in -53s
Synchronize Project Metadata / sync-prj-meta (push) Successful in 11s
Reviewed-on: #140
Reviewed-by: Steven Hardy <steven.hardy@noreply.src.opensuse.org>
Reviewed-by: Fatih Degirmenci <fdegirmenci@noreply.src.opensuse.org>
2025-05-06 14:33:40 +02:00
c81f5057ce Enable kubectl image on aarch64
Some checks failed
Build PR in OBS / Build PR in OBS (pull_request_target) Failing after 13m7s
Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
2025-05-06 14:18:52 +02:00
6b8109c772 Merge pull request 'Remove extra slash in image reference' (#139) from nbelouin/Factory:fix-slash-typo into main
Reviewed-on: #139
Reviewed-by: Fatih Degirmenci <fdegirmenci@noreply.src.opensuse.org>
2025-05-06 14:10:04 +02:00
8b383c15fa Remove extra slash in image reference
Some checks failed
Build PR in OBS / Build PR in OBS (pull_request_target) Failing after 29m5s
Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
2025-05-06 13:39:45 +02:00
2013caec19 Merge pull request 'Add checks (lint) for helm charts and images' (#128) from nbelouin/Factory:lint into main
All checks were successful
Synchronize Project Config / Update prjconf in OBS (push) Successful in -46s
Synchronize Project Metadata / sync-prj-meta (push) Successful in 19s
Reviewed-on: #128
Reviewed-by: Denislav Prodanov <dprodanov@noreply.src.opensuse.org>
2025-05-06 10:00:12 +02:00
4259b167fd update to v1.2.0-rc1
All checks were successful
Build PR in OBS / Build PR in OBS (pull_request_target) Successful in -47s
2025-05-02 11:16:43 -04:00
652fc553b9 Remove -chart suffixes
All checks were successful
Build PR in OBS / Build PR in OBS (pull_request_target) Successful in -37s
Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
2025-04-30 16:42:54 +02:00
1048591769 Fix charts and images
Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
2025-04-30 16:42:54 +02:00
8a9717c266 Add initial checks
Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
2025-04-30 16:42:54 +02:00
49405f41f9 EIB v1.2.0-rc0 needs golang 1.124
All checks were successful
Build PR in OBS / Build PR in OBS (pull_request_target) Successful in 1h6m20s
2025-04-30 16:26:27 +02:00
be29dbba41 Fix the _service file to use the defined pre-release version 2025-04-30 16:26:27 +02:00
a2c817259f modify '-' to '~' 2025-04-30 16:26:27 +02:00
dfe4892f4c changes for EIB 1.2.0-rc0 2025-04-30 16:26:27 +02:00
ef68dbfd92 Merge pull request 'Fix some issue with dependency projects ordering, make _config only build wanted packages' (#137) from nbelouin/Factory:fix-meta-config into main
All checks were successful
Synchronize Project Config / Update prjconf in OBS (push) Successful in 4s
Synchronize Project Metadata / sync-prj-meta (push) Successful in -31s
Reviewed-on: #137
Reviewed-by: Denislav Prodanov <dprodanov@noreply.src.opensuse.org>
2025-04-30 15:27:09 +02:00
6c1db68da8 Fix some issue with dependency projects ordering, make _config only build wanted packages
Some checks failed
Build PR in OBS / Build PR in OBS (pull_request_target) Failing after 21m52s
Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
2025-04-30 14:51:17 +02:00
76036c2dd8 Merge pull request 'update-devel' (#81) from nbelouin/Factory:update-devel into devel
Reviewed-on: #81
Reviewed-by: Denislav Prodanov <dprodanov@noreply.src.opensuse.org>
2025-02-25 15:37:18 +01:00
0c6db5d5cc Merge branch 'main' into devel 2025-02-25 14:32:32 +01:00
0b03d14cee Merge pull request 'Add a script to trigger refresh on packages that need one' (#79) from nbelouin/Factory:devel-trigger into devel
Reviewed-on: #79
Reviewed-by: Denislav Prodanov <dprodanov@noreply.src.opensuse.org>
2025-02-25 13:10:39 +01:00
9f2dc045e9 Add a script to trigger refresh on packages that need one
Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
2025-02-25 11:35:43 +01:00
Denislav Prodanov
f90f614746 update eib image to use package version 2025-01-31 14:59:32 +02:00
35f06da226 Update edge-image-builder/_service 2025-01-29 09:52:25 +01:00
8dd6d7d9d7 Update edge-image-builder/edge-image-builder.spec 2025-01-28 13:54:58 +01:00
f9c5a29a9f Update edge-image-builder/_service 2025-01-28 13:54:39 +01:00
1b83b54b58 Update edge-image-builder/_service 2025-01-28 13:47:41 +01:00
c6b64a252f Update edge-image-builder/edge-image-builder.spec 2025-01-28 13:43:23 +01:00
689c80ffcc Update edge-image-builder/_service 2025-01-28 13:39:56 +01:00
d8745fe060 Update edge-image-builder/_service 2025-01-28 13:35:25 +01:00
9e39bdcf7f Update edge-image-builder/edge-image-builder.spec 2025-01-28 13:30:15 +01:00
9e376ffb74 Update edge-image-builder/_service 2025-01-28 13:29:50 +01:00
0fc166ff06 Add _config 2025-01-28 11:37:52 +01:00
10 changed files with 105 additions and 16 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,4 @@
*/.osc
*/__pycache__
.venv/
.venv/
.idea/

View File

@@ -1,3 +1,3 @@
PROJECT = "isv:SUSE:Edge:Factory"
PROJECT = "isv:SUSE:Edge:Factory:Devel"
REPOSITORY = "https://src.opensuse.org/suse-edge/Factory"
BRANCH = "main"
BRANCH = "devel"

65
.obs/trigger_package.py Normal file
View File

@@ -0,0 +1,65 @@
import xml.etree.ElementTree as ET
import subprocess
from sync_packages import get_local_packages
from common import PROJECT
def get_service_repo(package):
with open(f"{package}/_service") as service:
root = ET.parse(service).getroot()
for service in root.findall("service"):
if service.get("mode") in ["manual", "disabled"]:
continue
if service.get("name") not in ["obs_scm", "tar_scm"]:
continue
ref = service.find("param[@name='revision']").text
repo = service.find("param[@name='url']").text
return (repo, ref)
return None
def get_remote_ref(project, package):
files = subprocess.run(["osc", "ls", "-e", project, package], encoding='utf-8' , capture_output=True).stdout.splitlines()
for filename in files:
if filename.startswith("_service") and filename.endswith(".obsinfo"):
obsinfo = subprocess.run(["osc", "cat", project, package, filename], encoding='utf-8' , capture_output=True).stdout.splitlines()
for line in obsinfo:
if line.startswith("commit:"):
return line.split(':')[-1].strip()
def get_upstream_ref(repo, ref):
refs = subprocess.run(["git", "ls-remote", repo, ref, f"{ref}^{{}}"], encoding='utf-8' , capture_output=True).stdout.splitlines()
refpath = ref.split('/')
best = None
for rref in refs:
value = rref.split('\t')
(sha, name) = (value[0].strip(), value[1].strip())
namepath = name.split('/')
if len(namepath) == len(refpath) or len(namepath) - 2 == len(refpath):
if name.endswith(ref) and best is None:
best = sha
if name.endswith("^{}"):
best = sha
return best
def trigger_service(project, package):
subprocess.run(["osc", "service", "remoterun", project, package], encoding="utf-8",check=True)
def main():
packages = get_local_packages()
for package in packages:
try:
(repo, ref) = get_service_repo(package)
print(f"{package} uses {repo} at {ref}")
except: # Package is not using server side scm service
continue
remote_ref = get_remote_ref(PROJECT, package)
upstream_ref = get_upstream_ref(repo, ref)
if upstream_ref != remote_ref:
print(f"\t{package} needs a refresh")
print(f"\tOBS ref is {remote_ref}")
print(f"\tgit ref is {upstream_ref}")
trigger_service(PROJECT, package)
if __name__ == "__main__":
main()

20
_config
View File

@@ -60,7 +60,7 @@ BuildFlags: onlybuild:release-manifest-image
BuildFlags: excludebuild:endpoint-copier-operator-image
BuildFlags: excludebuild:ironic-image
BuildFlags: excludebuild:ironic-ipa-downloader-image
BuildFlags: excludebuild:kiwi-builder-image
BuildFlags: excludebuild:kubectl-image
BuildFlags: excludebuild:kube-rbac-proxy-image
BuildFlags: excludebuild:metallb-controller-image
BuildFlags: excludebuild:metallb-speaker-image
@@ -85,6 +85,8 @@ BuildFlags: onlybuild:release-manifest-image
BuildFlags: onlybuild:ironic-image
BuildFlags: onlybuild:ironic-ipa-downloader-image
BuildFlags: onlybuild:ironic-ipa-ramdisk
BuildFlags: onlybuild:kubectl
BuildFlags: onlybuild:kubectl-image
BuildFlags: onlybuild:kube-rbac-proxy
BuildFlags: onlybuild:kube-rbac-proxy-image
BuildFlags: onlybuild:metallb
@@ -123,6 +125,22 @@ BuildFlags: onlybuild:release-manifest-image
# Publish multi-arch container images only once all archs have been built
PublishFlags: archsync
# Exclude the images selected by the aarch64 section
%ifarch aarch64
BuildFlags: excludebuild:baremetal-operator-image
BuildFlags: excludebuild:edge-image-builder-image
BuildFlags: excludebuild:endpoint-copier-operator-image
BuildFlags: excludebuild:ironic-image
BuildFlags: excludebuild:ironic-ipa-downloader-image
BuildFlags: excludebuild:kubectl-image
BuildFlags: excludebuild:kube-rbac-proxy-image
BuildFlags: excludebuild:metallb-controller-image
BuildFlags: excludebuild:metallb-speaker-image
%endif
%else
BuildFlags: excludebuild:kiwi-builder-image
%endif

2
_meta
View File

@@ -42,8 +42,8 @@
<path project="SUSE:SLFO:Products:SLES:16.0" repository="standard"/>
<path project="SUSE:SLFO:Main:Build" repository="standard"/>
{%- else %}
<path project="{{ project }}" repository="standard"/>
<path project="SUSE:CA" repository="SLE_15_SP6"/>
<path project="{{ project }}" repository="standard"/>
{%- endif %}
<arch>x86_64</arch>
<arch>aarch64</arch>

View File

@@ -1,5 +1,5 @@
#!BuildTag: %%IMG_PREFIX%%edge-image-builder:1.1.0
#!BuildTag: %%IMG_PREFIX%%edge-image-builder:1.1.0-%RELEASE%
#!BuildTag: %%IMG_PREFIX%%edge-image-builder:%PACKAGE_VERSION%
#!BuildTag: %%IMG_PREFIX%%edge-image-builder:%PACKAGE_VERSION%-%RELEASE%
#!BuildVersion: 15.6
ARG SLE_VERSION
FROM registry.suse.com/bci/bci-base:$SLE_VERSION
@@ -15,11 +15,11 @@ RUN zypper --non-interactive install --no-recommends edge-image-builder qemu-x86
LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)"
LABEL org.opencontainers.image.title="SLE edge-image-builder Container Image"
LABEL org.opencontainers.image.description="edge-image-builder based on the SLE Base Container Image."
LABEL org.opencontainers.image.version="1.1.0"
LABEL org.opencontainers.image.version="%PACKAGE_VERSION%"
LABEL org.opencontainers.image.url="https://www.suse.com/products/server/"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.vendor="SUSE LLC"
LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%edge-image-builder:1.1.0-%RELEASE%"
LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%edge-image-builder:%PACKAGE_VERSION%-%RELEASE%"
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%"
LABEL com.suse.eula="SUSE Combined EULA February 2024"

View File

@@ -1,5 +1,10 @@
<services>
<service mode="buildtime" name="kiwi_metainfo_helper"/>
<service name="replace_using_package_version" mode="buildtime">
<param name="file">Dockerfile</param>
<param name="regex">%PACKAGE_VERSION%</param>
<param name="package">edge-image-builder</param>
</service>
<service name="replace_using_env" mode="buildtime">
<param name="file">Dockerfile</param>
<param name="eval">IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %{?img_prefix})</param>

View File

@@ -1,12 +1,12 @@
<services>
<service name="obs_scm">
<param name="url">https://github.com/suse-edge/edge-image-builder.git</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionformat">@PARENT_TAG@_%h.%ad</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="revision">v1.1.0</param>
<param name="versionrewrite-pattern">v(\d+).(\d+).(\d+)</param>
<param name="versionrewrite-replacement">\1.\2.\3</param>
<param name="revision">main</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="versionrewrite-replacement">\1</param>
<param name="changesgenerate">enable</param>
</service>
<service mode="buildtime" name="tar">

View File

@@ -17,14 +17,14 @@
Name: edge-image-builder
Version: 1.1.0
Version: 0
Release: 0
Summary: Edge Image Builder
License: Apache-2.0
URL: https://github.com/suse-edge/edge-image-builder
Source: edge-image-builder-%{version}.tar
Source1: vendor.tar.gz
BuildRequires: golang(API) go1.22
BuildRequires: golang(API) go1.24
BuildRequires: golang-packaging
BuildRequires: gpgme-devel
BuildRequires: device-mapper-devel

View File

@@ -9,7 +9,7 @@ rancherTurtles:
managerArguments: []
imagePullSecrets: []
rancherInstalled: false
kubectlImage: "%%IMG_REPO%%/%%IMG_PREFIX%%/kubectl:1.30.3"
kubectlImage: "%%IMG_REPO%%/%%IMG_PREFIX%%kubectl:1.30.3"
features:
day2operations:
enabled: false