This repository has been archived by the owner on Dec 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: cleanup + taskfile for local building
- Loading branch information
1 parent
ca5bdea
commit e791271
Showing
11 changed files
with
33 additions
and
170 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
version: "3" | ||
|
||
tasks: | ||
build:rpm: | ||
desc: Generate RPM specs, definitions and files from the Studio-CLI containerfile. | ||
generates: | ||
- output/* | ||
cmds: | ||
- mkdir -p {{.OUT}} | ||
- "{{.CONTAINER_MANAGER}} build -v $(realpath {{.OUT}}):/output:Z -f {{.TARGET}} . {{.CLI_ARGS}}" | ||
vars: | ||
CONTAINER_MANAGER: podman | ||
TARGET: rpm.Containerfile | ||
OUT: output | ||
build: |
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
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 |
---|---|---|
@@ -1,29 +1,14 @@ | ||
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-latest}" | ||
|
||
FROM registry.fedoraproject.org/fedora:${FEDORA_MAJOR_VERSION} AS builder | ||
|
||
ENV OUTPUT_ROOT=/app/output | ||
|
||
WORKDIR /app | ||
ARG REGISTRY=registry.fedoraproject.org/fedora | ||
FROM ${REGISTRY}:${FEDORA_MAJOR_VERSION} AS builder | ||
|
||
ADD . /app | ||
|
||
RUN dnf install \ | ||
--disablerepo='*' \ | ||
--enablerepo='fedora,updates' \ | ||
--setopt install_weak_deps=0 \ | ||
--nodocs \ | ||
--assumeyes \ | ||
'dnf-command(builddep)' \ | ||
rpkg \ | ||
rpm-build && \ | ||
mkdir -p $OUTPUT_ROOT/{,output,atomic-studio/rpms} && \ | ||
rpkg spec --outdir "$OUTPUT_ROOT" && \ | ||
dnf builddep -y output/studio-cli.spec && \ | ||
rpkg local --outdir "$OUTPUT_ROOT/output" && \ | ||
mv ${OUTPUT_ROOT}/output/noarch/* "${OUTPUT_ROOT}/atomic-studio/rpms" | ||
|
||
FROM scratch | ||
|
||
ENV OUTPUT_ROOT=/app/output | ||
COPY --from=builder ${OUTPUT_ROOT}/atomic-studio/rpms /rpms | ||
WORKDIR /app | ||
VOLUME ["/output"] | ||
|
||
RUN dnf install --disablerepo='*' --enablerepo='fedora,updates' --setopt install_weak_deps=0 --nodocs --assumeyes 'dnf-command(builddep)' rpkg rpm-build | ||
|
||
RUN mkdir -p /output/{,atomic-studio/rpms} && \ | ||
rpkg spec --outdir /output && \ | ||
dnf builddep -y /output/studio-cli.spec && \ | ||
rpkg local --outdir /output |
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