-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (76 loc) · 2.24 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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"