Skip to content

Commit 1b75baf

Browse files
author
Tom Fay
authored
Merge pull request #1 from microsoft/rhel
build RPMS for RHEL
2 parents 4fe6d6b + 81e2a32 commit 1b75baf

File tree

5 files changed

+35
-15
lines changed

5 files changed

+35
-15
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ on: [push, pull_request]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8-
container:
9-
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
108
steps:
11-
- name: Install dependencies
12-
run: unset HOME; tdnf install -y build-essential git tar rpm-build ca-certificates
139
- uses: actions/checkout@v2
14-
- name: build
15-
run: make rpm
10+
- name: Build RPMs
11+
run: docker build .

.github/workflows/release.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ on: push
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8-
container:
9-
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
10-
permissions:
11-
contents: write
128
steps:
13-
- name: Install dependencies
14-
run: unset HOME; tdnf install -y build-essential git tar rpm-build ca-certificates
159
- uses: actions/checkout@v2
16-
- name: build
17-
run: make rpm
10+
- name: Build RPMs
11+
run: docker build -o out .
1812
- name: Release
1913
uses: softprops/action-gh-release@v1
2014
if: startsWith(github.ref, 'refs/tags/')
2115
with:
2216
files: |
23-
rpmbuild/RPMS/x86_64/*.rpm
17+
out/*.rpm

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,5 @@ cython_debug/
160160
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
161161
#.idea/
162162
rpmbuild/
163+
164+
out/

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 as cm2
2+
RUN tdnf install -y rpm-build make python3-devel
3+
WORKDIR /src
4+
RUN --mount=target=/src,rw make rpm && \
5+
mkdir /out && \
6+
cp -r /src/rpmbuild/RPMS/x86_64/*.rpm /out/
7+
8+
FROM registry.access.redhat.com/ubi9:latest as el9
9+
RUN yum install -y rpm-build make python3-devel
10+
WORKDIR /src
11+
RUN --mount=target=/src,rw make rpm && \
12+
mkdir /out && \
13+
cp -r /src/rpmbuild/RPMS/x86_64/*.rpm /out/
14+
15+
FROM registry.access.redhat.com/ubi8:latest as el8
16+
RUN yum install -y rpm-build make python3-devel
17+
WORKDIR /src
18+
RUN --mount=target=/src,rw make rpm && \
19+
mkdir /out && \
20+
cp -r /src/rpmbuild/RPMS/x86_64/*.rpm /out/
21+
22+
FROM scratch
23+
COPY --from=cm2 /out/* /
24+
COPY --from=el8 /out/* /
25+
COPY --from=el9 /out/* /

dnf-plugin-azure-auth.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ URL: https://github.com/microsoft/dnf-plugin-azure-auth/
1313
Source0: %{name}-%{version}.tar.gz
1414
%global debug_package %{nil}
1515
Requires: python3-dnf
16+
BuildRequires: python3-devel
1617

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

3536
%changelog
3637

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

0 commit comments

Comments
 (0)