mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix RPM builds
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
6b659c3c26
commit
f987c30452
3 changed files with 56 additions and 63 deletions
53
.github/workflows/build-linux-packages.yml
vendored
Normal file
53
.github/workflows/build-linux-packages.yml
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
name: Build Salt Packages
|
||||
|
||||
on:
|
||||
- workflow_call
|
||||
|
||||
jobs:
|
||||
rpm:
|
||||
name: Build RPM
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch:
|
||||
- x86_64
|
||||
- aarch64
|
||||
|
||||
container:
|
||||
image: centos:7
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Download System Dependencies
|
||||
run: |
|
||||
yum -y update
|
||||
yum -y install python3 python3-pip openssl git rpmdevtools rpmlint systemd-units
|
||||
|
||||
- name: Build RPM
|
||||
env:
|
||||
USE_STATIC_REQUIREMENTS: "1"
|
||||
run: |
|
||||
rpmbuild -bb --define="_salt_src $(pwd)" $(pwd)/pkg/rpm/salt.spec
|
||||
|
||||
- name: Upload RPMs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: salt-${{ matrix.arch }}-rpms
|
||||
path: /root/rpmbuild/RPMS/${{ matrix.arch }}/*.rpm
|
||||
retention-days: 7
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
run: |
|
||||
python3 -c "import os; os.makedirs('exitstatus', exist_ok=True)"
|
||||
echo "${{ job.status }}" > exitstatus/${{ github.job }}-linux-${{ matrix.arch }}
|
||||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
||||
if-no-files-found: error
|
60
.github/workflows/build-salt-linux-packages.yml
vendored
60
.github/workflows/build-salt-linux-packages.yml
vendored
|
@ -1,60 +0,0 @@
|
|||
name: Build Salt Packages
|
||||
|
||||
on:
|
||||
- workflow_call
|
||||
|
||||
jobs:
|
||||
rpm:
|
||||
name: Build Salt RPM
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch:
|
||||
- x86_64
|
||||
- aarch64
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: centos/python-38-centos7:latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Download dependencies
|
||||
run: |
|
||||
yum -y update
|
||||
yum -y install git rpmdevtools rpmlint libxcrypt-compat systemd-units
|
||||
|
||||
- name: Build RPM
|
||||
run: |
|
||||
rpmbuild -bb --define="_salt_src ." ./salt/pkg/rpm/salt.spec
|
||||
|
||||
- name: Create archive of RPMs
|
||||
run: |
|
||||
tar -cJf artifacts/salt-${{ matrix.arch }}-rpms.tar.xz /root/rpmbuild/RPMS
|
||||
|
||||
- name: Upload RPMs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: salt-${{ matrix.arch }}-rpms.tar.xz
|
||||
path: artifacts/salt-${{ matrix.arch }}-rpms.tar.xz
|
||||
retention-days: 7
|
||||
|
||||
# - name: Set Exit Status
|
||||
# if: always()
|
||||
# run: |
|
||||
# python3 -c "import os; os.makedirs('exitstatus', exist_ok=True)"
|
||||
# echo "${{ job.status }}" > exitstatus/${{ github.job }}-linux-${{ matrix.arch }}
|
||||
|
||||
# - name: Upload Exit Status
|
||||
# if: always()
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: exitstatus
|
||||
# path: exitstatus
|
||||
# if-no-files-found: error
|
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -545,12 +545,12 @@ jobs:
|
|||
if-no-files-found: error
|
||||
|
||||
|
||||
build-salt-linux-packages:
|
||||
name: Build Salt RPM
|
||||
build-linux-packages:
|
||||
name: Build Linux Packages
|
||||
if: ${{ fromJSON(needs.prepare-ci.outputs.jobs)['self-hosted-runners'] }}
|
||||
needs:
|
||||
- prepare-ci
|
||||
uses: ./.github/workflows/build-salt-linux-packages.yml
|
||||
uses: ./.github/workflows/build-linux-packages.yml
|
||||
|
||||
build-windows-pkgs:
|
||||
name: Build Windows Packages
|
||||
|
|
Loading…
Add table
Reference in a new issue