Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/lint-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:

jobs:
lint-commit:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/quality-gates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

jobs:
lint-yaml:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- uses: ibiqlik/action-yamllint@v2
Expand All @@ -30,7 +30,7 @@ jobs:


lint-go:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
Expand All @@ -41,7 +41,7 @@ jobs:
version: v2.11

lint-container-manifests:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- name: Install Helm
Expand All @@ -53,7 +53,7 @@ jobs:
docker compose -f docker-compose/docker-compose.yaml config > /dev/null

test-go:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

jobs:
release:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -26,7 +26,7 @@

- name: Extract spec version
run: |
MARGO_SPEC_VERSION=$(grep -A 0 ' version:' ./standard/snapshot.spec.yaml | tail -1 | awk '{print $2}')

Check warning on line 29 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

29:101 [line-length] line too long (113 > 100 characters)
echo "MARGO_SPEC_VERSION=${MARGO_SPEC_VERSION}" >> $GITHUB_ENV

- name: Set up Docker Buildx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sandbox-sanity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

jobs:
sandbox-e2e-functional-test-job:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
env:
CI: "true"
# Branches
Expand Down Expand Up @@ -66,10 +66,10 @@
sudo apt-get update
sudo apt-get install -y curl jq openssl git
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc

Check warning on line 69 in .github/workflows/sandbox-sanity-test.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

69:101 [line-length] line too long (104 > 100 characters)
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \

Check warning on line 72 in .github/workflows/sandbox-sanity-test.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

72:101 [line-length] line too long (136 > 100 characters)
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
Expand All @@ -77,7 +77,7 @@

(
# Install K3s early (saves time in wfm.sh install)
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="v1.31.4+k3s1" sh -s - --write-kubeconfig-mode 644

Check warning on line 80 in .github/workflows/sandbox-sanity-test.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

80:101 [line-length] line too long (113 > 100 characters)
) &

(
Expand Down Expand Up @@ -244,7 +244,7 @@
sudo -E bash ./wfm-cli.sh upload-app-non-interactive "${APP_PACKAGE_NAME_K3S}"

for i in {1..10}; do
STATUS=$(sudo -E bash ./wfm-cli.sh list-packages 2>/dev/null | grep "${APP_PACKAGE_NAME_K3S}" | grep -o "ONBOARDED" || echo "")

Check warning on line 247 in .github/workflows/sandbox-sanity-test.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

247:101 [line-length] line too long (141 > 100 characters)
if [ "$STATUS" = "ONBOARDED" ]; then
echo "✅ ${APP_PACKAGE_NAME_K3S} onboarded"
break
Expand All @@ -260,7 +260,7 @@
sudo -E bash ./wfm-cli.sh upload-app-non-interactive "${APP_PACKAGE_NAME_DOCKER}"

for i in {1..10}; do
STATUS=$(sudo -E bash ./wfm-cli.sh list-packages 2>/dev/null | grep "${APP_PACKAGE_NAME_DOCKER}" | grep -o "ONBOARDED" || echo "")

Check warning on line 263 in .github/workflows/sandbox-sanity-test.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

263:101 [line-length] line too long (144 > 100 characters)
if [ "$STATUS" = "ONBOARDED" ]; then
echo "✅ ${APP_PACKAGE_NAME_DOCKER} onboarded"
break
Expand All @@ -287,7 +287,7 @@
echo "========================================="
echo "📋 SYMPHONY API CONTAINER LOGS"
echo "========================================="
docker logs symphony-api-container --tail=100 2>&1 || echo "Could not retrieve Symphony logs"

Check warning on line 290 in .github/workflows/sandbox-sanity-test.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

290:101 [line-length] line too long (103 > 100 characters)

- name: WFM-Client (K3s) – Setup
working-directory: scripts
Expand Down Expand Up @@ -323,15 +323,15 @@
' config.yaml > config-new.yaml

# Verify the change was made
if grep -q "harbor.machine" config-new.yaml && grep -q "symphony.machine" config-new.yaml; then

Check warning on line 326 in .github/workflows/sandbox-sanity-test.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

326:101 [line-length] line too long (107 > 100 characters)
echo "✅ DNS entries added to ConfigMap"

# Apply the updated ConfigMap
sudo KUBECONFIG=/etc/rancher/k3s/k3s.yaml kubectl apply -f config-new.yaml

# Restart CoreDNS
sudo KUBECONFIG=/etc/rancher/k3s/k3s.yaml kubectl rollout restart deployment coredns -n kube-system

Check warning on line 333 in .github/workflows/sandbox-sanity-test.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

333:101 [line-length] line too long (113 > 100 characters)
sudo KUBECONFIG=/etc/rancher/k3s/k3s.yaml kubectl rollout status deployment/coredns -n kube-system --timeout=60s

Check warning on line 334 in .github/workflows/sandbox-sanity-test.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

334:101 [line-length] line too long (126 > 100 characters)

# Wait longer for DNS propagation
echo "⏳ Waiting for DNS propagation..."
Expand Down
1 change: 0 additions & 1 deletion scripts/device-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ install_basic_utilities() {
if [ "$DEVICE_TYPE" = "k3s" ]; then
INSTALL_HELM_V3_15_1=true
HELM_VERSION="3.15.1"
HELM_TAR="helm-v${HELM_VERSION}-linux-amd64.tar.gz"
HELM_BIN_DIR="/usr/local/bin"
install_helm
echo "✅ Helm installed for k3s device"
Expand Down
16 changes: 16 additions & 0 deletions scripts/lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,19 @@ package_installed() {
get_ubuntu_codename() {
lsb_release -cs 2>/dev/null || echo "noble"
}

resolve_target_arch() {
local host_arch="$(uname -m)"
case "${host_arch}" in
x86_64|amd64)
echo "amd64"
;;
aarch64|arm64)
echo "arm64"
;;
*)
echo "Unsupported architecture" >&2
return 1
;;
esac
}
5 changes: 4 additions & 1 deletion scripts/modules/go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ source "$(dirname "${BASH_SOURCE[0]}")/../lib/common.sh"
install_go() {
cd $HOME
echo "🔄 Installing Go..."
local CPU_ARCH
CPU_ARCH="$(resolve_target_arch)" || return 1

if [[ "$PATH" != *"/usr/local/go/bin"* ]] ; then
export PATH=$PATH:/usr/local/go/bin
fi
Expand All @@ -16,7 +19,7 @@ install_go() {
echo "⚡️ Go ${GO_VERSION} already installed, skipping installation"
else
sudo rm -rf /usr/local/go /usr/bin/go
wget "https://go.dev/dl/go1.25.10.linux-amd64.tar.gz" -O go.tar.gz
wget "https://go.dev/dl/go1.25.10.linux-${CPU_ARCH}.tar.gz" -O go.tar.gz
sudo tar -C /usr/local -xzf go.tar.gz
rm go.tar.gz
which go
Expand Down
11 changes: 8 additions & 3 deletions scripts/modules/helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ source "$(dirname "${BASH_SOURCE[0]}")/../lib/common.sh"
install_helm() {
cd $HOME
local HELM_VERSION="3.15.1"
local HELM_TAR="helm-v${HELM_VERSION}-linux-amd64.tar.gz"
local CPU_ARCH
local HELM_BIN_DIR="/usr/local/bin"
local HELM_TAR

CPU_ARCH="$(resolve_target_arch)" || return 1

HELM_TAR="helm-v${HELM_VERSION}-linux-${CPU_ARCH}.tar.gz"

echo "🔄 Installing Helm..."
if command_exists helm && [[ "$(helm version --short | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')" == "${HELM_VERSION}" ]]; then
Expand All @@ -16,9 +21,9 @@ install_helm() {
echo "Downloading Helm version ${HELM_VERSION}..."
wget -q "https://get.helm.sh/${HELM_TAR}" || { echo "Failed to download Helm."; exit 1; }
tar -xzf "${HELM_TAR}" || { echo "Failed to extract Helm."; exit 1; }
sudo mv "linux-amd64/helm" "${HELM_BIN_DIR}/" || { echo "Failed to move Helm."; exit 1; }
sudo mv "linux-${CPU_ARCH}/helm" "${HELM_BIN_DIR}/" || { echo "Failed to move Helm."; exit 1; }
rm "${HELM_TAR}"
rm -rf linux-amd64/
rm -rf "linux-${CPU_ARCH}/"
echo '✅ Helm installed'
fi
}
10 changes: 7 additions & 3 deletions scripts/modules/oras.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ install_oras() {

cd /tmp
local ORAS_VERSION="1.1.0"
wget "https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz"
tar -xzf "oras_${ORAS_VERSION}_linux_amd64.tar.gz"
local ORAS_ARCH
ORAS_ARCH="$(resolve_target_arch)" || return 1
local ORAS_TARBALL="oras_${ORAS_VERSION}_linux_${ORAS_ARCH}.tar.gz"

wget "https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/${ORAS_TARBALL}"
tar -xzf "${ORAS_TARBALL}"
sudo mv oras /usr/local/bin/
rm "oras_${ORAS_VERSION}_linux_amd64.tar.gz"
rm "${ORAS_TARBALL}"

ORAS_VERSION="$(oras version | head -n 1 | cut -d ':' -f 2 | sed 's/[[:space:]]*//')"
echo "✅ ORAS ${ORAS_VERSION} installed"
Expand Down
Loading