Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
This commit is contained in:
parent
9d97e8a56d
commit
c86d724e92
32
.gitea/workflows/sync_config.yaml
Normal file
32
.gitea/workflows/sync_config.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: Synchronize Project Config
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
- "3.*"
|
||||||
|
paths:
|
||||||
|
- "_config"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync-prjconf:
|
||||||
|
runs-on: tumbleweed
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
mkdir -p ~/.config/osc
|
||||||
|
cat >~/.config/osc <<EOF
|
||||||
|
[general]
|
||||||
|
apiurl = https://api.opensuse.org
|
||||||
|
|
||||||
|
[https://api.opensuse.org]
|
||||||
|
user=${{OBS_USERNAME}}
|
||||||
|
pass=${{OBS_PASSWORD}}
|
||||||
|
EOF
|
||||||
|
# Waiting on PR to get merged for support in upstream action/checkout action
|
||||||
|
- uses: 'https://github.com/yangskyboxlabs/action-checkout@sha256'
|
||||||
|
with:
|
||||||
|
object-format: 'sha256'
|
||||||
|
- run: |
|
||||||
|
PROJECT="$(grep PROJECT .obs/common.py | sed 's/PROJECT = "\(.*\)"/\1/')"
|
||||||
|
if [ "$(osc meta prjconf "${PROJECT}" | sha256sum)" = "$(cat _config | sha256sum)" ] ; then
|
||||||
|
osc meta prjconf -F _config
|
||||||
|
fi
|
111
_config
Normal file
111
_config
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
Prefer: -libqpid-proton10 -python311-urllib3_1
|
||||||
|
|
||||||
|
Macros:
|
||||||
|
%__python3 /usr/bin/python3.11
|
||||||
|
%registry_url %(echo %{vendor} | cut -d '/' -f 3 | sed 's/build/registry/')
|
||||||
|
:Macros
|
||||||
|
|
||||||
|
%if "%{sub %{lower %_project} 1 14}" != "isv:suse:edge:" || "%{sub %_project 15 21}" == "Factory"
|
||||||
|
# Here we are in Factory like project so set chart major version to 999
|
||||||
|
Macros:
|
||||||
|
%chart_major 999
|
||||||
|
:Macros
|
||||||
|
%else
|
||||||
|
# Here we are in version branch, so set the image prefix and chart major accordingly
|
||||||
|
Macros:
|
||||||
|
%project_branch %(echo %{_project} | cut -d ':' -f 4)
|
||||||
|
%img_prefix %{project_branch}/
|
||||||
|
%chart_major %(echo %{project_branch} | awk '{split($1,a,"."); print a[1]*100 + a[2]}')
|
||||||
|
:Macros
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{sub %_project 1 3} == ISV
|
||||||
|
Macros:
|
||||||
|
%img_repo registry.suse.com/edge
|
||||||
|
%chart_repo oci://registry.suse.com/edge
|
||||||
|
%manifest_repo registry.suse.com/edge
|
||||||
|
%support_level l3
|
||||||
|
:Macros
|
||||||
|
%else
|
||||||
|
Macros:
|
||||||
|
%img_repo registry.opensuse.org/isv/suse/edge/containers/images
|
||||||
|
%manifest_repo registry.opensuse.org/isv/suse/edge/containers/images
|
||||||
|
%chart_repo oci://registry.opensuse.org/isv/suse/edge/containers/charts
|
||||||
|
%support_level techpreview
|
||||||
|
:Macros
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%_repository" == "charts" || "%_repository" == "test_manifest_images"
|
||||||
|
Macros:
|
||||||
|
%img_repo %(echo %{registry_url}:%{_project}:images | tr ":" "/" | tr '[:upper:]' '[:lower:]')
|
||||||
|
%manifest_repo %(echo %{registry_url}:%{_project}:test_manifest_images | tr ":" "/" | tr '[:upper:]' '[:lower:]')
|
||||||
|
%chart_repo oci://%(echo %{registry_url}:%{_project}:charts | tr ":" "/" | tr '[:upper:]' '[:lower:]')
|
||||||
|
:Macros
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Missing deps for testsuite
|
||||||
|
BuildFlags: excludebuild:autoconf:el
|
||||||
|
BuildFlags: excludebuild:autoconf:testsuite
|
||||||
|
|
||||||
|
# Only build manifest embedding images here
|
||||||
|
%if "%_repository" == "test_manifest_images"
|
||||||
|
BuildFlags: onlybuild:edge-image-builder-image
|
||||||
|
BuildFlags: onlybuild:release-manifest-image
|
||||||
|
# Exclude the images selected by the following section
|
||||||
|
# as the standard repository is a dependency
|
||||||
|
%ifarch aarch64
|
||||||
|
BuildFlags: excludebuild:endpoint-copier-operator-image
|
||||||
|
BuildFlags: excludebuild:metallb-controller-image
|
||||||
|
BuildFlags: excludebuild:metallb-speaker-image
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%else
|
||||||
|
# Only a subset of stack is arm64 ready
|
||||||
|
%ifarch aarch64
|
||||||
|
BuildFlags: onlybuild:ca-certificates-suse
|
||||||
|
BuildFlags: onlybuild:cosign
|
||||||
|
BuildFlags: onlybuild:edge-image-builder
|
||||||
|
BuildFlags: onlybuild:edge-image-builder-image
|
||||||
|
BuildFlags: onlybuild:endpoint-copier-operator
|
||||||
|
BuildFlags: onlybuild:endpoint-copier-operator-image
|
||||||
|
BuildFlags: onlybuild:hauler
|
||||||
|
BuildFlags: onlybuild:metallb
|
||||||
|
BuildFlags: onlybuild:metallb-controller-image
|
||||||
|
BuildFlags: onlybuild:metallb-speaker-image
|
||||||
|
BuildFlags: onlybuild:nm-configurator
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%_repository" == "images" || "%_repository" == "test_manifest_images"
|
||||||
|
Prefer: container:sles15-image
|
||||||
|
Type: docker
|
||||||
|
Repotype: none
|
||||||
|
Patterntype: none
|
||||||
|
BuildEngine: podman
|
||||||
|
Prefer: sles-release
|
||||||
|
BuildFlags: dockerarg:SLE_VERSION=15.6
|
||||||
|
|
||||||
|
# Publish multi-arch container images only once all archs have been built
|
||||||
|
PublishFlags: archsync
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%_repository" == "charts" || "%_repository" == "phantomcharts" || "%_repository" == "releasecharts"
|
||||||
|
Type: helm
|
||||||
|
Repotype: helm
|
||||||
|
Patterntype: none
|
||||||
|
Required: perl-YAML-LibYAML
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%_repository" == "standard"
|
||||||
|
# for build openstack-ironic-image
|
||||||
|
BuildFlags: allowrootforbuild
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Enable reproducible builds
|
||||||
|
# https://en.opensuse.org/openSUSE:Reproducible_Builds\#With_OBS
|
||||||
|
Macros:
|
||||||
|
%source_date_epoch_from_changelog Y
|
||||||
|
%clamp_mtime_to_source_date_epoch Y
|
||||||
|
%use_source_date_epoch_as_buildtime Y
|
||||||
|
%_buildhost reproducible
|
||||||
|
:Macros
|
Loading…
x
Reference in New Issue
Block a user