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

upload binaries to private jfrog repo #557

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
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
76 changes: 0 additions & 76 deletions .github/workflows/tiiuae-gzebo-data.yaml

This file was deleted.

22 changes: 15 additions & 7 deletions .github/workflows/tiiuae-pixhawk-and-saluki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,17 @@ jobs:
JF_ENV_1: ${{ secrets.ARTIFACTORY_CLOUD_TOKEN }}
- name: Upload px4-firmware build to Artifactory
env:
ARTIFACTORY_GEN_REPO: ssrc-gen-public-local
ARTIFACTORY_GEN_REPO: ssrc-gen-private-local
BUILD_NAME_PX4: px4-firmware
CI: true
run: |
set -exu

pr_or_empty=""
latest_link=""
if [ ${{ github.event_name }} == 'pull_request' ]; then
pr_or_empty="pr/"
latest_link="pr/"
pr_or_empty="pr/${{ github.head_ref || github.ref_name }}/"
fi

newline=$'\n'
Expand All @@ -219,19 +221,21 @@ jobs:
fi

artifactory_path=$ARTIFACTORY_GEN_REPO/builds/px4-firmware/${target_path}/${pr_or_empty}
artifactory_latest_path=$ARTIFACTORY_GEN_REPO/builds/px4-firmware/${target_path}/${latest_link}latest/${pkg_name}.${ext}

jfrog rt u --target-props COMMIT="$GITHUB_SHA" \
--build-name "$BUILD_NAME_PX4" \
--build-number "$GITHUB_SHA" \
"$pkg" \
"${artifactory_path}$file_name"

# link to latest
jfrog rt cp --flat \
"${artifactory_path}$file_name" \
"${artifactory_path}latest/${pkg_name}.${ext}"
"${artifactory_latest_path}"

# append every file to artifactory_links
artifactory_links+="${newline}| ${pkg_name} | ${artifactory_base_url}${artifactory_path}${file_name} |"
# append every file to artifactory_links
artifactory_links+="${newline}| ${pkg_name} | ${artifactory_base_url}${artifactory_path}${file_name} |"
done

jfrog rt build-publish "$BUILD_NAME_PX4" "$GITHUB_SHA"
Expand Down Expand Up @@ -268,8 +272,10 @@ jobs:
set -exu

pr_or_empty=""
latest_link=""
if [ ${{ github.event_name }} == 'pull_request' ]; then
pr_or_empty="pr/"
latest_link="pr/"
pr_or_empty="pr/${{ github.head_ref || github.ref_name }}/"
fi

newline=$'\n'
Expand All @@ -294,16 +300,18 @@ jobs:
fi

artifactory_path=$ARTIFACTORY_GEN_REPO/builds/px4-firmware/${target_path}/${pr_or_empty}
artifactory_latest_path=$ARTIFACTORY_GEN_REPO/builds/px4-firmware/${target_path}/${latest_link}latest/${pkg_name}.${ext}

jfrog rt u --target-props COMMIT="$GITHUB_SHA" \
--build-name "$BUILD_NAME_PX4" \
--build-number "$GITHUB_SHA" \
"$pkg" \
"${artifactory_path}$file_name"

# link to latest
jfrog rt cp --flat \
"${artifactory_path}$file_name" \
"${artifactory_path}latest/${pkg_name}.${ext}"
"${artifactory_latest_path}"

# append every file to artifactory_links
artifactory_links+="${newline}| ${pkg_name} | ${artifactory_base_url}${artifactory_path}${file_name} |"
Expand Down
Loading