Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #13 from cgwalters/builder
Browse files Browse the repository at this point in the history
builder: New container image
  • Loading branch information
cgwalters authored Nov 4, 2023
2 parents c21a24a + b04342d commit b8a2dde
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 53 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: builder

on:
push:
paths:
- builder/**

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/builder

jobs:
build-image:
runs-on: ubuntu-latest

steps:
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Checkout repository
uses: actions/checkout@v3
- name: Login
run: buildah login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }}
- name: Build
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: latest
containerfiles: ./builder/Containerfile
archs: s390x, arm64, amd64, ppc64le
oci: true
context: builder
- name: Push
run: buildah push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
46 changes: 0 additions & 46 deletions .gitlab-ci.yml

This file was deleted.

10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Sagano

# Goals

This project's toplevel goal is to create base *bootable* container images
from Fedora ELN and CentOS Stream packages.

## Status

This project was migrated from https://gitlab.com/centos/cloud/sagano
This is an in-development project not intended for production use yet.

This project was migrated from [a gitlab repo](https://gitlab.com/centos/cloud/sagano)
and currently container images point to that repository. Reworking
the build system is in progress!

## Trying it out

See [install.md](./install.md).

## Status

This is an in-development project not intended for production use yet.

## Differences from Fedora CoreOS

Fedora CoreOS today is not small; there are multiple reasons for this, but
Expand Down
5 changes: 5 additions & 0 deletions builder/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This image contains the baseline tools to build bootable base images.
FROM quay.io/centos/centos:stream9
COPY coreos-continuous.repo /etc/yum.repos.d
COPY . /src
RUN /src/build.sh && cd / && rm /src -rf
21 changes: 21 additions & 0 deletions builder/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -xeuo pipefail

pkginstall() {
dnf -y install "$@"
}

pkginstall dnf-utils
dnf config-manager --set-enabled crb
# Sadly there's no EPEL for s390x so we just hardcode this for now, it's noarch.
dnf -y install https://kojipkgs.fedoraproject.org//packages/distribution-gpg-keys/1.98/1.el9/noarch/distribution-gpg-keys-1.98-1.el9.noarch.rpm

# rpm-ostree for builds, and need skopeo to do the container backend
pkginstall rpm-ostree skopeo
# For derived container builds
pkginstall buildah
# And a rust toolchain
pkginstall cargo openssl-devel

# Build tools
pkginstall selinux-policy-targeted osbuild crypto-policies-scripts sudo
10 changes: 10 additions & 0 deletions builder/coreos-continuous.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[copr:copr.fedorainfracloud.org:group_CoreOS:continuous]
name=Copr repo for continuous owned by @CoreOS
baseurl=https://download.copr.fedorainfracloud.org/results/@CoreOS/continuous/centos-stream-9-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/@CoreOS/continuous/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1

0 comments on commit b8a2dde

Please sign in to comment.