Push fog_msgs to Artifactory #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push fog_msgs to Artifactory | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- '**/README.md' | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
tii-deb-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ros2_distro: [humble] | |
steps: | |
- name: Checkout fog_msgs | |
uses: actions/checkout@v2 | |
with: | |
path: fog_msgs | |
- name: Run fog_msgs docker build | |
env: | |
ROS: 1 | |
ROS_DISTRO: ${{ matrix.ros2_distro }} | |
PACKAGE_NAME: fog_msgs | |
run: | | |
set -eux | |
mkdir bin | |
pushd fog_msgs | |
./build_deb.sh ../bin/ | |
popd | |
- name: Upload build | |
uses: actions/upload-artifact@v2 | |
with: | |
name: fog_msgs | |
path: bin/build_output/*.deb | |
retention-days: 1 | |
artifactory: | |
runs-on: ubuntu-latest | |
needs: tii-deb-build | |
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') | |
steps: | |
- name: Download builds | |
uses: actions/download-artifact@v2 | |
with: | |
name: fog_msgs | |
path: bin/build_output | |
- uses: jfrog/setup-jfrog-cli@v2 | |
env: | |
JF_ARTIFACTORY_1: ${{ secrets.ARTIFACTORY_TOKEN }} | |
- name: Upload to Artifactory | |
env: | |
ARTIFACTORY_REPO: ssrc-deb-public-local | |
DISTRIBUTION: jammy | |
COMPONENT: fog-sw | |
ARCHITECTURE: amd64 | |
BUILD_NAME: fog_msgs | |
CI: true | |
run: | | |
set -exu | |
jfrog rt ping | |
for pkg in bin/build_output/*.deb | |
do | |
pkg_name=$(basename $pkg) | |
jfrog rt u --deb "$DISTRIBUTION/$COMPONENT/$ARCHITECTURE" \ | |
--target-props COMMIT="$GITHUB_SHA" \ | |
--build-name "$BUILD_NAME" \ | |
--build-number "$GITHUB_SHA" \ | |
"$pkg" \ | |
"$ARTIFACTORY_REPO/$pkg_name" | |
done | |
jfrog rt build-publish "$BUILD_NAME" "$GITHUB_SHA" | |
jfrog rt bpr "$BUILD_NAME" "$GITHUB_SHA" "$ARTIFACTORY_REPO" \ | |
--status dev \ | |
--comment "development build" |