Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-31901 Add Jfrog internal package releases to build-assets #18723

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,29 @@ 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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine - but was wondering why using curl over jf cli?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a hard time getting jf rt curl to respect the credentials that we included in the jf setup for distributing docker and then take in parameters for the curl.

I spent a while trying to finesse it but then fell back to just using curl with the token because it worked without any headache.

- name: Locate k8s deb file (internal)
if: ${{ matrix.ln && matrix.container && !matrix.documentation }}
id: ln-container
Expand Down Expand Up @@ -470,6 +493,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

Michael-Gardner marked this conversation as resolved.
Show resolved Hide resolved
- name: Upload error logs
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v4
Expand Down
Loading