2024-03-06 10:28:16 +01:00
stages :
- build
fedora-build-job :
stage : build
tags :
2024-03-07 03:20:54 +01:00
- shell-exec
2024-03-06 10:28:16 +01:00
variables :
FQ_IMAGE_NAME : "$CI_REGISTRY_IMAGE/fedora:latest"
before_script :
2024-03-07 03:20:54 +01:00
- buildah rm --all
- buildah prune -af
2024-03-06 10:28:16 +01:00
- buildah login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
script :
- container=$(buildah from registry.fedoraproject.org/fedora:latest)
- buildah run $container -- sh -c 'printf "fastestmirror=True\ndeltarpm=True\n" | tee -a /etc/dnf/dnf.conf'
- buildah run $container -- dnf update -y
- buildah run $container -- dnf install -y '@container-management' '@development-tools' '@c-development' container-selinux ostree rpm-ostree rsync
- buildah run $container -- dnf clean all
- buildah commit --squash --rm $container "$FQ_IMAGE_NAME"
2024-03-06 10:38:59 +01:00
- buildah push "$FQ_IMAGE_NAME"
2024-03-06 10:28:16 +01:00
fedora-distrobox-build-job :
stage : build
tags :
2024-03-07 03:20:54 +01:00
- shell-exec
2024-03-06 10:28:16 +01:00
variables :
2024-03-07 04:22:09 +01:00
NU_RELEASE : "0.91.0"
2024-03-06 10:38:59 +01:00
FQ_IMAGE_NAME : "$CI_REGISTRY_IMAGE/fedora-distrobox:39"
2024-03-06 10:28:16 +01:00
before_script :
2024-03-07 03:20:54 +01:00
- buildah rm --all
- buildah prune -af
2024-03-06 10:28:16 +01:00
- buildah login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
script :
- container=$(buildah from registry.fedoraproject.org/fedora-toolbox:39)
- buildah run $container -- sh -c 'printf "fastestmirror=True\ndeltarpm=True\n" | tee -a /etc/dnf/dnf.conf'
- buildah run $container -- dnf update -y
- buildah run $container -- dnf copr enable -y varlad/zellij
- buildah run $container -- dnf copr enable -y atim/starship
- buildah run $container -- sh -c 'printf "[charm]\nname=Charm\nbaseurl=https://repo.charm.sh/yum/\nenabled=1\ngpgcheck=1\ngpgkey=https://repo.charm.sh/yum/gpg.key\n" | tee /etc/yum.repos.d/charm.repo'
2024-03-07 04:22:09 +01:00
- buildah run $container -- dnf install -y '@c-development' '@development-tools' ShellCheck autossh bat btop charm cmake diff-so-fancy emacs fd-find fzf git git-core glow golang gum htop httpie hugo hyperfine jc jq just lsd lsof neofetch nodejs npm openssl-devel pass perl-Image-ExifTool pipx procs pv python3-devel python3-pip ranger ripgrep rsync shfmt starship tealdeer trash-cli vim-default-editor w3m wget xclip xsel zellij zsh --allowerasing
2024-03-06 10:28:16 +01:00
- buildah run $container -- dnf clean all
2024-03-07 04:22:09 +01:00
- buildah run $container -- wget "https://github.com/nushell/nushell/releases/download/${NU_RELEASE}/nu-${NU_RELEASE}-x86_64-linux-gnu-full.tar.gz" -O /tmp/nu.tar.gz
- buildah run $container -- tar xvf /tmp/nu.tar.gz -C /tmp
2024-03-07 04:29:20 +01:00
- buildah run $container -- find "/tmp/nu-${NU_RELEASE}-x86_64-linux-gnu-full" -type f -not -name "LICENSE" -not -name "README.txt" -exec cp -v {} /usr/local/bin/ \;
2024-03-07 04:22:09 +01:00
- buildah run $container -- sh -c 'echo "/usr/local/bin/nu" | tee -a /etc/shells'
2024-03-06 10:28:16 +01:00
- buildah commit --squash --rm $container "$FQ_IMAGE_NAME"
2024-03-06 10:38:59 +01:00
- buildah push "$FQ_IMAGE_NAME"