Skip to content

Commit

Permalink
HPCC-31901 Add Jfrog internal package releases to build-assets
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Gardner <[email protected]>
  • Loading branch information
Michael-Gardner committed May 29, 2024
1 parent 4c82475 commit 076c676
Showing 1 changed file with 59 additions and 13 deletions.
72 changes: 59 additions & 13 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,6 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-22.04
name: k8s
container: true
- os: ubuntu-20.04
- os: centos-8
- os: centos-7
cmake_options_extra: ""
- os: ubuntu-22.04
name: LN k8s
ln: true
container: true
- os: ubuntu-20.04
name: LN
ln: true
Expand Down Expand Up @@ -270,7 +258,7 @@ jobs:
password: ${{ secrets.JFROG_PASSWORD }}

- name: Setup JFrog CLI (internal)
if: ${{ matrix.ln && matrix.container && github.repository_owner == 'hpcc-systems' }}
if: ${{ matrix.ln }}
uses: jfrog/setup-jfrog-cli@v3
env:
JF_URL: https://${{ secrets.JFROG_REGISTRY }}
Expand Down Expand Up @@ -321,6 +309,64 @@ jobs:
tag: ${{ needs.preamble.outputs.internal_tag }}
artifacts: "${{ needs.preamble.outputs.folder_build }}/hpccsystems-*-internal*.deb,${{ needs.preamble.outputs.folder_build }}/hpccsystems-*-internal*.rpm"

- name: Upload Assets to Jfrog (internal)
## will need repo check here so devs can't push to jfrog
if: ${{ matrix.ln && !matrix.container }}
shell: bash
run: |
cd ${{ needs.preamble.outputs.folder_build }}
version=$(echo "${{ needs.preamble.outputs.internal_tag }}" | sed 's/internal_//')
packages=($(ls -1 hpccsystems-* ))
for _package in ${packages[@]}; do
echo "package is ${_package}"
package_name_suffix=$( echo ${_package} | awk -F '-' '{print $2};' )
echo "package_name_suffix is ${package_name_suffix}"
case ${{matrix.os}} in
ubuntu-22.04)
distribution=jammy
isDebian=true
;;
ubuntu-24.04)
distribution=noble
isDebian=true
;;
ubuntu-20.04)
distribution=focal
isDebian=true
;;
centos-7)
distribution=el7
isDebian=false
;;
centos-8)
distribution=el8
isDebian=false
;;
rockylinux-8)
distribution=rocky8
isDebian=false
;;
esac
echo "ditribution is ${distribution}"
echo "isDebian is ${isDebian}"
if [[ "${package_name_suffix}" == "clienttools" ]]; then
full_package_name=LN-clienttools-${version}
else
full_package_name=LN-platform-${version}
fi
if [[ "$isDebian" == true ]]; then
echo "jf rt curl -XPUT \"${{ secrets.JFROG_REGISTRY }}/hpccpl-debian-local/pool/${full_package_name};deb.distribution=${distribution};deb.component=LN;deb.architecture=amd64\" -T ${{ needs.preamble.outputs.folder_build }}/${_package}"
jf rt curl -XPUT "${{ secrets.JFROG_REGISTRY }}/hpccpl-debian-local/pool/${full_package_name};deb.distribution=${distribution};deb.component=LN;deb.architecture=amd64" -T ${{ needs.preamble.outputs.folder_build }}/${_package}
else
echo "debian is false"
fi
done
- name: Locate k8s deb file (internal)
if: ${{ matrix.ln && matrix.container && !matrix.documentation }}
id: ln-container
Expand Down

0 comments on commit 076c676

Please sign in to comment.