Skip to content

Commit

Permalink
Merge pull request #124 from thin-edge/feat-use-tedge-command-plugin
Browse files Browse the repository at this point in the history
feat: use new tedge-command-plugin
  • Loading branch information
reubenmiller authored Dec 17, 2024
2 parents 29b9489 + 4e7646d commit 2383ea1
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion images/alpine-s6/alpine-s6.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN curl -sSL thin-edge.io/install.sh | sh -s
RUN curl -sSL thin-edge.io/install-services.sh | sh -s \
# Install additional community plugins
&& apk add --no-cache \
c8y-command-plugin \
tedge-command-plugin \
tedge-apk-plugin

# Set permissions of all files under /etc/tedge
Expand Down
2 changes: 1 addition & 1 deletion images/common/config/tedge-configuration-plugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ group = 'root'
mode = 0o644

[[files]]
path = '/etc/c8y-command-plugin/env'
path = '/etc/tedge-command-plugin/env'
type = 'shell'
user = 'tedge'
group = 'tedge'
Expand Down
2 changes: 2 additions & 0 deletions images/common/utils/set-startup-info
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ set -e
TARGET="$(tedge config get mqtt.topic_root)/$(tedge config get mqtt.device_topic_id)"

# firmware
# TODO: Remove dumb sleep and find out way the firmware is not always published to the cloud
sleep 5
tedge mqtt pub -r --qos 1 "$TARGET/twin/firmware" "$(printf '{"name": "iot-linux", "version": "1.0.0"}')"

# Trigger inventory service on startup
Expand Down
2 changes: 1 addition & 1 deletion images/debian-systemd/debian-systemd.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RUN echo "running" \
&& systemctl enable collectd \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
tedge-inventory-plugin \
c8y-command-plugin \
tedge-command-plugin \
tedge-nodered-plugin-ng \
# Local PKI service for easy child device registration
tedge-pki-smallstep-ca \
Expand Down
2 changes: 1 addition & 1 deletion images/tedge-containermgmt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apk update \
&& wget -q -O - 'https://dl.cloudsmith.io/public/thinedge/community/rsa.B24635C28003430C.key' > /etc/apk/keys/community@thinedge-B24635C28003430C.rsa.pub \
&& wget -q -O - 'https://dl.cloudsmith.io/public/thinedge/community/config.alpine.txt?distro=alpine&codename=v3.8' >> /etc/apk/repositories \
&& apk add --no-cache \
c8y-command-plugin \
tedge-command-plugin \
tedge-apk-plugin \
# Containerization defaults
tedge-container-plugin \
Expand Down
2 changes: 1 addition & 1 deletion images/tedge/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apk update \
&& wget -q -O - 'https://dl.cloudsmith.io/public/thinedge/community/rsa.B24635C28003430C.key' > /etc/apk/keys/community@thinedge-B24635C28003430C.rsa.pub \
&& wget -q -O - 'https://dl.cloudsmith.io/public/thinedge/community/config.alpine.txt?distro=alpine&codename=v3.8' >> /etc/apk/repositories \
&& apk add --no-cache \
c8y-command-plugin \
tedge-command-plugin \
tedge-apk-plugin \
&& apk cache clean

Expand Down
8 changes: 4 additions & 4 deletions tests/alpine-s6/children/operations.robot
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ It Should List the Installed Software
Device Should Have Installed Software tedge tedge-agent

Install software (apk package)
${operation}= Install Software {"name": "jq", "version": "latest", "softwareType": "apk"}
${operation}= Install Software {"name": "htop", "version": "latest", "softwareType": "apk"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Have Installed Software {"name": "jq", "softwareType": "apk"}
Device Should Have Installed Software {"name": "htop", "softwareType": "apk"}

Uninstall software (apk package)
${operation}= Uninstall Software {"name": "jq", "version": "latest", "softwareType": "apk"}
${operation}= Uninstall Software {"name": "htop", "version": "latest", "softwareType": "apk"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Not Have Installed Software {"name": "jq", "softwareType": "apk"}
Device Should Not Have Installed Software {"name": "htop", "softwareType": "apk"}

*** Keywords ***

Expand Down
8 changes: 4 additions & 4 deletions tests/tedge/operations.robot
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ Check Software List
Install software
[Arguments] ${device}
Cumulocity.Set Device ${device}
${operation}= Cumulocity.Install Software {"name": "jq", "version": "latest", "softwareType": "apk"}
${operation}= Cumulocity.Install Software {"name": "htop", "version": "latest", "softwareType": "apk"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Have Installed Software jq
Device Should Have Installed Software htop

Uninstall software
[Arguments] ${device}
Cumulocity.Set Device ${device}
${operation}= Cumulocity.Uninstall Software {"name": "jq", "version": "latest", "softwareType": "apk"}
${operation}= Cumulocity.Uninstall Software {"name": "htop", "version": "latest", "softwareType": "apk"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Not Have Installed Software jq
Device Should Not Have Installed Software htop

Execute shell command
[Arguments] ${device}
Expand Down

4 comments on commit 2383ea1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
11 0 2 11 100 31.56s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
14 0 0 14 100 54.526s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
7 0 0 7 100 50.611999999s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
33 0 2 33 100 3m59.579999999s

Please sign in to comment.