-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Packaging] Build RPM for RHEL 9 and CentOS Stream 9 #23556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cf3a19b
83fe59b
85f8919
c8da6b9
e03cc49
f7f317b
f16eaa1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -637,17 +637,25 @@ jobs: | |
| strategy: | ||
| matrix: | ||
| Red Hat Universal Base Image 8: | ||
| image: ubi8 | ||
| tag: 8.4 | ||
| dockerfile: ubi | ||
| image: registry.access.redhat.com/ubi8/ubi:8.4 | ||
| artifact: rpm-ubi8 | ||
| python_package: python39 | ||
| Red Hat Universal Base Image 9: | ||
| dockerfile: ubi | ||
| image: registry.access.redhat.com/ubi9/ubi:9.0.0 | ||
| artifact: rpm-ubi9 | ||
| python_package: python3.9 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| Fedora35: | ||
| image: fedora | ||
| tag: 35 | ||
| dockerfile: fedora | ||
| image: fedora:35 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this change! Much clearer and less cumbersome! |
||
| artifact: rpm-fedora35 | ||
| python_package: python3 | ||
| Fedora36: | ||
| image: fedora | ||
| tag: 36 | ||
| dockerfile: fedora | ||
| image: fedora:36 | ||
| artifact: rpm-fedora36 | ||
| python_package: python3 | ||
| steps: | ||
| - task: Bash@3 | ||
| displayName: 'Build Rpm Package' | ||
|
|
@@ -684,6 +692,13 @@ jobs: | |
| python_package: python39 | ||
| python_cmd: python3.9 | ||
| pip_cmd: pip3.9 | ||
| Red Hat Universal Base Image 9: | ||
| artifact: rpm-ubi9 | ||
| distro: el9 | ||
| image: registry.access.redhat.com/ubi9/ubi:9.0.0 | ||
| python_package: python3.9 | ||
| python_cmd: python3.9 | ||
| pip_cmd: pip3.9 | ||
| Fedora35: | ||
| artifact: rpm-fedora35 | ||
| distro: fc35 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Red Hat Universal Base Image 8: https://catalog.redhat.com/software/containers/ubi8/ubi/5c359854d70cc534b3a3784e | ||
| # Red Hat Universal Base Image 9: https://catalog.redhat.com/software/containers/ubi9/ubi/615bcf606feffc5384e8452e | ||
|
|
||
| ARG image=registry.access.redhat.com/ubi8/ubi:8.4 | ||
|
|
||
| FROM ${image} AS build-env | ||
| ARG cli_version=dev | ||
| ARG python_package=python39 | ||
|
|
||
| RUN yum update -y | ||
| RUN yum install -y wget rpm-build gcc libffi-devel ${python_package}-devel openssl-devel make bash diffutils patch dos2unix perl | ||
|
|
||
| WORKDIR /azure-cli | ||
|
|
||
| COPY . . | ||
|
|
||
| # RHEL 8's 'python3' is Python 3.6. RHEL 9's 'python3' is Python 3.9. | ||
| # We have to explicitly specify 'python39' to install Python 3.9. | ||
| RUN dos2unix ./scripts/release/rpm/azure-cli.spec && \ | ||
| REPO_PATH=$(pwd) CLI_VERSION=$cli_version PYTHON_PACKAGE=$python_package PYTHON_CMD=python3.9 \ | ||
| rpmbuild -v -bb --clean scripts/release/rpm/azure-cli.spec && \ | ||
| cp /root/rpmbuild/RPMS/x86_64/azure-cli-${cli_version}-1.*.x86_64.rpm /azure-cli-dev.rpm | ||
|
|
||
| FROM ${image} AS execution-env | ||
|
|
||
| RUN yum update -y | ||
| RUN yum install -y python39 | ||
|
|
||
| COPY --from=build-env /azure-cli-dev.rpm ./ | ||
| RUN rpm -i ./azure-cli-dev.rpm && \ | ||
| az --version |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we unpin the last version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9.0 returns 404.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed I got failure:
Too much inconsistency! 😣