From 74c7bcd053328acbbc6bf65079338adb9c3b1b07 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Fri, 6 Feb 2026 08:51:12 +0000 Subject: [PATCH] feat(ci): switch CI to use @git.zone/tsdocker and add tsdocker config and image tests --- .gitea/workflows/docker_tags.yaml | 23 ++-- ...le_alpine_npmci => Dockerfile_alpine-npmci | 2 +- Dockerfile_alpine_bun | 54 -------- Dockerfile_alpine_deno | 54 -------- Dockerfile_alpine_node | 67 ---------- LICENSE | 2 +- build-alpine-images.sh | 125 ------------------ changelog.md | 9 ++ npmextra.json | 15 +++ test-alpine-images.sh | 83 ------------ test/test_alpine-bun.sh | 18 +++ test/test_alpine-deno.sh | 18 +++ test/test_alpine-node.sh | 24 ++++ 13 files changed, 101 insertions(+), 393 deletions(-) rename Dockerfile_alpine_npmci => Dockerfile_alpine-npmci (79%) delete mode 100644 Dockerfile_alpine_bun delete mode 100644 Dockerfile_alpine_deno delete mode 100644 Dockerfile_alpine_node delete mode 100755 build-alpine-images.sh delete mode 100755 test-alpine-images.sh create mode 100755 test/test_alpine-bun.sh create mode 100755 test/test_alpine-deno.sh create mode 100755 test/test_alpine-node.sh diff --git a/.gitea/workflows/docker_tags.yaml b/.gitea/workflows/docker_tags.yaml index 22aa9cd..faf345f 100644 --- a/.gitea/workflows/docker_tags.yaml +++ b/.gitea/workflows/docker_tags.yaml @@ -82,15 +82,22 @@ jobs: - name: Prepare run: | pnpm install -g pnpm - pnpm install -g @ship.zone/npmci + pnpm install -g @git.zone/tsdocker@latest - - name: Release - run: | - npmci docker login - npmci docker build - npmci docker test - # npmci docker push gitea.lossless.digital - npmci docker push code.foss.global + - name: Login to registries + run: tsdocker login + + - name: List discovered Dockerfiles + run: tsdocker list + + - name: Build all images + run: tsdocker build + + - name: Test images + run: tsdocker test + + - name: Push to code.foss.global + run: tsdocker push code.foss.global metadata: needs: test diff --git a/Dockerfile_alpine_npmci b/Dockerfile_alpine-npmci similarity index 79% rename from Dockerfile_alpine_npmci rename to Dockerfile_alpine-npmci index 196b823..71a4fde 100644 --- a/Dockerfile_alpine_npmci +++ b/Dockerfile_alpine-npmci @@ -1,4 +1,4 @@ -FROM host.today/ht-docker-node:alpine +FROM host.today/ht-docker-node:alpine-node RUN apk update && apk add bash libc6-compat alpine-sdk ENV PYTHONUNBUFFERED=1 RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python diff --git a/Dockerfile_alpine_bun b/Dockerfile_alpine_bun deleted file mode 100644 index 8d741db..0000000 --- a/Dockerfile_alpine_bun +++ /dev/null @@ -1,54 +0,0 @@ -FROM alpine:latest -LABEL author="Task Venture Capital GmbH " - -WORKDIR /workspace - -# Important environment variables -ENV NODE_VERSION_LTS="20.18.2" \ - NVM_DIR="/usr/local/nvm" \ - BUN_INSTALL="/root/.bun" \ - NVM_NODEJS_ORG_MIRROR="https://unofficial-builds.nodejs.org/download/release" - -# Install required packages for NVM and Node.js -RUN apk add --no-cache \ - bash \ - curl \ - git \ - ca-certificates \ - unzip \ - libstdc++ - -# Install NVM (latest version for better Alpine/musl support) -RUN mkdir -p $NVM_DIR && curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash - -# Make nvm available globally in all bash shells (interactive + non-interactive) -# IMPORTANT: Create /etc/bash.bashrc with nvm initialization -RUN printf '%s\n%s\n%s\n' \ - 'export NVM_DIR="/usr/local/nvm"' \ - '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' \ - '[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"' \ - > /etc/bash.bashrc - -# Copy nvm wrapper scripts from support directory -COPY image_support_files/bash-with-nvm /usr/local/bin/bash-with-nvm -COPY image_support_files/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -RUN chmod +x /usr/local/bin/bash-with-nvm /usr/local/bin/docker-entrypoint.sh - -# Use wrapper for RUN commands to enable nvm -SHELL ["/usr/local/bin/bash-with-nvm"] - -# Enable nvm for runtime bash commands (CI/CD workflows) -ENV BASH_ENV=/etc/bash.bashrc - -# Install Node.js LTS via NVM and Bun -RUN nvm install $NODE_VERSION_LTS \ - && nvm alias default $NODE_VERSION_LTS \ - && nvm use default \ - && curl -fsSL https://bun.sh/install | bash - -ENV PATH="$BUN_INSTALL/bin:$NVM_DIR/versions/node/v$NODE_VERSION_LTS/bin:$PATH" -ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules - -# Set entrypoint to make nvm available in all runtime contexts -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] -CMD ["bash"] diff --git a/Dockerfile_alpine_deno b/Dockerfile_alpine_deno deleted file mode 100644 index 1c2d4c4..0000000 --- a/Dockerfile_alpine_deno +++ /dev/null @@ -1,54 +0,0 @@ -FROM alpine:edge -LABEL author="Task Venture Capital GmbH " - -WORKDIR /workspace - -# Important environment variables -ENV NODE_VERSION_LTS="20.18.2" \ - NVM_DIR="/usr/local/nvm" \ - NVM_NODEJS_ORG_MIRROR="https://unofficial-builds.nodejs.org/download/release" - -# Install required packages for NVM and Node.js -# Install Deno from Alpine community repository (native musl build) -RUN apk add --no-cache \ - bash \ - curl \ - git \ - ca-certificates \ - unzip \ - libstdc++ \ - deno - -# Install NVM (latest version for better Alpine/musl support) -RUN mkdir -p $NVM_DIR && curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash - -# Make nvm available globally in all bash shells (interactive + non-interactive) -# IMPORTANT: Create /etc/bash.bashrc with nvm initialization -RUN printf '%s\n%s\n%s\n' \ - 'export NVM_DIR="/usr/local/nvm"' \ - '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' \ - '[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"' \ - > /etc/bash.bashrc - -# Copy nvm wrapper scripts from support directory -COPY image_support_files/bash-with-nvm /usr/local/bin/bash-with-nvm -COPY image_support_files/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -RUN chmod +x /usr/local/bin/bash-with-nvm /usr/local/bin/docker-entrypoint.sh - -# Use wrapper for RUN commands to enable nvm -SHELL ["/usr/local/bin/bash-with-nvm"] - -# Enable nvm for runtime bash commands (CI/CD workflows) -ENV BASH_ENV=/etc/bash.bashrc - -# Install Node.js LTS via NVM (Deno already installed from Alpine repos) -RUN nvm install $NODE_VERSION_LTS \ - && nvm alias default $NODE_VERSION_LTS \ - && nvm use default - -ENV PATH="$NVM_DIR/versions/node/v$NODE_VERSION_LTS/bin:$PATH" -ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules - -# Set entrypoint to make nvm available in all runtime contexts -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] -CMD ["bash"] diff --git a/Dockerfile_alpine_node b/Dockerfile_alpine_node deleted file mode 100644 index 2411c97..0000000 --- a/Dockerfile_alpine_node +++ /dev/null @@ -1,67 +0,0 @@ -FROM alpine:latest -LABEL author="Task Venture Capital GmbH " - -WORKDIR /workspace - -# Important environment variables -ENV NODE_VERSION_LTS="20.18.2" \ - NVM_DIR="/usr/local/nvm" \ - PNPM_HOME="/root/.local/share/pnpm" \ - NVM_NODEJS_ORG_MIRROR="https://unofficial-builds.nodejs.org/download/release" - -# Install required packages for NVM and Node.js -RUN apk add --no-cache \ - bash \ - curl \ - git \ - build-base \ - python3 \ - linux-headers \ - ca-certificates \ - wget \ - unzip \ - iputils \ - bind-tools \ - libstdc++ - -# Install NVM (latest version for better Alpine/musl support) -RUN mkdir -p $NVM_DIR && curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash - -# Make nvm available globally in all bash shells (interactive + non-interactive) -# IMPORTANT: Create /etc/bash.bashrc with nvm initialization -RUN printf '%s\n%s\n%s\n' \ - 'export NVM_DIR="/usr/local/nvm"' \ - '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' \ - '[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"' \ - > /etc/bash.bashrc - -# Copy nvm wrapper scripts from support directory -COPY image_support_files/bash-with-nvm /usr/local/bin/bash-with-nvm -COPY image_support_files/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -RUN chmod +x /usr/local/bin/bash-with-nvm /usr/local/bin/docker-entrypoint.sh - -# Use wrapper for RUN commands to enable nvm -SHELL ["/usr/local/bin/bash-with-nvm"] - -# Enable nvm for runtime bash commands (CI/CD workflows) -ENV BASH_ENV=/etc/bash.bashrc - -# Prepare pnpm directory -RUN mkdir -p ${PNPM_HOME} -ENV PATH="$PNPM_HOME:$PATH" - -# Install Node.js LTS via NVM and pnpm -# Use musl-specific builds from unofficial-builds for Alpine compatibility -RUN nvm install $NODE_VERSION_LTS \ - && nvm alias default $NODE_VERSION_LTS \ - && nvm use default \ - && npm install -g pnpm \ - && pnpm -v \ - && pnpm config set unsafe-perm true - -ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules -ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION_LTS/bin:$PATH - -# Set entrypoint to make nvm available in all runtime contexts -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] -CMD ["bash"] diff --git a/LICENSE b/LICENSE index eb3beb5..7583a48 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Lossless GmbH +Copyright (c) 2016 Task Venture Capital GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/build-alpine-images.sh b/build-alpine-images.sh deleted file mode 100755 index 65a85c1..0000000 --- a/build-alpine-images.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash -set -e - -echo "๐Ÿ”๏ธ Building Multi-Architecture Alpine Docker Images" -echo "====================================================" -echo "" - -# Color codes -GREEN='\033[0;32m' -BLUE='\033[0;34m' -YELLOW='\033[1;33m' -NC='\033[0m' # No Color - -# Check if buildx is available -if ! docker buildx version &> /dev/null; then - echo -e "${YELLOW}โš ๏ธ docker buildx not found. Installing...${NC}" - docker buildx create --use -fi - -# Ensure buildx builder is running -echo -e "${BLUE}๐Ÿ”ง Setting up buildx builder...${NC}" -if ! docker buildx inspect default-builder &> /dev/null; then - docker buildx create --name default-builder --use -else - docker buildx use default-builder -fi -echo -e "${GREEN}โœ… Buildx ready${NC}" -echo "" - -# Build function for multi-arch -build_multiarch_image() { - local dockerfile=$1 - local tag=$2 - local description=$3 - - echo -e "${BLUE}๐Ÿ“ฆ Building Multi-Arch: ${NC}${description}" - echo -e "${YELLOW} Dockerfile: ${NC}${dockerfile}" - echo -e "${YELLOW} Tag: ${NC}${tag}" - echo -e "${YELLOW} Platforms: ${NC}linux/amd64, linux/arm64" - - if docker buildx build \ - --platform linux/amd64,linux/arm64 \ - -f "${dockerfile}" \ - -t "${tag}" \ - --load \ - .; then - echo -e "${GREEN}โœ… Success: ${NC}${tag} (amd64 + arm64)" - echo "" - else - echo -e "\033[0;31mโŒ Failed: ${NC}${tag}" - echo "" - echo -e "${YELLOW}๐Ÿ’ก Note: Multi-arch builds with --load only work for single platform.${NC}" - echo -e "${YELLOW} To test locally, build for your native platform:${NC}" - echo -e "${YELLOW} docker buildx build --platform linux/amd64 -f ${dockerfile} -t ${tag} --load .${NC}" - exit 1 - fi -} - -# Build function for single platform (for local testing) -build_native_image() { - local dockerfile=$1 - local tag=$2 - local description=$3 - local platform=$(uname -m) - - # Convert platform name - if [ "$platform" = "x86_64" ]; then - platform="linux/amd64" - elif [ "$platform" = "aarch64" ] || [ "$platform" = "arm64" ]; then - platform="linux/arm64" - fi - - echo -e "${BLUE}๐Ÿ“ฆ Building Native: ${NC}${description}" - echo -e "${YELLOW} Dockerfile: ${NC}${dockerfile}" - echo -e "${YELLOW} Tag: ${NC}${tag}" - echo -e "${YELLOW} Platform: ${NC}${platform} (native)" - - if docker buildx build \ - --platform "${platform}" \ - -f "${dockerfile}" \ - -t "${tag}" \ - --load \ - .; then - echo -e "${GREEN}โœ… Success: ${NC}${tag} (${platform})" - echo "" - else - echo -e "\033[0;31mโŒ Failed: ${NC}${tag}" - exit 1 - fi -} - -echo -e "${BLUE}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" -echo -e "${BLUE}Building Alpine Images${NC}" -echo -e "${BLUE}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" -echo "" -echo -e "${YELLOW}๐Ÿ’ก Building for native platform only (for local testing)${NC}" -echo -e "${YELLOW} To build multi-arch for push to registry, use:${NC}" -echo -e "${YELLOW} docker buildx build --platform linux/amd64,linux/arm64 --push ...${NC}" -echo "" - -# Build images for native platform (can be loaded for local testing) -build_native_image "Dockerfile_alpine_node" \ - "ht-docker-node:alpine-node" \ - "Alpine with Node.js LTS + NVM + pnpm" - -build_native_image "Dockerfile_alpine_deno" \ - "ht-docker-node:alpine-deno" \ - "Alpine with Node.js LTS + NVM + Deno" - -build_native_image "Dockerfile_alpine_bun" \ - "ht-docker-node:alpine-bun" \ - "Alpine with Node.js LTS + NVM + Bun" - -# Summary -echo -e "${GREEN}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" -echo -e "${GREEN}โœจ All Alpine Images Built Successfully!${NC}" -echo -e "${GREEN}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" -echo "" -echo "๐Ÿ“‹ Built Images (Native Platform):" -echo "" -docker images | grep "ht-docker-node:alpine" | awk '{printf " โœ… %-30s %10s\n", $1":"$2, $7" "$8}' -echo "" -echo -e "${YELLOW}๐Ÿ’ก These images are built for your native architecture for local testing.${NC}" -echo -e "${YELLOW} In CI/CD, build with: docker buildx build --platform linux/amd64,linux/arm64 --push${NC}" -echo "" diff --git a/changelog.md b/changelog.md index 4898ea7..181f7ba 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,14 @@ # Changelog +## 2026-02-06 - 5.2.0 - feat(ci) +switch CI to use @git.zone/tsdocker and add tsdocker config and image tests + +- Replace @ship.zone/npmci with @git.zone/tsdocker in CI workflow and use tsdocker commands: login, list, build, test, push +- Add npmextra.json configuration for @git.zone/tsdocker (registries, registryRepoMap, platforms, push/testDir) +- Add Dockerfile_alpine-npmci and per-image test scripts under test/ (alpine-bun, alpine-deno, alpine-node) +- Remove legacy Alpine Dockerfiles and legacy build/test scripts (Dockerfile_alpine_node/deno/bun/_npmci, build-alpine-images.sh, test-alpine-images.sh) +- Update LICENSE copyright owner to Task Venture Capital GmbH + ## 2025-10-26 - 5.1.0 - feat(alpine-deno) Improve alpine deno image: switch to alpine:edge and use native Deno package, remove glibc workaround, update NVM/PATH, add local tooling settings and expanded README diff --git a/npmextra.json b/npmextra.json index d9a782e..6525d1f 100644 --- a/npmextra.json +++ b/npmextra.json @@ -28,6 +28,21 @@ "registry.gitlab.com" ] }, + "@git.zone/tsdocker": { + "registries": [ + "code.foss.global", + "registry.gitlab.com", + "docker.io" + ], + "registryRepoMap": { + "code.foss.global": "host.today/ht-docker-node", + "registry.gitlab.com": "hosttoday/ht-docker-node", + "docker.io": "hosttoday/ht-docker-node" + }, + "platforms": ["linux/amd64", "linux/arm64"], + "push": false, + "testDir": "./test" + }, "tsdoc": { "legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n" } diff --git a/test-alpine-images.sh b/test-alpine-images.sh deleted file mode 100755 index 4648049..0000000 --- a/test-alpine-images.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -set -e - -echo "๐Ÿงช Testing Multi-Architecture Alpine Docker Images" -echo "===================================================" -echo "" - -# Color codes -GREEN='\033[0;32m' -BLUE='\033[0;34m' -YELLOW='\033[1;33m' -RED='\033[0;31m' -NC='\033[0m' # No Color - -FAILED_TESTS=0 - -# Test function -test_image() { - local tag=$1 - local description=$2 - local test_cmd=$3 - - echo -e "${BLUE}๐Ÿงช Testing: ${NC}${description}" - echo -e "${YELLOW} Tag: ${NC}${tag}" - - if docker run --rm "${tag}" bash -c "${test_cmd}"; then - echo -e "${GREEN}โœ… Pass${NC}" - echo "" - return 0 - else - echo -e "${RED}โŒ Fail${NC}" - echo "" - ((FAILED_TESTS++)) - return 1 - fi -} - -# Test Alpine Images (Native Platform) -echo -e "${BLUE}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" -echo -e "${BLUE}Testing Alpine Images (Native Platform)${NC}" -echo -e "${BLUE}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" -echo "" -echo -e "${YELLOW}๐Ÿ’ก These images are built for your native architecture${NC}" -echo -e "${YELLOW} They will run at full native speed without emulation${NC}" -echo "" - -test_image "ht-docker-node:alpine-node" \ - "Alpine with Node.js LTS + NVM + pnpm" \ - "nvm --version && node --version && pnpm --version" - -test_image "ht-docker-node:alpine-deno" \ - "Alpine with Node.js LTS + NVM + Deno" \ - "nvm --version && node --version && deno --version" - -test_image "ht-docker-node:alpine-bun" \ - "Alpine with Node.js LTS + NVM + Bun" \ - "nvm --version && node --version && bun --version" - -# Test NVM version switching (critical feature) -echo -e "${BLUE}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" -echo -e "${BLUE}Testing NVM Version Switching${NC}" -echo -e "${BLUE}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" -echo "" - -test_image "ht-docker-node:alpine-node" \ - "NVM version switching" \ - "node --version && nvm install 18 && node --version | grep v18" - -# Summary -echo -e "${BLUE}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" -if [ $FAILED_TESTS -eq 0 ]; then - echo -e "${GREEN}โœจ All Tests Passed! (0 failures)${NC}" - echo -e "${BLUE}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" - echo "" - echo -e "${YELLOW}๐Ÿ’ก In production, these same images will work natively on both amd64 and arm64${NC}" - echo "" - exit 0 -else - echo -e "${RED}โŒ Some Tests Failed (${FAILED_TESTS} failures)${NC}" - echo -e "${BLUE}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${NC}" - echo "" - exit 1 -fi diff --git a/test/test_alpine-bun.sh b/test/test_alpine-bun.sh new file mode 100755 index 0000000..76d3790 --- /dev/null +++ b/test/test_alpine-bun.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +echo "Testing alpine-bun image..." + +# Test NVM +echo "Testing NVM..." +nvm --version + +# Test Node.js +echo "Testing Node.js..." +node --version + +# Test Bun +echo "Testing Bun..." +bun --version + +echo "alpine-bun tests passed!" diff --git a/test/test_alpine-deno.sh b/test/test_alpine-deno.sh new file mode 100755 index 0000000..8eccd0c --- /dev/null +++ b/test/test_alpine-deno.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +echo "Testing alpine-deno image..." + +# Test NVM +echo "Testing NVM..." +nvm --version + +# Test Node.js +echo "Testing Node.js..." +node --version + +# Test Deno +echo "Testing Deno..." +deno --version + +echo "alpine-deno tests passed!" diff --git a/test/test_alpine-node.sh b/test/test_alpine-node.sh new file mode 100755 index 0000000..8bd54fc --- /dev/null +++ b/test/test_alpine-node.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -e + +echo "Testing alpine-node image..." + +# Test NVM +echo "Testing NVM..." +nvm --version + +# Test Node.js +echo "Testing Node.js..." +node --version + +# Test pnpm +echo "Testing pnpm..." +pnpm --version + +# Test NVM version switching +echo "Testing NVM version switching..." +nvm install 18 +nvm use 18 +node --version | grep v18 + +echo "alpine-node tests passed!"