Skip to content

Commit

Permalink
ci: add devel postfix to ovs packages
Browse files Browse the repository at this point in the history
Add devel postfix to untagged ovs packages.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Change-Id: I6b6353fb37fcff2b27b23a759243ad3e20ac355f
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/dataplane/dpu-offload/+/136650
Reviewed-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
  • Loading branch information
PavanNikhilesh authored and jerinjacobk committed Oct 4, 2024
1 parent 59880bd commit 9d5f0f3
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/build-cn10k-ovs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,15 @@ jobs:
id: version
run: |
mkdir -p "${PWD}/artifacts"
git tag --points-at HEAD > /tmp/tags
[ -s /tmp/tags ] && PKG_POSTFIX= || PKG_POSTFIX=-devel
[ -s /tmp/tags ] && NIGHTLY=false || NIGHTLY=true
echo "PKG_VERSION_NAME=`cat VERSION`" >> "${PWD}/artifacts/env"
echo "DPDK_PKG_VERSION=`cat DPDK_VERSION | grep RELEASE_VERSION | awk -F'=' '{print $2}'`" >> "${PWD}/artifacts/env"
echo "DPDK_BASE_PKG_VERSION=`cat DPDK_VERSION | grep BASE_VERSION | awk -F'=' '{print $2}' | awk -F'.' '{print $1"."$2}'`" >> "${PWD}/artifacts/env"
source "${PWD}/artifacts/env"
echo "PKG_POSTFIX=${PKG_POSTFIX}" >> "${PWD}/artifacts/env"
echo "NIGHTLY=${NIGHTLY}" >> $GITHUB_OUTPUT
- uses: uraimo/run-on-arch-action@v2.7.2
name: Build OVS and generate package
id: build
Expand Down Expand Up @@ -104,7 +109,7 @@ jobs:
mkdir -p "${PWD}/install/DEBIAN"
cd "${PWD}/install"
echo 'Source: Open vSwitch' > debian/control
echo 'Package: ovs-'$OVS_VERSION'-cn10k' >> DEBIAN/control
echo 'Package: ovs-'$OVS_VERSION'-cn10k'$PKG_POSTFIX >> DEBIAN/control
echo 'Version: '$DPDK_PKG_VERSION >> DEBIAN/control
echo "Depends: `dpkg-shlibdeps -O usr/local/sbin/ovs-vswitchd | awk -F'Depends=' '{print $2}'`, dpdk-"$DPDK_BASE_PKG_VERSION"-cn10k (= "$DPDK_PKG_VERSION")" >> DEBIAN/control
echo "Maintainer: Jerin Jacob (jerinj@marvell.com)" >> DEBIAN/control
Expand All @@ -113,9 +118,9 @@ jobs:
echo "Description: Open vSwitch (OVS) for Marvell Octeon 10" >> DEBIAN/control
rm -rf debian
cd -
mv "${PWD}/install" "${PWD}/ovs-${OVS_VERSION}-cn10k_${DPDK_PKG_VERSION}_arm64"
dpkg --build "${PWD}/ovs-${OVS_VERSION}-cn10k_${DPDK_PKG_VERSION}_arm64"
cp "${PWD}/ovs-${OVS_VERSION}-cn10k_${DPDK_PKG_VERSION}_arm64.deb" /artifacts/.
mv "${PWD}/install" "${PWD}/ovs-${OVS_VERSION}-cn10k${PKG_POSTFIX}_${DPDK_PKG_VERSION}_arm64"
dpkg --build "${PWD}/ovs-${OVS_VERSION}-cn10k${PKG_POSTFIX}_${DPDK_PKG_VERSION}_arm64"
cp "${PWD}/ovs-${OVS_VERSION}-cn10k${PKG_POSTFIX}_${DPDK_PKG_VERSION}_arm64.deb" /artifacts/.
- name: Export version name
id: artifacts
run: |
Expand All @@ -130,21 +135,27 @@ jobs:
echo "DPDK_PKG_VERSION=${DPDK_PKG_VERSION}" >> $GITHUB_OUTPUT
echo $DPDK_BASE_PKG_VERSION
echo "DPDK_BASE_PKG_VERSION=${DPDK_BASE_PKG_VERSION}" >> $GITHUB_OUTPUT
echo $PKG_POSTFIX
echo "PKG_POSTFIX=${PKG_POSTFIX}" >> "$GITHUB_OUTPUT"
[[ "$PKG_POSTFIX" == "-devel" ]] && TAG=devel || TAG=${PKG_VERSION_NAME}
[[ "$PKG_POSTFIX" == "-devel" ]] && IS_DEVEL="true" || IS_DEVEL="false"
echo "TAG=${TAG}" >> "$GITHUB_OUTPUT"
echo "IS_DEVEL=${IS_DEVEL}" >> "$GITHUB_OUTPUT"
- name: Delete existing release
if: ${{ github.event_name == 'push' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release delete ovs-${{ steps.artifacts.outputs.OVS_VERSION }}-cn10k-${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }} --cleanup-tag -y
gh release delete ovs-${{ steps.artifacts.outputs.OVS_VERSION }}-cn10k-${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }} --cleanup-tag -y
continue-on-error: true
- name: Release OVS cn10k package
uses: softprops/action-gh-release@v2.0.4
if: ${{ github.event_name == 'push' }}
with:
draft: false
tag_name: ovs-${{ steps.artifacts.outputs.OVS_VERSION }}-cn10k-${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}
tag_name: ovs-${{ steps.artifacts.outputs.OVS_VERSION }}-cn10k-${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}
files: |
${{ github.workspace }}/artifacts/ovs-${{ steps.artifacts.outputs.OVS_VERSION }}-cn10k_${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}_arm64.deb
${{ github.workspace }}/artifacts/ovs-${{ steps.artifacts.outputs.OVS_VERSION }}-cn10k${{ steps.artifacts.outputs.PKG_POSTFIX }}_${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}_arm64.deb
- name: Dispatch package update event
if: ${{ github.event_name == 'push' }}
run: |
Expand All @@ -155,7 +166,7 @@ jobs:
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/marvellembeddedprocessors/packages/dispatches \
-d '{"event_type":"dispatch-event", "client_payload": {"package" : "ovs",
"tag": "ovs-${{ steps.artifacts.outputs.OVS_VERSION }}-cn10k-${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}",
"tag": "ovs-${{ steps.artifacts.outputs.OVS_VERSION }}-cn10k-${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}",
"dpdk_tag" : "dpdk-cn10k-${{ steps.artifacts.outputs.DPDK_BASE_PKG_VERSION }}_${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.DPDK_PKG_VERSION }}",
"has_dpdk" : "true", "distro" : "${{ steps.artifacts.outputs.DISTRO }}",
"platform" : "cn10k", "devel": "false"}}'
"platform" : "cn10k", "devel": "${{ steps.artifacts.outputs.IS_DEVEL }}"}}'

0 comments on commit 9d5f0f3

Please sign in to comment.