mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-09 20:45:47 +01:00
GHA: Clean creating obs-server container image up
This commit is contained in:
parent
a388355f04
commit
b554a2b6f0
@ -20,13 +20,15 @@ RUN zypper -n install \
|
||||
vim \
|
||||
&& rm -rf /var/cache/zypp/*
|
||||
|
||||
# increase the number if we need to run the following setup steps again (for debugging purposes)
|
||||
ENV BUILD_NUMBER 1
|
||||
|
||||
COPY container-files/ /
|
||||
RUN /bin/bash /opt/obs/container-setup.sh
|
||||
RUN /bin/bash /opt/obs/container-setup-initial-data.sh
|
||||
RUN /bin/bash /opt/obs/container-setup-prebuilt-rpms.sh
|
||||
|
||||
RUN /bin/bash /opt/setup/setup.sh \
|
||||
&& /bin/bash /opt/setup/initial-data.sh \
|
||||
&& /bin/bash /opt/setup/prebuilt-rpms.sh \
|
||||
&& rm -rf /var/log/apache2/* \
|
||||
&& rm -rf /srv/obs/log/* \
|
||||
&& rm -rf /srv/obs/service/log/* \
|
||||
&& rm -rf /srv/www/obs/api/log/*
|
||||
|
||||
# /sbin/init doesn't exist on Leap 15.5
|
||||
ENTRYPOINT ["/usr/lib/systemd/systemd"]
|
||||
|
@ -4,7 +4,6 @@ TOPDIR=$(dirname $(readlink -f $0))
|
||||
|
||||
podman build "$@" \
|
||||
--tag obs-server \
|
||||
--volume="$TOPDIR":/opt/obs \
|
||||
$TOPDIR \
|
||||
2>&1 | tee container-build.log
|
||||
|
||||
|
@ -0,0 +1,4 @@
|
||||
<multibuild>
|
||||
<flavor>flavor1</flavor>
|
||||
<flavor>flavor2</flavor>
|
||||
</multibuild>
|
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 1 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 1
|
@ -0,0 +1,100 @@
|
||||
%if %undefined flavor
|
||||
%define flavor @BUILD_FLAVOR@%{nil}
|
||||
%endif
|
||||
|
||||
# create own debug packages, because the auto-generated would get removed due to being empty
|
||||
%undefine _debuginfo_subpackages
|
||||
|
||||
|
||||
Name: multibuild-pkg
|
||||
Version: 1
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%build
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
|
||||
|
||||
# no flavor
|
||||
%if "%{flavor}" == "%{nil}"
|
||||
%files
|
||||
|
||||
|
||||
%package debuginfo
|
||||
Summary: Test debuginfo package
|
||||
|
||||
%description debuginfo
|
||||
desc
|
||||
|
||||
%files debuginfo
|
||||
%ghost /usr/lib/debug/multibuild-pkg.debug
|
||||
|
||||
|
||||
%package debugsource
|
||||
Summary: Test debugsource package
|
||||
|
||||
%description debugsource
|
||||
desc
|
||||
|
||||
%files debugsource
|
||||
%ghost %{_prefix}/src/debug/%{name}-%{version}-%{release}.%{arch}/main.c
|
||||
%endif
|
||||
|
||||
|
||||
# flavor1
|
||||
%if "%{flavor}" == "flavor1"
|
||||
%package -n %{name}-%{flavor}
|
||||
Summary: Multibuild test package, flavor1
|
||||
|
||||
%description -n %{name}-%{flavor}
|
||||
desc
|
||||
|
||||
%files -n %{name}-%{flavor}
|
||||
|
||||
%package -n %{name}-%{flavor}-debuginfo
|
||||
Summary: Test debuginfo package
|
||||
|
||||
%description -n %{name}-%{flavor}-debuginfo
|
||||
desc
|
||||
|
||||
%files -n %{name}-%{flavor}-debuginfo
|
||||
%ghost %{_prefix}/lib/debug/multibuild-pkg.debug
|
||||
%endif
|
||||
|
||||
|
||||
# flavor2
|
||||
%if "%{flavor}" == "flavor2"
|
||||
%package -n %{name}-%{flavor}
|
||||
Summary: Multibuild test package, flavor2
|
||||
|
||||
%description -n %{name}-%{flavor}
|
||||
desc
|
||||
|
||||
%files -n %{name}-%{flavor}
|
||||
|
||||
%package -n %{name}-%{flavor}-debuginfo
|
||||
Summary: Test debuginfo package
|
||||
|
||||
%description -n %{name}-%{flavor}-debuginfo
|
||||
desc
|
||||
|
||||
%files -n %{name}-%{flavor}-debuginfo
|
||||
%ghost %{_prefix}/lib/debug/multibuild-pkg.debug
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 3 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 1
|
@ -0,0 +1,25 @@
|
||||
Name: test-pkgA
|
||||
Version: 1
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
%files
|
||||
|
||||
|
||||
%changelog
|
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 4 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 2
|
@ -0,0 +1,25 @@
|
||||
Name: test-pkgA
|
||||
Version: 2
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
%files
|
||||
|
||||
|
||||
%changelog
|
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 5 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 3
|
@ -0,0 +1,25 @@
|
||||
Name: test-pkgA
|
||||
Version: 3
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
%files
|
||||
|
||||
|
||||
%changelog
|
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 1 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 1
|
@ -0,0 +1,25 @@
|
||||
Name: test-pkgB
|
||||
Version: 1
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
%files
|
||||
|
||||
|
||||
%changelog
|
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 2 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 2
|
@ -0,0 +1,25 @@
|
||||
Name: test-pkgB
|
||||
Version: 2
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
%files
|
||||
|
||||
|
||||
%changelog
|
@ -3,7 +3,7 @@ set -e
|
||||
|
||||
|
||||
TOPDIR=$(dirname $(readlink -f "$0"))
|
||||
source "$TOPDIR/container-setup-common.sh"
|
||||
source "$TOPDIR/common.sh"
|
||||
|
||||
|
||||
start_mysql
|
@ -3,7 +3,7 @@ set -e
|
||||
|
||||
|
||||
TOPDIR=$(dirname $(readlink -f "$0"))
|
||||
source "$TOPDIR/container-setup-common.sh"
|
||||
source "$TOPDIR/common.sh"
|
||||
|
||||
|
||||
start_obs_srcserver
|
@ -3,7 +3,7 @@ set -e
|
||||
|
||||
|
||||
TOPDIR=$(dirname $(readlink -f "$0"))
|
||||
source "$TOPDIR/container-setup-common.sh"
|
||||
source "$TOPDIR/common.sh"
|
||||
|
||||
|
||||
# tweak configuration
|
||||
@ -103,7 +103,9 @@ RAILS_ENV=production SAFETY_ASSURED=1 bin/rails db:setup writeconfiguration
|
||||
|
||||
|
||||
# update configuration and write it to disk
|
||||
echo "update configurations set admin_email='admin@example.com';" | su -s /bin/sh - mysql -c "mysql api_production"
|
||||
echo "update configurations set download_url='http://localhost:1082';" | su -s /bin/sh - mysql -c "mysql api_production"
|
||||
echo "update configurations set obs_url='https://localhost:1443';" | su -s /bin/sh - mysql -c "mysql api_production"
|
||||
cd /srv/www/obs/api; RAILS_ENV=production SAFETY_ASSURED=1 bin/rails writeconfiguration
|
||||
|
||||
|
@ -10,7 +10,7 @@ podman run \
|
||||
--detach \
|
||||
--interactive \
|
||||
--tty \
|
||||
--volume="$TOPDIR":/opt/obs \
|
||||
--volume="$TOPDIR":/opt/workdir \
|
||||
--cap-add SYS_PTRACE \
|
||||
-p 1443:443 \
|
||||
-p 1082:82 \
|
||||
|
@ -1,4 +0,0 @@
|
||||
<multibuild>
|
||||
<flavor>flavor1</flavor>
|
||||
<flavor>flavor2</flavor>
|
||||
</multibuild>
|
1
behave/fixtures/pac/multibuild-pkg-1._multibuild
Symbolic link
1
behave/fixtures/pac/multibuild-pkg-1._multibuild
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/multibuild-pkg-1._multibuild
|
@ -1,4 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 1 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 1
|
1
behave/fixtures/pac/multibuild-pkg-1.changes
Symbolic link
1
behave/fixtures/pac/multibuild-pkg-1.changes
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/multibuild-pkg-1.changes
|
@ -1,100 +0,0 @@
|
||||
%if %undefined flavor
|
||||
%define flavor @BUILD_FLAVOR@%{nil}
|
||||
%endif
|
||||
|
||||
# create own debug packages, because the auto-generated would get removed due to being empty
|
||||
%undefine _debuginfo_subpackages
|
||||
|
||||
|
||||
Name: multibuild-pkg
|
||||
Version: 1
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%build
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
|
||||
|
||||
# no flavor
|
||||
%if "%{flavor}" == "%{nil}"
|
||||
%files
|
||||
|
||||
|
||||
%package debuginfo
|
||||
Summary: Test debuginfo package
|
||||
|
||||
%description debuginfo
|
||||
desc
|
||||
|
||||
%files debuginfo
|
||||
%ghost /usr/lib/debug/multibuild-pkg.debug
|
||||
|
||||
|
||||
%package debugsource
|
||||
Summary: Test debugsource package
|
||||
|
||||
%description debugsource
|
||||
desc
|
||||
|
||||
%files debugsource
|
||||
%ghost %{_prefix}/src/debug/%{name}-%{version}-%{release}.%{arch}/main.c
|
||||
%endif
|
||||
|
||||
|
||||
# flavor1
|
||||
%if "%{flavor}" == "flavor1"
|
||||
%package -n %{name}-%{flavor}
|
||||
Summary: Multibuild test package, flavor1
|
||||
|
||||
%description -n %{name}-%{flavor}
|
||||
desc
|
||||
|
||||
%files -n %{name}-%{flavor}
|
||||
|
||||
%package -n %{name}-%{flavor}-debuginfo
|
||||
Summary: Test debuginfo package
|
||||
|
||||
%description -n %{name}-%{flavor}-debuginfo
|
||||
desc
|
||||
|
||||
%files -n %{name}-%{flavor}-debuginfo
|
||||
%ghost %{_prefix}/lib/debug/multibuild-pkg.debug
|
||||
%endif
|
||||
|
||||
|
||||
# flavor2
|
||||
%if "%{flavor}" == "flavor2"
|
||||
%package -n %{name}-%{flavor}
|
||||
Summary: Multibuild test package, flavor2
|
||||
|
||||
%description -n %{name}-%{flavor}
|
||||
desc
|
||||
|
||||
%files -n %{name}-%{flavor}
|
||||
|
||||
%package -n %{name}-%{flavor}-debuginfo
|
||||
Summary: Test debuginfo package
|
||||
|
||||
%description -n %{name}-%{flavor}-debuginfo
|
||||
desc
|
||||
|
||||
%files -n %{name}-%{flavor}-debuginfo
|
||||
%ghost %{_prefix}/lib/debug/multibuild-pkg.debug
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
1
behave/fixtures/pac/multibuild-pkg-1.spec
Symbolic link
1
behave/fixtures/pac/multibuild-pkg-1.spec
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/multibuild-pkg-1.spec
|
@ -1,4 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 3 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 1
|
1
behave/fixtures/pac/test-pkgA-1.changes
Symbolic link
1
behave/fixtures/pac/test-pkgA-1.changes
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/test-pkgA-1.changes
|
@ -1,25 +0,0 @@
|
||||
Name: test-pkgA
|
||||
Version: 1
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
%files
|
||||
|
||||
|
||||
%changelog
|
1
behave/fixtures/pac/test-pkgA-1.spec
Symbolic link
1
behave/fixtures/pac/test-pkgA-1.spec
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/test-pkgA-1.spec
|
@ -1,4 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 4 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 2
|
1
behave/fixtures/pac/test-pkgA-2.changes
Symbolic link
1
behave/fixtures/pac/test-pkgA-2.changes
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/test-pkgA-2.changes
|
@ -1,25 +0,0 @@
|
||||
Name: test-pkgA
|
||||
Version: 2
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
%files
|
||||
|
||||
|
||||
%changelog
|
1
behave/fixtures/pac/test-pkgA-2.spec
Symbolic link
1
behave/fixtures/pac/test-pkgA-2.spec
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/test-pkgA-2.spec
|
@ -1,4 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 5 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 3
|
1
behave/fixtures/pac/test-pkgA-3.changes
Symbolic link
1
behave/fixtures/pac/test-pkgA-3.changes
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/test-pkgA-3.changes
|
@ -1,25 +0,0 @@
|
||||
Name: test-pkgA
|
||||
Version: 3
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
%files
|
||||
|
||||
|
||||
%changelog
|
1
behave/fixtures/pac/test-pkgA-3.spec
Symbolic link
1
behave/fixtures/pac/test-pkgA-3.spec
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/test-pkgA-3.spec
|
@ -1,4 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 1 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 1
|
1
behave/fixtures/pac/test-pkgB-1.changes
Symbolic link
1
behave/fixtures/pac/test-pkgB-1.changes
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/test-pkgB-1.changes
|
@ -1,25 +0,0 @@
|
||||
Name: test-pkgB
|
||||
Version: 1
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
%files
|
||||
|
||||
|
||||
%changelog
|
1
behave/fixtures/pac/test-pkgB-1.spec
Symbolic link
1
behave/fixtures/pac/test-pkgB-1.spec
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/test-pkgB-1.spec
|
@ -1,4 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 2 11:22:33 UTC 2022 - Geeko Packager <email@example.com>
|
||||
|
||||
- Release upstream version 2
|
1
behave/fixtures/pac/test-pkgB-2.changes
Symbolic link
1
behave/fixtures/pac/test-pkgB-2.changes
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/test-pkgB-2.changes
|
@ -1,25 +0,0 @@
|
||||
Name: test-pkgB
|
||||
Version: 2
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Summary: Test package
|
||||
URL: https://example.com/test-package/
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
desc
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
|
||||
%install
|
||||
|
||||
|
||||
%files
|
||||
|
||||
|
||||
%changelog
|
1
behave/fixtures/pac/test-pkgB-2.spec
Symbolic link
1
behave/fixtures/pac/test-pkgB-2.spec
Symbolic link
@ -0,0 +1 @@
|
||||
../../container-files/opt/setup/fixtures/pac/test-pkgB-2.spec
|
Loading…
x
Reference in New Issue
Block a user