Skip to content

Commit

Permalink
resolve conflict main
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Putsch committed Jan 27, 2024
2 parents 0bd3add + 3e0c0ae commit 70cfdfe
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/common-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "common-utils",
"version": "2.4.0",
"version": "2.4.1",
"name": "Common Utilities",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
Expand Down Expand Up @@ -66,4 +66,4 @@
"description": "Add packages from non-free Debian repository? (Debian only)"
}
}
}
}
9 changes: 6 additions & 3 deletions src/common-utils/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,12 @@ install_debian_packages() {
install_redhat_packages() {
local package_list=""
local remove_epel="false"
local install_cmd=dnf
if ! type dnf > /dev/null 2>&1; then
install_cmd=yum
local install_cmd=microdnf
if ! type microdnf > /dev/null 2>&1; then
install_cmd=dnf
if ! type dnf > /dev/null 2>&1; then
install_cmd=yum
fi
fi

if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
Expand Down
16 changes: 16 additions & 0 deletions test/common-utils/alma-8-minimal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

# Optional: Import test library
source dev-container-features-test-lib

# Definition specific tests
. /etc/os-release
check "non-root user" test "$(whoami)" = "devcontainer"
check "distro" test "${PLATFORM_ID}" = "platform:el8"
check "curl" curl --version
check "jq" jq --version

# Report result
reportResults
2 changes: 1 addition & 1 deletion test/common-utils/alma-8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source dev-container-features-test-lib
# Definition specific tests
. /etc/os-release
check "non-root user" test "$(whoami)" = "devcontainer"
check "distro" test "${PLATFORM_ID}" = "platform:el9"
check "distro" test "${PLATFORM_ID}" = "platform:el8"
check "curl" curl --version
check "jq" jq --version

Expand Down
16 changes: 16 additions & 0 deletions test/common-utils/alma-9-minimal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

# Optional: Import test library
source dev-container-features-test-lib

# Definition specific tests
. /etc/os-release
check "non-root user" test "$(whoami)" = "devcontainer"
check "distro" test "${PLATFORM_ID}" = "platform:el9"
check "curl" curl --version
check "jq" jq --version

# Report result
reportResults
16 changes: 16 additions & 0 deletions test/common-utils/rocky-8-minimal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

# Optional: Import test library
source dev-container-features-test-lib

# Definition specific tests
. /etc/os-release
check "non-root user" test "$(whoami)" = "devcontainer"
check "distro" test "${PLATFORM_ID}" = "platform:el8"
check "curl" curl --version
check "jq" jq --version

# Report result
reportResults
16 changes: 16 additions & 0 deletions test/common-utils/rocky-9-minimal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

# Optional: Import test library
source dev-container-features-test-lib

# Definition specific tests
. /etc/os-release
check "non-root user" test "$(whoami)" = "devcontainer"
check "distro" test "${PLATFORM_ID}" = "platform:el9"
check "curl" curl --version
check "jq" jq --version

# Report result
reportResults
34 changes: 24 additions & 10 deletions test/common-utils/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,29 @@
"common-utils": {}
}
},
"alma-minimal-8": {
"image": "almalinux:8-minimal",
"alma-8": {
"image": "almalinux:8",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"alma-minimal-9": {
"image": "almalinux:9-minimal",
"alma-9": {
"image": "almalinux:9",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"alma-8": {
"image": "almalinux:8",
"alma-8-minimal": {
"image": "almalinux:8-minimal",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"alma-9": {
"image": "almalinux:9",
"alma-9-minimal": {
"image": "almalinux:9-minimal",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
Expand All @@ -76,13 +76,27 @@
"common-utils": {}
}
},
"rocky-9": {
"rocky-9": {
"image": "rockylinux:9",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"rocky-8-minimal": {
"image": "rockylinux:8-minimal",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"rocky-9-minimal": {
"image": "rockylinux:9-minimal",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"fedora": {
"image": "fedora",
"remoteUser": "devcontainer",
Expand Down Expand Up @@ -237,4 +251,4 @@
"common-utils": {}
}
}
}
}

0 comments on commit 70cfdfe

Please sign in to comment.