-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e82ee2
commit 4c87338
Showing
52 changed files
with
2,024 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
name: Check the changelogs | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
changelog-check: | ||
name: changelog check | ||
runs-on: ubuntu-22.04 | ||
container: ghcr.io/dcermak/bci-ci:latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
fetch-depth: 0 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: poetry-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: install python dependencies | ||
run: poetry install | ||
|
||
- name: fix the file permissions of the repository | ||
run: chown -R $(id -un):$(id -gn) . | ||
|
||
- name: fetch all branches | ||
run: git fetch | ||
|
||
- name: check the changelog | ||
run: | | ||
poetry run scratch-build-bot \ | ||
--os-version SLCI -vvvv \ | ||
changelog_check \ | ||
--base-ref origin/${{ github.base_ref }} \ | ||
--head-ref ${{ github.event.pull_request.head.sha }} | ||
env: | ||
OSC_USER: "irrelevant" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
name: Check whether packages are missing on OBS | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'SLCI' | ||
|
||
jobs: | ||
create-issues-for-dan: | ||
name: create an issue for Dan to create the packages in devel:BCI | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/dcermak/bci-ci:latest | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
# we need all branches for the build checks | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
token: ${{ secrets.CHECKOUT_TOKEN }} | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: poetry-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: fix the file permissions of the repository | ||
run: chown -R $(id -un):$(id -gn) . | ||
|
||
- name: install python dependencies | ||
run: poetry install | ||
|
||
- name: find the packages that are missing | ||
run: | | ||
pkgs=$(poetry run scratch-build-bot --os-version SLCI find_missing_packages) | ||
if [[ ${pkgs} = "" ]]; then | ||
echo "missing_pkgs=false" >> $GITHUB_ENV | ||
else | ||
echo "missing_pkgs=true" >> $GITHUB_ENV | ||
echo "pkgs=${pkgs}" >> $GITHUB_ENV | ||
fi | ||
cat test-build.env >> $GITHUB_ENV | ||
env: | ||
OSC_PASSWORD: ${{ secrets.OSC_PASSWORD }} | ||
OSC_USER: "defolos" | ||
|
||
- uses: JasonEtco/create-an-issue@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
update_existing: true | ||
filename: ".github/create-package.md" | ||
if: env.missing_pkgs == 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
staging_build: | ||
steps: | ||
- branch_package: | ||
source_project: home:defolos:BCI:CR:SLCI | ||
source_package: base-image | ||
target_project: home:defolos:BCI:CR:SLCI:Staging | ||
- branch_package: | ||
source_project: home:defolos:BCI:CR:SLCI | ||
source_package: busybox-image | ||
target_project: home:defolos:BCI:CR:SLCI:Staging | ||
- branch_package: | ||
source_project: home:defolos:BCI:CR:SLCI | ||
source_package: init-image | ||
target_project: home:defolos:BCI:CR:SLCI:Staging | ||
- branch_package: | ||
source_project: home:defolos:BCI:CR:SLCI | ||
source_package: mariadb-image | ||
target_project: home:defolos:BCI:CR:SLCI:Staging | ||
- branch_package: | ||
source_project: home:defolos:BCI:CR:SLCI | ||
source_package: mariadb-client-image | ||
target_project: home:defolos:BCI:CR:SLCI:Staging | ||
- branch_package: | ||
source_project: home:defolos:BCI:CR:SLCI | ||
source_package: micro-image | ||
target_project: home:defolos:BCI:CR:SLCI:Staging | ||
- branch_package: | ||
source_project: home:defolos:BCI:CR:SLCI | ||
source_package: minimal-image | ||
target_project: home:defolos:BCI:CR:SLCI:Staging | ||
- branch_package: | ||
source_project: home:defolos:BCI:CR:SLCI | ||
source_package: slci-kernel-module-devel-image | ||
target_project: home:defolos:BCI:CR:SLCI:Staging | ||
- branch_package: | ||
source_project: home:defolos:BCI:CR:SLCI | ||
source_package: tomcat-10-image | ||
target_project: home:defolos:BCI:CR:SLCI:Staging | ||
- branch_package: | ||
source_project: home:defolos:BCI:CR:SLCI | ||
source_package: tomcat-9-image | ||
target_project: home:defolos:BCI:CR:SLCI:Staging | ||
filters: | ||
event: pull_request | ||
|
||
refresh_staging_project: | ||
steps: | ||
- trigger_services: | ||
project: home:defolos:BCI:CR:SLCI | ||
package: _project | ||
filters: | ||
event: push | ||
branches: | ||
only: | ||
- SLCI | ||
|
||
|
||
refresh_devel_BCI: | ||
steps: | ||
- trigger_services: | ||
project: devel:BCI:SLCI | ||
package: base-image | ||
- trigger_services: | ||
project: devel:BCI:SLCI | ||
package: busybox-image | ||
- trigger_services: | ||
project: devel:BCI:SLCI | ||
package: init-image | ||
- trigger_services: | ||
project: devel:BCI:SLCI | ||
package: mariadb-image | ||
- trigger_services: | ||
project: devel:BCI:SLCI | ||
package: mariadb-client-image | ||
- trigger_services: | ||
project: devel:BCI:SLCI | ||
package: micro-image | ||
- trigger_services: | ||
project: devel:BCI:SLCI | ||
package: minimal-image | ||
- trigger_services: | ||
project: devel:BCI:SLCI | ||
package: slci-kernel-module-devel-image | ||
- trigger_services: | ||
project: devel:BCI:SLCI | ||
package: tomcat-10-image | ||
- trigger_services: | ||
project: devel:BCI:SLCI | ||
package: tomcat-9-image | ||
filters: | ||
event: push | ||
branches: | ||
only: | ||
- SLCI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<status code="unknown_project"> | ||
<summary>Project not found: devel:BCI:SLCI</summary> | ||
</status> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# The SLCI Project BCI Base Container image | ||
|
||
Base container based on the SUSE Adaptable Linux Platform (ALP). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<services> | ||
<service mode="buildtime" name="kiwi_label_helper"/> | ||
<service mode="buildtime" name="kiwi_metainfo_helper"/> | ||
</services> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
------------------------------------------------------------------- | ||
Fri Mar 08 09:09:11 UTC 2024 - SUSE Update Bot <bci-internal@suse.de> | ||
|
||
- First version of the Base BCI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- SPDX-License-Identifier: MIT --> | ||
<!-- | ||
Copyright (c) 2024 SUSE LLC | ||
All modifications and additions to the file contributed by third parties | ||
remain the property of their copyright owners, unless otherwise agreed | ||
upon. | ||
The content of THIS FILE IS AUTOGENERATED and should not be manually modified. | ||
It is maintained by the BCI team and generated by | ||
https://github.com/SUSE/BCI-dockerfile-generator | ||
Please submit bugfixes or comments via https://bugs.opensuse.org/ | ||
You can contact the BCI team via https://github.com/SUSE/bci/discussions | ||
--> | ||
<!-- OBS-AddTag: alp/bci/bci-base:%OS_VERSION_ID_SP% alp/bci/bci-base:%OS_VERSION_ID_SP%.%RELEASE% alp/bci/bci-base:latest --> | ||
<!-- OBS-Imagerepo: obsrepositories:/ --> | ||
|
||
<image schemaversion="6.5" name="base-image" xmlns:suse_label_helper="com.suse.label_helper"> | ||
<description type="system"> | ||
<author>SUSE LLC</author> | ||
<contact>https://www.suse.com/</contact> | ||
<specification>SLCI Project BCI Base Container Image</specification> | ||
</description> | ||
<preferences> | ||
<type image="docker"> | ||
<containerconfig | ||
name="alp/bci/bci-base" | ||
tag="%OS_VERSION_ID_SP%" | ||
maintainer="SUSE LLC (https://www.suse.com/)" | ||
additionaltags="%OS_VERSION_ID_SP%.%RELEASE%,latest"> | ||
<labels> | ||
<suse_label_helper:add_prefix prefix="com.suse.slci.bci.base"> | ||
<label name="org.opencontainers.image.title" value="SLCI Project BCI Base"/> | ||
<label name="org.opencontainers.image.description" value="Base container based on the SUSE Adaptable Linux Platform (ALP)."/> | ||
<label name="org.opencontainers.image.version" value="%OS_VERSION_ID_SP%.%RELEASE%"/> | ||
<label name="org.opencontainers.image.created" value="%BUILDTIME%"/> | ||
<label name="org.opencontainers.image.vendor" value="SUSE LLC"/> | ||
<label name="org.opencontainers.image.source" value="%SOURCEURL%"/> | ||
<label name="org.opencontainers.image.url" value="https://susealp.io/"/> | ||
<label name="io.artifacthub.package.readme-url" value="%SOURCEURL%/README.md"/> | ||
<label name="org.opensuse.reference" value="registry.suse.com/alp/bci/bci-base:%OS_VERSION_ID_SP%.%RELEASE%"/> | ||
<label name="org.openbuildservice.disturl" value="%DISTURL%"/> | ||
<label name="com.suse.supportlevel" value="techpreview"/> | ||
<label name="com.suse.eula" value="sle-bci"/> | ||
<label name="com.suse.release-stage" value="beta"/> | ||
<label name="com.suse.lifecycle-url" value="https://www.suse.com/lifecycle"/> | ||
</suse_label_helper:add_prefix> | ||
</labels> | ||
</containerconfig> | ||
</type> | ||
<version>2024</version> | ||
<packagemanager>zypper</packagemanager> | ||
<rpm-check-signatures>false</rpm-check-signatures> | ||
<rpm-excludedocs>true</rpm-excludedocs> | ||
</preferences> | ||
<repository type="rpm-md"> | ||
<source path="obsrepositories:/"/> | ||
</repository> | ||
<packages type="bootstrap"> | ||
<package name="aaa_base"/> | ||
<package name="bash"/> | ||
<package name="ca-certificates"/> | ||
<package name="ca-certificates-mozilla"/> | ||
<package name="coreutils"/> | ||
<package name="cracklib-dict-small"/> | ||
<package name="curl"/> | ||
<package name="filesystem"/> | ||
<package name="glibc-locale-base"/> | ||
<package name="gzip"/> | ||
<package name="jdupes"/> | ||
<package name="netcfg"/> | ||
<package name="ALP-dummy-release"/> | ||
<package name="openssl"/> | ||
<package name="suse-build-key"/> | ||
<package name="tar"/> | ||
<package name="timezone"/> | ||
<package name="zypper"/> | ||
<package name="findutils"/> | ||
</packages> | ||
|
||
</image> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-FileCopyrightText: (c) 2022-2024 SUSE LLC | ||
|
||
set -euo pipefail | ||
|
||
test -f /.kconfig && . /.kconfig | ||
test -f /.profile && . /.profile | ||
|
||
echo "Configure image: [$kiwi_iname]..." | ||
|
||
#============================================ | ||
# Import repositories' keys if rpm is present | ||
#-------------------------------------------- | ||
if command -v rpm > /dev/null; then | ||
suseImportBuildKey | ||
fi | ||
|
||
echo "Configure image: [$kiwi_iname]..." | ||
|
||
# don't have multiple licenses of the same type | ||
jdupes -1 -L -r /usr/share/licenses | ||
|
||
# | ||
zypper --non-interactive rm -u jdupes | ||
|
||
# Not needed, but neither rpm nor libzypp handle rpmlib(X-CheckUnifiedSystemdir) yet | ||
# which would avoid it being installed by filesystem package | ||
rpm -e compat-usrmerge-tools | ||
|
||
# FIXME: stop hardcoding the url, use some external mechanism once available | ||
zypper -n ar --gpgcheck --enable 'https://updates.suse.com/SUSE/Products/ALP-Dolomite/1.0/$basearch/product/' repo-slci | ||
|
||
#====================================== | ||
# Disable recommends | ||
#-------------------------------------- | ||
sed -i 's/.*solver.onlyRequires.*/solver.onlyRequires = true/g' /etc/zypp/zypp.conf | ||
|
||
#====================================== | ||
# Exclude docs installation | ||
#-------------------------------------- | ||
sed -i 's/.*rpm.install.excludedocs.*/rpm.install.excludedocs = yes/g' /etc/zypp/zypp.conf | ||
|
||
#====================================== | ||
# Remove locale files | ||
#-------------------------------------- | ||
shopt -s globstar | ||
rm -f /usr/share/locale/**/*.mo | ||
|
||
# Remove zypp uuid (bsc#1098535) | ||
rm -f /var/lib/zypp/AnonymousUniqueId | ||
|
||
# Remove various log files. While it's possible to just rm -rf /var/log/*, that | ||
# would also remove some package owned directories (not %ghost) and some files | ||
# are actually wanted, like lastlog in the !docker case. | ||
# For those wondering about YaST2 here: Kiwi writes /etc/hosts, so the version | ||
# from the netcfg package ends up as /etc/hosts.rpmnew, which zypper writes a | ||
# letter about to /var/log/YaST2/config_diff_2022_03_06.log. Kiwi fixes this, | ||
# but the log file remains. | ||
rm -rf /var/log/{zypper.log,zypp/history,YaST2} | ||
|
||
# Remove the entire zypper cache content (not the dir itself, owned by libzypp) | ||
rm -rf /var/cache/zypp/* | ||
|
||
# Assign a fixed architecture in zypp.conf, to use the container's arch even if | ||
# the host arch differs (e.g. docker with --platform doesn't affect uname) | ||
arch=$(rpm -q --qf %{arch} glibc) | ||
if [ "$arch" = "i586" ] || [ "$arch" = "i686" ]; then | ||
sed -i "s/^# arch =.*\$/arch = i686/" /etc/zypp/zypp.conf | ||
# Verify that it's applied | ||
grep -q '^arch =' /etc/zypp/zypp.conf | ||
fi | ||
|
||
|
||
#======================================= | ||
# Clean up after zypper if it is present | ||
#--------------------------------------- | ||
if command -v zypper > /dev/null; then | ||
zypper -n clean | ||
fi | ||
|
||
rm -rf /var/log/zypp | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# The SLCI Project BCI Adaptable Linux Platform BusyBox Container image | ||
|
||
Adaptable Linux Platform BusyBox container based on the SUSE Adaptable Linux Platform (ALP). |
Oops, something went wrong.