Skip to content

Commit

Permalink
changed the create manifest job: now using custom bash script instead of
Browse files Browse the repository at this point in the history
build push action
  • Loading branch information
ValMobBIllich committed Jan 31, 2025
1 parent 7da57b4 commit 95a92c7
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/containerize-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,20 @@ jobs:
echo "IMAGE_NAME=$(echo $IMAGE_NAME | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Create and push manifest
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ needs.setup.outputs.tags }}
platforms: linux/amd64,linux/arm64
inputs: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:amd64-${{ github.sha }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:arm64-${{ github.sha }}
shell: bash
run: |
# Create manifest list and add the images
for tag in ${{ needs.setup.outputs.tags }}; do
docker manifest create $tag \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:amd64-${{ github.sha }} \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:arm64-${{ github.sha }}
# Annotate the manifest with architecture information
docker manifest annotate $tag \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:amd64-${{ github.sha }} --arch amd64
docker manifest annotate $tag \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:arm64-${{ github.sha }} --arch arm64
# Push the manifest
docker manifest push $tag
done
2 changes: 2 additions & 0 deletions example-streamer-implementations/DEFAULT_CONFIG.json5
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
transport: "Zenoh",
},
mqtt_config: {
// Determines the authority_name of the mqtt component
authority: "authority_A",
// The URL of the MQTT broker (the provided mosquitto broker runs on locahost but docker networks might complicate that)
hostname: "localhost",
// The port of the broker (unencrypted MQTT like the provided mosquitto broker typically uses 1883, encrypted uses 8883)
Expand Down
1 change: 1 addition & 0 deletions example-streamer-implementations/src/bin/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ pub struct SomeipConfig {
#[derive(Deserialize, Serialize, Debug, Clone)]
#[serde(deny_unknown_fields)]
pub struct MqttConfig {
pub(crate) authority: String,
pub(crate) hostname: String,
pub(crate) port: u16,
pub(crate) max_buffered_messages: i32,
Expand Down
6 changes: 5 additions & 1 deletion example-streamer-implementations/src/bin/zenoh_mqtt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ async fn main() -> Result<(), UStatus> {
);

// In this implementation, the mqtt entity runs in the cloud and has its own authority.
let mqtt_endpoint = Endpoint::new("cloud_endpoint", "authority_A", mqtt_transport.clone());
let mqtt_endpoint = Endpoint::new(
"cloud_endpoint",
&config.mqtt_config.authority,
mqtt_transport.clone(),
);

// Here we tell the streamer to forward any zenoh messages to the mqtt endpoint
streamer
Expand Down
4 changes: 2 additions & 2 deletions example-streamer-uses/src/bin/zenoh_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn client_uuri() -> UUri {
#[command(version, about, long_about = None)]
struct Args {
/// The endpoint for Zenoh client to connect to
#[arg(short, long, default_value = "tcp/0.0.0.0:7445")]
#[arg(short, long, default_value = "tcp/127.0.0.1:7447")]
endpoint: String,
}

Expand All @@ -67,7 +67,7 @@ async fn main() -> Result<(), UStatus> {
if !args.endpoint.is_empty() {
// Specify the address to listen on using IPv4
let ipv4_endpoint =
EndPoint::from_str(args.endpoint.as_str()).expect("Unable to set endpoint");
EndPoint::from_str("tcp/127.0.0.1:7447").expect("Unable to set endpoint");

// Add the IPv4 endpoint to the Zenoh configuration
zenoh_config
Expand Down

0 comments on commit 95a92c7

Please sign in to comment.