fix the nightly release build failure
Signed-off-by: xu yang <xyang@ciq.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
fbc69ad3c8
commit
53cf8b5845
34
.github/actions/generate/action.yml
vendored
34
.github/actions/generate/action.yml
vendored
@@ -2,10 +2,6 @@ name: 'Generate warewulf metadata'
|
|||||||
description: 'Generate warewulf.spec and dist, collect commits info'
|
description: 'Generate warewulf.spec and dist, collect commits info'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
nightly:
|
|
||||||
description: "Whether it is nightly release"
|
|
||||||
required: true
|
|
||||||
default: 'false'
|
|
||||||
token:
|
token:
|
||||||
description: "Github token"
|
description: "Github token"
|
||||||
required: true
|
required: true
|
||||||
@@ -29,14 +25,15 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Extract current branch tag
|
- name: Extract current branch tag
|
||||||
run: |
|
run: |
|
||||||
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
echo "BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
echo "TAG=`./script/get-version.sh`" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Extract last 24 hours commits info
|
- name: Extract last 24 hours commits info
|
||||||
id: commits
|
id: commits
|
||||||
run: |
|
run: |
|
||||||
echo "raw=`git reflog ${{ env.TAG }} --since="24 hours ago"`" >> $GITHUB_OUTPUT
|
echo "raw=`git reflog ${{ env.BRANCH }} --since="24 hours ago"`" >> $GITHUB_OUTPUT
|
||||||
echo "commits=`git log ${{ env.TAG }} --pretty --since="24 hours ago" | jq --raw-input . | jq --slurp . | jq -c .`" >> $GITHUB_OUTPUT
|
echo "commits=`git log ${{ env.BRANCH }} --pretty --since="24 hours ago" | jq --raw-input . | jq --slurp . | jq -c .`" >> $GITHUB_OUTPUT
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Whether should continue
|
- name: Whether should continue
|
||||||
@@ -50,13 +47,13 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Build spec and dist
|
- name: Build spec and dist
|
||||||
if: inputs.nightly == 'false' || inputs.nightly == 'true' && steps.should-continue.outputs.continue == 'true'
|
if: steps.should-continue.outputs.continue == 'true'
|
||||||
run: |
|
run: |
|
||||||
make warewulf.spec dist
|
make warewulf.spec dist
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Set DIST
|
- name: Set DIST
|
||||||
if: inputs.nightly == 'false' || inputs.nightly == 'true' && steps.should-continue.outputs.continue == 'true'
|
if: steps.should-continue.outputs.continue == 'true'
|
||||||
id: dist
|
id: dist
|
||||||
run: |
|
run: |
|
||||||
dist="warewulf-${{ env.TAG }}.tar.gz"
|
dist="warewulf-${{ env.TAG }}.tar.gz"
|
||||||
@@ -76,30 +73,21 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Upload warewulf.spec
|
- name: Upload warewulf.spec
|
||||||
if: inputs.nightly == 'false' || inputs.nightly == 'true' && steps.should-continue.outputs.continue == 'true'
|
if: steps.should-continue.outputs.continue == 'true'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: warewulf.spec
|
name: warewulf.spec
|
||||||
path: warewulf.spec
|
path: warewulf.spec
|
||||||
|
|
||||||
- name: Upload DIST
|
- name: Upload DIST
|
||||||
if: inputs.nightly == 'false' || inputs.nightly == 'true' && steps.should-continue.outputs.continue == 'true'
|
if: steps.should-continue.outputs.continue == 'true'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ env.DIST }}
|
name: ${{ env.DIST }}
|
||||||
path: ${{ env.DIST }}
|
path: ${{ env.DIST }}
|
||||||
|
|
||||||
- name: Normal dist release
|
|
||||||
uses: xresloader/upload-to-github-release@v1
|
|
||||||
if: inputs.nightly == 'false'
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ inputs.token }}
|
|
||||||
with:
|
|
||||||
release_id: ${{ inputs.event-id }}
|
|
||||||
file: ${{ env.DIST }}
|
|
||||||
|
|
||||||
- name: Write nightly release content
|
- name: Write nightly release content
|
||||||
if: inputs.nightly == 'true' && steps.should-continue.outputs.continue == 'true'
|
if: steps.should-continue.outputs.continue == 'true'
|
||||||
run: |
|
run: |
|
||||||
cat << EOF >> nightly.release.note
|
cat << EOF >> nightly.release.note
|
||||||
THIS IS A NIGHTLY RELEASE
|
THIS IS A NIGHTLY RELEASE
|
||||||
@@ -116,7 +104,7 @@ runs:
|
|||||||
|
|
||||||
- name: Nightly dist release
|
- name: Nightly dist release
|
||||||
uses: xresloader/upload-to-github-release@v1
|
uses: xresloader/upload-to-github-release@v1
|
||||||
if: inputs.nightly == 'true' && steps.should-continue.outputs.continue == 'true'
|
if: steps.should-continue.outputs.continue == 'true'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ inputs.token }}
|
GITHUB_TOKEN: ${{ inputs.token }}
|
||||||
with:
|
with:
|
||||||
@@ -129,7 +117,7 @@ runs:
|
|||||||
default_release_name: "warewulf nightly release"
|
default_release_name: "warewulf nightly release"
|
||||||
|
|
||||||
- name: Update nightly release content
|
- name: Update nightly release content
|
||||||
if: inputs.nightly == 'true' && steps.should-continue.outputs.continue == 'true'
|
if: steps.should-continue.outputs.continue == 'true'
|
||||||
uses: tubone24/update_release@v1.3.1
|
uses: tubone24/update_release@v1.3.1
|
||||||
id: release
|
id: release
|
||||||
env:
|
env:
|
||||||
|
|||||||
16
.github/actions/rpm/action.yml
vendored
16
.github/actions/rpm/action.yml
vendored
@@ -52,11 +52,13 @@ runs:
|
|||||||
- name: Set RPM and SRPM
|
- name: Set RPM and SRPM
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(rpm -q --qf "%{VERSION}\n" --specfile warewulf.spec)
|
VERSION=$(rpm -q --qf "%{VERSION}\n" --specfile warewulf.spec)
|
||||||
GENERIC_RELEASE=$(rpm -q --qf "%{RELEASE}\n" --specfile warewulf.spec | cut -d. -f1-2)
|
GENERIC_RELEASE=$(rpm -q --qf "%{RELEASE}\n" --specfile warewulf.spec | cut -d. -f1)
|
||||||
RPM=warewulf-${VERSION}-${GENERIC_RELEASE}.${{ inputs.dist }}.${{ inputs.arch }}.rpm
|
RPM=warewulf-${VERSION}-${GENERIC_RELEASE}.${{ inputs.dist }}.${{ inputs.arch }}.rpm
|
||||||
SRPM=warewulf-${VERSION}-${GENERIC_RELEASE}.${{ inputs.dist }}.src.rpm
|
SRPM=warewulf-${VERSION}-${GENERIC_RELEASE}.${{ inputs.dist }}.src.rpm
|
||||||
|
DRACUT=wareful-dracut-${VERSION}-${GENERIC_RELEASE}.${{ inputs.dist }}.noarch.rpm
|
||||||
echo "RPM=${RPM}" >> $GITHUB_ENV
|
echo "RPM=${RPM}" >> $GITHUB_ENV
|
||||||
echo "SRPM=${SRPM}" >> $GITHUB_ENV
|
echo "SRPM=${SRPM}" >> $GITHUB_ENV
|
||||||
|
echo "DRACUT=${DRACUT}" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Build RPMs and run tests
|
- name: Build RPMs and run tests
|
||||||
@@ -77,10 +79,18 @@ runs:
|
|||||||
name: ${{ env.SRPM }}
|
name: ${{ env.SRPM }}
|
||||||
path: /var/lib/mock/${{ inputs.target }}/result/${{ env.SRPM }}
|
path: /var/lib/mock/${{ inputs.target }}/result/${{ env.SRPM }}
|
||||||
|
|
||||||
- name: Attach RPM and SRPM to release
|
- name: Upload dracut RPM
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ env.DRACUT }}
|
||||||
|
path: /var/lib/mock/${{ inputs.target }}/result/${{ env.DRACUT }}
|
||||||
|
if-no-files-found: 'ignore'
|
||||||
|
|
||||||
|
- name: Attach all files to release
|
||||||
uses: xresloader/upload-to-github-release@v1
|
uses: xresloader/upload-to-github-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ inputs.token }}
|
GITHUB_TOKEN: ${{ inputs.token }}
|
||||||
with:
|
with:
|
||||||
release_id: ${{ inputs.event-id }}
|
release_id: ${{ inputs.event-id }}
|
||||||
file: "/var/lib/mock/${{ inputs.target }}/result/${{ env.RPM }};/var/lib/mock/${{ inputs.target }}/result/${{ env.SRPM }}"
|
file: " warewulf-${{ env.EXPECTED_VERSION }}.tar.gz;/var/lib/mock/${{ inputs.target }}/result/${{ env.RPM }};/var/lib/mock/${{ inputs.target }}/result/${{ env.SRPM }};/var/lib/mock/${{ inputs.target }}/result/${{ env.DRACUT }}"
|
||||||
|
overwrite: true
|
||||||
12
.github/workflows/nightly-release.yml
vendored
12
.github/workflows/nightly-release.yml
vendored
@@ -14,17 +14,16 @@ jobs:
|
|||||||
should-continue: ${{ steps.generate.outputs.should-continue }}
|
should-continue: ${{ steps.generate.outputs.should-continue }}
|
||||||
version: ${{ steps.generate.outputs.version }}
|
version: ${{ steps.generate.outputs.version }}
|
||||||
release-id: ${{ steps.generate.outputs.release-id }}
|
release-id: ${{ steps.generate.outputs.release-id }}
|
||||||
permissions: write-all # might not be used for realy deployment
|
permissions: write-all
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: 'main'
|
fetch-depth: 0
|
||||||
- uses: ./.github/actions/generate
|
- uses: ./.github/actions/generate
|
||||||
name: generate warewulf spec, dist and collect commits info
|
name: generate warewulf spec, dist and collect commits info
|
||||||
id: generate
|
id: generate
|
||||||
with:
|
with:
|
||||||
nightly: 'true'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
event-id: ${{ github.event.release.id }}
|
event-id: ${{ github.event.release.id }}
|
||||||
|
|
||||||
@@ -46,19 +45,16 @@ jobs:
|
|||||||
- target: rocky+epel-9-x86_64
|
- target: rocky+epel-9-x86_64
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
dist: el9
|
dist: el9
|
||||||
- target: centos+epel-7-x86_64
|
|
||||||
arch: x86_64
|
|
||||||
dist: el7
|
|
||||||
- target: opensuse-leap-15.5-x86_64
|
- target: opensuse-leap-15.5-x86_64
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
dist: suse.lp155
|
dist: suse.lp155
|
||||||
permissions: write-all # might not be used for realy deployment
|
permissions: write-all
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: 'main'
|
fetch-depth: 0
|
||||||
- uses: ./.github/actions/rpm
|
- uses: ./.github/actions/rpm
|
||||||
name: build rpms
|
name: build rpms
|
||||||
id: rpm
|
id: rpm
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
`/sys/firmware/devicetree/base/serial-number`
|
`/sys/firmware/devicetree/base/serial-number`
|
||||||
- Replace slice in templates with sprig substr. #1093
|
- Replace slice in templates with sprig substr. #1093
|
||||||
|
|
||||||
|
## v4.5.2, unreleased
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix nightly release build failure issue. #1195
|
||||||
|
|
||||||
## v4.5.1, 2024-04-30
|
## v4.5.1, 2024-04-30
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
Reference in New Issue
Block a user