Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to require pinned osbuild commit for the CI runners (HMS-5248) #1126

Merged
merged 5 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up repository for pinned osbuild commit
run: ./test/scripts/setup-osbuild-repo

- name: Run unit tests
run: make BASE_CONTAINER_IMAGE_TAG=${{matrix.fedora_version}} gh-action-test

Expand Down
42 changes: 3 additions & 39 deletions Schutzfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
},
"gitlab-ci-runner": "aws/fedora-41"
},
"centos-8": {
"centos-9": {
"dependencies": {
"osbuild": {
"commit": "fcb93bde01d4a027c67b5747c8f976ceb4fc8d80"
}
}
},
"centos-9": {
"centos-10": {
"dependencies": {
"osbuild": {
"commit": "fcb93bde01d4a027c67b5747c8f976ceb4fc8d80"
Expand All @@ -25,43 +25,7 @@
"osbuild": {
"commit": "fcb93bde01d4a027c67b5747c8f976ceb4fc8d80"
}
},
"repos": [
{
"file": "/etc/yum.repos.d/fedora.repo",
"x86_64": [
{
"title": "fedora",
"name": "fedora",
"baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f40/f40-x86_64-fedora-20240514"
}
],
"aarch64": [
{
"title": "fedora",
"name": "fedora",
"baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f40/f40-aarch64-fedora-20240514"
}
]
},
{
"file": "/etc/yum.repos.d/fedora-updates.repo",
"x86_64": [
{
"title": "updates",
"name": "updates",
"baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f40/f40-x86_64-updates-released-20250101"
}
],
"aarch64": [
{
"title": "updates",
"name": "updates",
"baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f40/f40-aarch64-updates-released-20250101"
}
]
}
]
}
},
"fedora-41": {
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions test/scripts/setup-osbuild-repo
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def main():
distro_version = osrelease["ID"] + "-" + osrelease["VERSION_ID"]
commit_id = testlib.get_osbuild_commit(distro_version)
if not commit_id:
print("No commit ID defined for osbuild")
return
print(f"Error: {distro_version} does not have the osbuild commit ID defined in the Schutzfile")
sys.exit(1)

write_repo(commit_id, distro_version)

Expand Down
6 changes: 4 additions & 2 deletions test/scripts/update-schutzfile-osbuild
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ def update_osbuild_commit_ids(new):
data = json.load(schutzfile)

for distro in data.keys():
if data[distro].get("dependencies", {}).get("osbuild", {}).get("commit", {}):
data[distro]["dependencies"]["osbuild"]["commit"] = new
if distro == "common":
continue

data[distro].setdefault("dependencies", {}).setdefault("osbuild", {})["commit"] = new

with open(testlib.SCHUTZFILE, encoding="utf-8", mode="w") as schutzfile:
json.dump(data, schutzfile, indent=" ")
Expand Down
Loading