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 31, 2024
1 parent 4c82475 commit bea07bc
Showing 1 changed file with 46 additions and 13 deletions.
59 changes: 46 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,31 @@ 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 (debian internal)
if: ${{ matrix.ln && !matrix.container && contains(matrix.os, 'ubuntu') && github.repository_owner == 'hpcc-systems'}}
shell: bash
run: |
cd ${{ needs.preamble.outputs.folder_build }}
version=$(echo "${{ needs.preamble.outputs.internal_tag }}" | sed 's/internal_//')
packages=($(ls -1 hpccsystems-*.deb ))
for _package in ${packages[@]}; do
distribution=$( echo "${_package}" | sed "s/^.*${version}//" | awk -F '_' '{print $1;}' )
curl -u${{ secrets.JFROG_USERNAME }}:${{ secrets.JFROG_PASSWORD }} -XPUT "https://${{ secrets.JFROG_REGISTRY }}/hpccpl-debian-local/pool/LN/${_package};deb.distribution=${distribution};deb.component=LN;deb.architecture=amd64" -T ${{ needs.preamble.outputs.folder_build }}/${_package}
done
- name: Upload Assets to Jfrog (centos internal)
if: ${{ matrix.ln && !matrix.container && !contains(matrix.os, 'ubuntu') && github.repository_owner == 'hpcc-systems'}}
shell: bash
run: |
cd ${{ needs.preamble.outputs.folder_build }}
packages=($(ls -1 hpccsystems-*.rpm ))
for _package in ${packages[@]}; do
distribution=$( echo "${_package}" | awk -F '.' '{print $4;}' )
curl -u${{ secrets.JFROG_USERNAME }}:${{ secrets.JFROG_PASSWORD }} -XPUT "https://${{ secrets.JFROG_REGISTRY }}/hpccpl-rpm-local/LN/${distribution}/x86_64/${_package}" -T ${{ needs.preamble.outputs.folder_build }}/${_package}
done
- name: Locate k8s deb file (internal)
if: ${{ matrix.ln && matrix.container && !matrix.documentation }}
id: ln-container
Expand Down Expand Up @@ -470,6 +483,26 @@ jobs:
tag: ${{ needs.preamble.outputs.internal_tag }}
artifacts: "./build/hpccsystems-clienttools-internal*.exe,./build/hpccsystems-clienttools-internal*.msi,./build/hpccsystems-clienttools-internal*.dmg,./build/hpccsystems-clienttools-internal*.pkg,./build/hpccsystems-clienttools-internal*.tar.gz"

- name: Upload Assets to Jfrog (windows)
if: ${{ contains(matrix.os, 'windows') && github.repository_owner == 'hpcc-systems' }}
shell: bash
run: |
cd ./build
packages=($(ls -1 hpccsystems-*.exe ))
for _package in ${packages[@]}; do
curl -u${{ secrets.JFROG_USERNAME }}:${{ secrets.JFROG_PASSWORD }} "https://${{ secrets.JFROG_REGISTRY }}/hpccpl-windows-local/LN/windows/x86_64/${_package}" -T ${_package}
done
- name: Upload Assets to Jfrog (macos)
if: ${{ contains(matrix.os, 'macos') && github.repository_owner == 'hpcc-systems' }}
shell: bash
run: |
cd ./build
packages=($(ls -1 hpccsystems-*.pkg ))
for _package in ${packages[@]}; do
curl -u${{ secrets.JFROG_USERNAME }}:${{ secrets.JFROG_PASSWORD }} "https://${{ secrets.JFROG_REGISTRY }}/hpccpl-macos-local/LN/macos/x86_64/${_package}" -T ${_package}
done
- name: Upload error logs
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit bea07bc

Please sign in to comment.