Skip to content

Commit

Permalink
Merge pull request #478 from tiiuae/2.3.0-candidate1
Browse files Browse the repository at this point in the history
2.3.0 candidate1 to main -- DRAFT
  • Loading branch information
joenpera authored Sep 19, 2024
2 parents 2c28b4b + 23fd965 commit 6f876b2
Show file tree
Hide file tree
Showing 17 changed files with 332 additions and 257 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,22 @@ jobs:
ROS: 1
ROS_DISTRO: ${{ matrix.ros2_distro }}
PACKAGE_NAME: mesh_com
ARTIFACTORY_CLOUD_TOKEN: ${{ secrets.ARTIFACTORY_CLOUD_TOKEN }}
run: |
set -eux
mkdir bin
pushd mesh_com
./build.sh ../bin/
popd
- uses: jfrog/setup-jfrog-cli@v2
- uses: jfrog/setup-jfrog-cli@v4
env:
JF_ARTIFACTORY_1: ${{ secrets.ARTIFACTORY_CLOUD_TOKEN }}
JF_URL: https://artifactory.ssrcdevops.tii.ae
JF_ACCESS_TOKEN: ${{ secrets.ARTIFACTORY_CLOUD_TOKEN }}

- name: Upload to Artifactory
env:
ARTIFACTORY_REPO: ssrc-deb-public-local
ARTIFACTORY_REPO: debian-public-local
DISTRIBUTION: focal
COMPONENT: fog-sw
ARCHITECTURE: amd64
Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ iname=${PACKAGE_NAME:=mesh_com}

iversion=${PACKAGE_VERSION:=latest}

artifactory_cloud_token=${ARTIFACTORY_CLOUD_TOKEN:?ARTIFACTORY_CLOUD_TOKEN is not set}

docker build \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
Expand Down
1 change: 1 addition & 0 deletions common/scripts/mesh-11s_nats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ EOF
# /usr/local/bin/cli_app set txpwr fixed 23
/usr/local/bin/cli_app set gi long
/usr/local/bin/cli_app set support_ch_width 1
/usr/local/bin/cli_app set mesh_rssi_threshold -105

# Batman parameters
if [ "$routing_algo" == "batman-adv" ]; then
Expand Down
4 changes: 2 additions & 2 deletions modules/mesh_com/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Given dynamically from CI job.
FROM --platform=${BUILDPLATFORM:-linux/amd64} ghcr.io/tiiuae/fog-ros-sdk:v3.2.0-${TARGETARCH:-amd64} AS builder
FROM --platform=${BUILDPLATFORM:-linux/amd64} ghcr.io/tiiuae/fog-ros-sdk:v3.3.0-${TARGETARCH:-amd64} AS builder

# Must be defined another time after "FROM" keyword.
ARG TARGETARCH
Expand All @@ -17,7 +17,7 @@ RUN /packaging/build_colcon_sdk.sh ${TARGETARCH:-amd64}
# ▲ runtime ──┐
# └── build ▼

FROM ghcr.io/tiiuae/fog-ros-baseimage:v3.2.0
FROM ghcr.io/tiiuae/fog-ros-baseimage:v3.3.0

ENTRYPOINT [ "/entrypoint.sh" ]

Expand Down
25 changes: 12 additions & 13 deletions modules/mesh_com/Dockerfile.build_env
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,25 @@ ARG COMMIT_ID
ARG GIT_VER
ARG PACKAGE_NAME
# Install build dependencies
RUN apt-get update -y && apt-get install -y --no-install-recommends \
curl \
python3-bloom \
fakeroot \
dh-make \
dh-python \
python3-pytest \
ros-${ROS_DISTRO}-ament-flake8 \
ros-${ROS_DISTRO}-ament-pep257 \
batctl \
alfred \
RUN apt update \
&& apt install -y --no-install-recommends \
curl \
python3-bloom \
fakeroot \
dh-make \
dh-python \
python3-pytest \
ros-${ROS_DISTRO}-ament-flake8 \
ros-${ROS_DISTRO}-ament-pep257 \
batctl \
alfred \
&& rm -rf /var/lib/apt/lists/*

RUN groupadd -g $GID builder && \
useradd -m -u $UID -g $GID -g builder builder && \
usermod -aG sudo builder && \
echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

RUN echo "deb [trusted=yes] https://ssrc.jfrog.io/artifactory/ssrc-deb-public-local focal fog-sw" >> /etc/apt/sources.list

WORKDIR /$PACKAGE_NAME

RUN chown -R builder:builder /$PACKAGE_NAME
Expand Down
8 changes: 4 additions & 4 deletions modules/sc-mesh-secure-deployment/src/nats/cbma/VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GIT_VERSION=v0.1.7-old_requirements_fixes
GIT_SHA=2b333ce8b4308663fd7901d87add93b731314f56
EPOCH_TIMESTAMP=1717686203
PRECISE_DATE_TIMESTAMP="2024-06-06 - 15:03:23.866091572"
GIT_VERSION=v0.1.9-old_requirements_fixes
GIT_SHA=a89db854bb046a9dbde634fd563a60f4297ce581
EPOCH_TIMESTAMP=1723473564
PRECISE_DATE_TIMESTAMP="2024-08-12 - 14:39:24.485335427"
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ def __init__(self,

self.tx_key: str = ''
self.rx_key: str = ''
self.tx_port: int = 0
self.rx_port: int = 0


def __termination_handler(self) -> None:
Expand All @@ -57,14 +55,12 @@ def start(self, conn: SecureConnection) -> bool:

def update_config(self, conn: SecureConnection) -> bool:
try:
keys, ports = get_macsec_config(conn)
tx_key, rx_key = get_macsec_config(conn)
conn.close()
except Exception as e:
logger.error(f"Exception when obtaining MACsec configuration: {e}")
conn.close()
return False
tx_key, rx_key = keys
tx_port, rx_port = ports

if self.is_upper:
self.tx_key = tx_key.hex()[:self.UPPER_KEY_LENGTH]
Expand All @@ -73,9 +69,6 @@ def update_config(self, conn: SecureConnection) -> bool:
self.tx_key = tx_key.hex()[:self.LOWER_KEY_LENGTH]
self.rx_key = rx_key.hex()[:self.LOWER_KEY_LENGTH]

self.tx_port = tx_port
self.rx_port = rx_port

return True


Expand Down
Loading

0 comments on commit 6f876b2

Please sign in to comment.