Skip to content

Commit 29e3e86

Browse files
authored
[powershell] - Fixing installation issue on arm64 (#1581)
* [powershell] - Fixing installation issue on `arm64` * Adding new workflow for arm64 on powershell feature * add wget if not present.
1 parent 9735099 commit 29e3e86

3 files changed

Lines changed: 71 additions & 4 deletions

File tree

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: "PR - Test Updated Features (arm64)"
2+
on:
3+
pull_request:
4+
# NOTE: To extend this workflow to other features, add path entries below
5+
# following the same pattern, e.g.:
6+
# - "src/<feature-name>/**"
7+
# - "test/<feature-name>/**"
8+
paths:
9+
- "src/powershell/**"
10+
- "test/powershell/**"
11+
12+
jobs:
13+
detect-changes:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
features: ${{ steps.filter.outputs.changes }}
17+
steps:
18+
- uses: dorny/paths-filter@v3
19+
id: filter
20+
with:
21+
# NOTE: To extend this workflow to other features, add filter entries below
22+
# following the same pattern, e.g.:
23+
# <feature-name>: ./**/<feature-name>/**
24+
filters: |
25+
powershell: ./**/powershell/**
26+
27+
test:
28+
needs: [detect-changes]
29+
runs-on: ubuntu-24.04-arm
30+
continue-on-error: true
31+
strategy:
32+
matrix:
33+
features: ${{ fromJSON(needs.detect-changes.outputs.features) }}
34+
baseImage:
35+
[
36+
"ubuntu:focal",
37+
"ubuntu:jammy",
38+
"debian:11",
39+
"debian:12",
40+
"mcr.microsoft.com/devcontainers/base:ubuntu",
41+
"mcr.microsoft.com/devcontainers/base:debian",
42+
"mcr.microsoft.com/devcontainers/base:noble"
43+
]
44+
steps:
45+
- uses: actions/checkout@v4
46+
47+
- name: "Install latest devcontainer CLI"
48+
run: npm install -g @devcontainers/cli
49+
50+
- name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
51+
run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .
52+
53+
test-scenarios:
54+
needs: [detect-changes]
55+
runs-on: ubuntu-24.04-arm
56+
continue-on-error: true
57+
strategy:
58+
matrix:
59+
features: ${{ fromJSON(needs.detect-changes.outputs.features) }}
60+
steps:
61+
- uses: actions/checkout@v4
62+
63+
- name: "Install latest devcontainer CLI"
64+
run: npm install -g @devcontainers/cli
65+
66+
- name: "Testing '${{ matrix.features }}' scenarios"
67+
run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated .

src/powershell/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "powershell",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"name": "PowerShell",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/powershell",
66
"description": "Installs PowerShell along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",

src/powershell/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ install_using_github() {
367367
# Fall back on direct download if no apt package exists in microsoft pool
368368
if command -v apt-get > /dev/null 2>&1; then
369369
# Debian/Ubuntu dependencies
370-
check_packages curl ca-certificates gnupg2 dirmngr libc6 libgcc1 libgssapi-krb5-2 libstdc++6 libunwind8 libuuid1 zlib1g libicu[0-9][0-9]
370+
check_packages curl ca-certificates gnupg2 dirmngr libc6 libgcc1 libgssapi-krb5-2 libstdc++6 libunwind8 libuuid1 zlib1g libicu[0-9][0-9] wget
371371
elif command -v dnf > /dev/null 2>&1; then
372372
# AlmaLinux/RHEL dependencies
373373
check_packages curl ca-certificates gnupg2 glibc libgcc krb5-libs libstdc++ libuuid zlib libicu wget tar
@@ -394,10 +394,10 @@ install_using_github() {
394394
install_prev_pwsh $pwsh_url
395395
fi
396396

397-
# downlaod the latest version of powershell and extracting the file to powershell directory
397+
# download the latest version of powershell and extracting the file to powershell directory
398398
wget https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/${powershell_filename}
399399
mkdir ~/powershell
400-
tar -xvf powershell-${POWERSHELL_VERSION}-linux-x64.tar.gz -C ~/powershell
400+
tar -xvf ${powershell_filename} -C ~/powershell
401401

402402
powershell_archive_sha256="$(cat release.html | tr '\n' ' ' | sed 's|<[^>]*>||g' | grep -oP "${powershell_filename}\s+\K[0-9a-fA-F]{64}" || echo '')"
403403
if [ -z "${powershell_archive_sha256}" ]; then

0 commit comments

Comments
 (0)