Skip to content

Commit

Permalink
Merge pull request #1 from microsoft/rhel
Browse files Browse the repository at this point in the history
build RPMS for RHEL
  • Loading branch information
tofay authored Oct 7, 2024
2 parents 4fe6d6b + 81e2a32 commit 1b75baf
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 15 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
steps:
- name: Install dependencies
run: unset HOME; tdnf install -y build-essential git tar rpm-build ca-certificates
- uses: actions/checkout@v2
- name: build
run: make rpm
- name: Build RPMs
run: docker build .
12 changes: 3 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,13 @@ on: push
jobs:
build:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
permissions:
contents: write
steps:
- name: Install dependencies
run: unset HOME; tdnf install -y build-essential git tar rpm-build ca-certificates
- uses: actions/checkout@v2
- name: build
run: make rpm
- name: Build RPMs
run: docker build -o out .
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
rpmbuild/RPMS/x86_64/*.rpm
out/*.rpm
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,5 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
rpmbuild/

out/
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 as cm2
RUN tdnf install -y rpm-build make python3-devel
WORKDIR /src
RUN --mount=target=/src,rw make rpm && \
mkdir /out && \
cp -r /src/rpmbuild/RPMS/x86_64/*.rpm /out/

FROM registry.access.redhat.com/ubi9:latest as el9
RUN yum install -y rpm-build make python3-devel
WORKDIR /src
RUN --mount=target=/src,rw make rpm && \
mkdir /out && \
cp -r /src/rpmbuild/RPMS/x86_64/*.rpm /out/

FROM registry.access.redhat.com/ubi8:latest as el8
RUN yum install -y rpm-build make python3-devel
WORKDIR /src
RUN --mount=target=/src,rw make rpm && \
mkdir /out && \
cp -r /src/rpmbuild/RPMS/x86_64/*.rpm /out/

FROM scratch
COPY --from=cm2 /out/* /
COPY --from=el8 /out/* /
COPY --from=el9 /out/* /
3 changes: 3 additions & 0 deletions dnf-plugin-azure-auth.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ URL: https://github.com/microsoft/dnf-plugin-azure-auth/
Source0: %{name}-%{version}.tar.gz
%global debug_package %{nil}
Requires: python3-dnf
BuildRequires: python3-devel

%description
DNF plugin for accessing repos in Azure Blob Storage via Azure AD
Expand All @@ -34,5 +35,7 @@ cp azure_auth.conf %{buildroot}%{_sysconfdir}/dnf/plugins/azure_auth.conf

%changelog

* Fri Oct 04 2024 Tom Fay <[email protected]> - 0.1.0-2
- Build for RHEL 8 and 9
* Thu Sep 19 2024 Tom Fay <[email protected]> - 0.1.0-1
- Original version

0 comments on commit 1b75baf

Please sign in to comment.